Small fix to build with Pyhton-3.7

epel9
Sérgio M. Basto 7 years ago
parent 1ab3af337f
commit c8823019a6

@ -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);

@ -47,7 +47,7 @@
Name: opencv Name: opencv
Version: 3.4.1 Version: 3.4.1
Release: 4%{?dist} Release: 5%{?dist}
Summary: Collection of algorithms for computer vision Summary: Collection of algorithms for computer vision
# This is normal three clause BSD. # This is normal three clause BSD.
License: BSD License: BSD
@ -63,10 +63,11 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz
# https://bugzilla.redhat.com/1031312 # https://bugzilla.redhat.com/1031312
Patch1: opencv-3.4.1-cmake_paths.patch Patch1: opencv-3.4.1-cmake_paths.patch
Patch2: opencv-3.4.1-cmake_va_intel_fix.patch Patch2: opencv-3.4.1-cmake_va_intel_fix.patch
Patch3: opencv-3.4.1-python37.patch
BuildRequires: libtool BuildRequires: libtool
BuildRequires: cmake >= 2.6.3 BuildRequires: cmake >= 2.6.3
BuildRequires: chrpath BuildRequires: chrpath
%{?with_eigen2:BuildRequires: eigen2-devel} %{?with_eigen2:BuildRequires: eigen2-devel}
%{?with_eigen3:BuildRequires: eigen3-devel} %{?with_eigen3:BuildRequires: eigen3-devel}
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
@ -394,6 +395,9 @@ popd
%{_libdir}/libopencv_xphoto.so.%{abiver}* %{_libdir}/libopencv_xphoto.so.%{abiver}*
%changelog %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 * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-4
- Rebuilt for Python 3.7 - Rebuilt for Python 3.7

Loading…
Cancel
Save