Small fix to build with Pyhton-3.7

This commit is contained in:
Sérgio M. Basto 2018-07-12 03:53:41 +01:00
parent 1ab3af337f
commit c8823019a6
2 changed files with 19 additions and 2 deletions

View File

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

View File

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