[hplip] Use the form of import of PIL that is pillow compatible (bug #895266).
Jiří Popelka
jpopelka at fedoraproject.org
Tue Jan 15 12:21:20 UTC 2013
commit 0a6a5c877dbe24739a5f45cabcb8dbb570c53357
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Tue Jan 15 13:18:26 2013 +0100
Use the form of import of PIL that is pillow compatible (bug #895266).
hplip-pillow.patch | 39 +++++++++++++++++++++++++++++++++++++++
hplip.spec | 9 ++++++++-
2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/hplip-pillow.patch b/hplip-pillow.patch
new file mode 100644
index 0000000..0c13734
--- /dev/null
+++ b/hplip-pillow.patch
@@ -0,0 +1,39 @@
+Index: hplip-3.12.11/installer/core_install.py
+===================================================================
+--- hplip-3.12.11.orig/installer/core_install.py
++++ hplip-3.12.11/installer/core_install.py
+@@ -1100,7 +1100,7 @@ class CoreInstall(object):
+ def check_pil(self):
+ log.debug("Checking for PIL...")
+ try:
+- import Image
++ from PIL import Image
+ return True
+ except ImportError:
+ return False
+Index: hplip-3.12.11/installer/dcheck.py
+===================================================================
+--- hplip-3.12.11.orig/installer/dcheck.py
++++ hplip-3.12.11/installer/dcheck.py
+@@ -361,7 +361,7 @@ def get_xsane_version():
+
+ def get_pil_version():
+ try:
+- import Image
++ from PIL import Image
+ except ImportError:
+ return '-'
+ else:
+Index: hplip-3.12.11/scan.py
+===================================================================
+--- hplip-3.12.11.orig/scan.py
++++ hplip-3.12.11/scan.py
+@@ -589,7 +589,7 @@ try:
+ from base import subproc as subprocess
+
+ try:
+- import Image
++ from PIL import Image
+ except ImportError:
+ log.error("%s requires the Python Imaging Library (PIL). Exiting." % __mod__)
+ sys.exit(1)
diff --git a/hplip.spec b/hplip.spec
index 020261a..c527beb 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.12.11
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
@@ -28,6 +28,7 @@ Patch16: hplip-bad-low-ink-warning.patch
Patch17: hplip-deviceIDs-ppd.patch
Patch18: hplip-skip-blank-lines.patch
Patch19: hplip-dbglog-newline.patch
+Patch20: hplip-pillow.patch
Patch21: hplip-ppd-ImageableArea.patch
Patch22: hplip-raw_deviceID-traceback.patch
Patch23: hplip-UnicodeDecodeError.patch
@@ -250,6 +251,9 @@ done
# Added missing newline to string argument in dbglog() call (bug #585275).
%patch19 -p1 -b .dbglog-newline
+# Use the form of import of PIL that is pillow compatible (bug #895266).
+%patch20 -p1 -b .pillow
+
# Fix ImageableArea for Laserjet 8150/9000 (bug #596298).
for ppd_file in $(grep '^diff' %{PATCH21} | cut -d " " -f 4);
do
@@ -529,6 +533,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
%postun libs -p /sbin/ldconfig
%changelog
+* Tue Jan 15 2013 Jiri Popelka <jpopelka at redhat.com> 3.12.11-3
+- Use the form of import of PIL that is pillow compatible (bug #895266).
+
* Fri Dec 07 2012 Jiri Popelka <jpopelka at redhat.com> 3.12.11-2
- desktop file: remove deprecated Encoding key and Application category
More information about the scm-commits
mailing list