Allow to use python-pillow
This commit is contained in:
parent
c9313118cc
commit
83807c82fe
26
opencv-pillow.patch
Normal file
26
opencv-pillow.patch
Normal file
@ -0,0 +1,26 @@
|
||||
Index: OpenCV-2.4.3/modules/contrib/doc/facerec/src/crop_face.py
|
||||
===================================================================
|
||||
--- OpenCV-2.4.3.orig/modules/contrib/doc/facerec/src/crop_face.py
|
||||
+++ OpenCV-2.4.3/modules/contrib/doc/facerec/src/crop_face.py
|
||||
@@ -31,7 +31,8 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-import sys, math, Image
|
||||
+import sys, math
|
||||
+from PIL import Image
|
||||
|
||||
def Distance(p1,p2):
|
||||
dx = p2[0] - p1[0]
|
||||
Index: OpenCV-2.4.3/modules/python/test/ticket_6.py
|
||||
===================================================================
|
||||
--- OpenCV-2.4.3.orig/modules/python/test/ticket_6.py
|
||||
+++ OpenCV-2.4.3/modules/python/test/ticket_6.py
|
||||
@@ -1,6 +1,6 @@
|
||||
import urllib
|
||||
import cv2.cv as cv
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
import unittest
|
||||
|
||||
class TestLoadImage(unittest.TestCase):
|
@ -5,7 +5,7 @@
|
||||
|
||||
Name: opencv
|
||||
Version: 2.4.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Collection of algorithms for computer vision
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -16,6 +16,7 @@ Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{v
|
||||
Source1: opencv-samples-Makefile
|
||||
Patch0: opencv-pkgcmake.patch
|
||||
Patch1: opencv-pkgcmake2.patch
|
||||
Patch2: opencv-pillow.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: libtool
|
||||
@ -99,6 +100,7 @@ This package contains Python bindings for the OpenCV library.
|
||||
%setup -q -n %{tar_name}-%{version}
|
||||
%patch0 -p1 -b .pkgcmake
|
||||
%patch1 -p1 -b .pkgcmake2
|
||||
%patch2 -p1 -b .pillow
|
||||
|
||||
# fix dos end of lines
|
||||
sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp
|
||||
@ -228,6 +230,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Jan 20 2013 Nicolas Chauvet <kwizart@gmail.com> - 2.4.3-4
|
||||
- Allow to use python-pillow - rhbz#895767
|
||||
|
||||
* Mon Nov 12 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.4.3-3
|
||||
- Switch Build Type to ReleaseWithDebInfo to avoid -03
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user