[comix: 4/4] Don't import Image directly and import PIL instead for
Mamoru Tasaka
mtasaka at fedoraproject.org
Tue Jan 15 13:29:39 UTC 2013
commit 909e245ea70e2c39a85f5c28730d3e7d7b02b0ab
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Tue Jan 15 22:24:03 2013 +0900
Don't import Image directly and import PIL instead for
F-19 Pillow conversion
Patch from Toshio Kuratomi <a.badger at gmail.com>
(bug 895175)
comix-4.0.4-import-PIL-for-Image.patch | 131 ++++++++++++++++++++++++++++++++
comix.spec | 14 +++-
2 files changed, 143 insertions(+), 2 deletions(-)
---
diff --git a/comix-4.0.4-import-PIL-for-Image.patch b/comix-4.0.4-import-PIL-for-Image.patch
new file mode 100644
index 0000000..8056c0e
--- /dev/null
+++ b/comix-4.0.4-import-PIL-for-Image.patch
@@ -0,0 +1,131 @@
+Index: comix-4.0.4/install.py
+===================================================================
+--- comix-4.0.4.orig/install.py
++++ comix-4.0.4/install.py
+@@ -240,7 +240,7 @@ def check_dependencies():
+ print ' !!! PyGTK .................... Not found'
+ required_found = False
+ try:
+- import Image
++ from PIL import Image
+ assert Image.VERSION >= '1.1.5'
+ print ' Python Imaging Library ....... OK'
+ except ImportError:
+Index: comix-4.0.4/mime/comicthumb
+===================================================================
+--- comix-4.0.4.orig/mime/comicthumb
++++ comix-4.0.4/mime/comicthumb
+@@ -22,7 +22,7 @@ import tarfile
+ import subprocess
+
+ try:
+- import Image
++ from PIL import Image
+ except ImportError:
+ print '! Could not import the Image module (PIL).'
+ print __doc__
+Index: comix-4.0.4/src/comix.py
+===================================================================
+--- comix-4.0.4.orig/src/comix.py
++++ comix-4.0.4/src/comix.py
+@@ -49,7 +49,7 @@ except ImportError:
+ sys.exit(1)
+
+ try:
+- import Image
++ from PIL import Image
+ assert Image.VERSION >= '1.1.5'
+ except AssertionError:
+ print "You don't have the required version of the Python Imaging",
+Index: comix-4.0.4/src/histogram.py
+===================================================================
+--- comix-4.0.4.orig/src/histogram.py
++++ comix-4.0.4/src/histogram.py
+@@ -1,9 +1,9 @@
+ """histogram.py - Draw histograms (RGB) from pixbufs."""
+
+ import gtk
+-import Image
+-import ImageDraw
+-import ImageOps
++from PIL import Image
++from PIL import ImageDraw
++from PIL import ImageOps
+
+ import image
+
+Index: comix-4.0.4/src/image.py
+===================================================================
+--- comix-4.0.4.orig/src/image.py
++++ comix-4.0.4/src/image.py
+@@ -1,10 +1,10 @@
+ """image.py - Various image manipulations."""
+
+ import gtk
+-import Image
+-import ImageEnhance
+-import ImageOps
+-import ImageStat
++from PIL import Image
++from PIL import ImageEnhance
++from PIL import ImageOps
++from PIL import ImageStat
+
+ from preferences import prefs
+
+Index: comix-4.0.4/src/library.py
+===================================================================
+--- comix-4.0.4.orig/src/library.py
++++ comix-4.0.4/src/library.py
+@@ -8,8 +8,8 @@ from xml.sax.saxutils import escape as x
+ import gtk
+ import gobject
+ import pango
+-import Image
+-import ImageDraw
++from PIL import Image
++from PIL import ImageDraw
+
+ import archive
+ import encoding
+Index: comix-4.0.4/src/thumbbar.py
+===================================================================
+--- comix-4.0.4.orig/src/thumbbar.py
++++ comix-4.0.4/src/thumbbar.py
+@@ -4,8 +4,8 @@ import urllib
+
+ import gtk
+ import gobject
+-import Image
+-import ImageDraw
++from PIL import Image
++from PIL import ImageDraw
+
+ import image
+ from preferences import prefs
+Index: comix-4.0.4/src/thumbnail.py
+===================================================================
+--- comix-4.0.4.orig/src/thumbnail.py
++++ comix-4.0.4/src/thumbnail.py
+@@ -15,7 +15,7 @@ import shutil
+ import tempfile
+
+ import gtk
+-import Image
++from PIL import Image
+
+ import archive
+ import constants
+Index: comix-4.0.4/src/thumbremover.py
+===================================================================
+--- comix-4.0.4.orig/src/thumbremover.py
++++ comix-4.0.4/src/thumbremover.py
+@@ -7,7 +7,7 @@ import urllib
+
+ import gtk
+ import pango
+-import Image
++from PIL import Image
+
+ import encoding
+ import labels
diff --git a/comix.spec b/comix.spec
index 1d1091f..abcc761 100644
--- a/comix.spec
+++ b/comix.spec
@@ -7,7 +7,7 @@
%undefine alphatag
%define comix4 1
-%define fedorarel 5
+%define fedorarel 6
Name: comix
Version: %{mainver}
@@ -34,7 +34,10 @@ Patch3: comix-4.0.4-gettext-usrmove.patch
# Prevent crash when non-utf8 path name is given to thumbnail file
# (bug 877604)
Patch4: comix-4.0.4-pathname2url-utf8.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# Don't import Image directory and import PIL instead for
+# F-19 Pillow conversion
+# (bug 895175)
+Patch5: comix-4.0.4-import-PIL-for-Image.patch
BuildArch: noarch
BuildRequires: gettext
@@ -65,6 +68,7 @@ uses GTK+ through the PyGTK bindings.
%patch2 -p1 -b .debug1
%patch3 -p1 -b .usrmove
%patch4 -p1 -b .p2url
+%patch5 -p1 -b .pil
%{__mkdir_p} TMPBIN
cd TMPBIN
@@ -175,6 +179,12 @@ exit 0
%changelog
+* Tue Jan 15 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 4.0.4-6
+- Don't import Image directly and import PIL instead for
+ F-19 Pillow conversion
+ Patch from Toshio Kuratomi <a.badger at gmail.com>
+ (bug 895175)
+
* Tue Dec 4 2012 Mamoru TASAKA <mtasaka at fedoraproject.org> - 4.0.4-5
- Prevent crash when non-utf8 path name is given to thumbnail file
(bug 877604)
More information about the scm-commits
mailing list