public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Small fix to build with Pyhton-3.7
Date: Fri, 28 Aug 2026 13:30:55 GMT	[thread overview]
Message-ID: <178792385590.1.11770611766102708609.rpms-opencv-c8823019a699@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/opencv
Branch : opencv5
Commit : c8823019a699b9a831c8f243f0f44eeb677ee98f
Author : Sérgio M. Basto <sergio@serjux.com>
Date   : 2018-07-12T03:53:41+01:00
Stats  : +19/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/opencv/c/c8823019a699b9a831c8f243f0f44eeb677ee98f?branch=opencv5

Log:
Small fix to build with Pyhton-3.7

---
diff --git a/opencv-3.4.1-python37.patch b/opencv-3.4.1-python37.patch
new file mode 100644
index 0000000..321d61a
--- /dev/null
+++ b/opencv-3.4.1-python37.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp
+index fab60fd03..2c48041dc 100644
+--- a/modules/python/src2/cv2.cpp
++++ b/modules/python/src2/cv2.cpp
+@@ -886,7 +886,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name)
+     (void)name;
+     if(!obj || obj == Py_None)
+         return true;
+-    char* str = PyString_AsString(obj);
++    const char* str = PyString_AsString(obj);
+     if(!str)
+         return false;
+     value = String(str);

diff --git a/opencv.spec b/opencv.spec
index 24a70cb..c2ede94 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -47,7 +47,7 @@
 
 Name:           opencv
 Version:        3.4.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Collection of algorithms for computer vision
 # This is normal three clause BSD.
 License:        BSD
@@ -63,10 +63,11 @@ Source1:        %{name}_contrib-clean-%{version}.tar.gz
 # https://bugzilla.redhat.com/1031312
 Patch1:         opencv-3.4.1-cmake_paths.patch
 Patch2:         opencv-3.4.1-cmake_va_intel_fix.patch
+Patch3:         opencv-3.4.1-python37.patch
+
 BuildRequires:  libtool
 BuildRequires:  cmake >= 2.6.3
 BuildRequires:  chrpath
-
 %{?with_eigen2:BuildRequires:  eigen2-devel}
 %{?with_eigen3:BuildRequires:  eigen3-devel}
 BuildRequires:  gtk3-devel
@@ -394,6 +395,9 @@ popd
 %{_libdir}/libopencv_xphoto.so.%{abiver}*
 
 %changelog
+* Wed Jul 11 2018 Sérgio Basto <sergio@serjux.com> - 3.4.1-5
+- Small fix to build with Pyhton-3.7
+
 * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-4
 - Rebuilt for Python 3.7
 

                 reply	other threads:[~2026-08-28 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178792385590.1.11770611766102708609.rpms-opencv-c8823019a699@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox