public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/opencv] opencv5: Allow to use python-pillow
@ 2026-08-28 13:30 Nicolas Chauvet
  0 siblings, 0 replies; only message in thread
From: Nicolas Chauvet @ 2026-08-28 13:30 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/opencv
Branch : opencv5
Commit : 83807c82feaa24b69bcdda1eb38d5b268c719a5f
Author : Nicolas Chauvet <kwizart@gmail.com>
Date   : 2013-01-20T20:07:18+01:00
Stats  : +32/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/opencv/c/83807c82feaa24b69bcdda1eb38d5b268c719a5f?branch=opencv5

Log:
Allow to use python-pillow

---
diff --git a/opencv-pillow.patch b/opencv-pillow.patch
new file mode 100644
index 0000000..c4e94e6
--- /dev/null
+++ b/opencv-pillow.patch
@@ -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):

diff --git a/opencv.spec b/opencv.spec
index 8655743..14b3381 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -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
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-28 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 13:30 [rpms/opencv] opencv5: Allow to use python-pillow Nicolas Chauvet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox