[calibre: 1/2] Fix import of PIL in bundled textile so it will work with python-pillow
Toshio くらとみ
toshio at fedoraproject.org
Mon Jan 14 18:06:28 UTC 2013
commit 7b9cde3c1995dfad45153e1f18a3db20853d3cb3
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Mon Jan 14 10:05:07 2013 -0800
Fix import of PIL in bundled textile so it will work with python-pillow
calibre-pillow.patch | 13 +++++++++++++
calibre.spec | 14 ++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/calibre-pillow.patch b/calibre-pillow.patch
new file mode 100644
index 0000000..afc0ed8
--- /dev/null
+++ b/calibre-pillow.patch
@@ -0,0 +1,13 @@
+Index: calibre/src/calibre/ebooks/textile/functions.py
+===================================================================
+--- calibre.orig/src/calibre/ebooks/textile/functions.py
++++ calibre/src/calibre/ebooks/textile/functions.py
+@@ -86,7 +86,7 @@ def getimagesize(url):
+ """
+
+ try:
+- import ImageFile
++ from PIL import ImageFile
+ import urllib2
+ except ImportError:
+ return None
diff --git a/calibre.spec b/calibre.spec
index 20a9e70..cc5b9ac 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -2,7 +2,7 @@
Name: calibre
Version: 0.9.13
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: E-book converter and library management
Group: Applications/Multimedia
License: GPLv3
@@ -19,12 +19,15 @@ URL: http://calibre-ebook.com/
Source0: %{name}-%{version}-nofonts.tar.xz
Source1: generate-tarball.sh
Source2: calibre-mount-helper
+# The bundled textile needs to be modified to import python-pillow properly.
+# This could go away if we unbundle textile
+Patch0: %{name}-pillow.patch
Patch1: %{name}-no-update.patch
BuildRequires: python >= 2.6
BuildRequires: python-devel >= 2.6
BuildRequires: ImageMagick-devel
-BuildRequires: python-setuptools-devel
+BuildRequires: python-setuptools
BuildRequires: qt4-devel
BuildRequires: PyQt4-devel
BuildRequires: podofo-devel
@@ -86,6 +89,10 @@ RTF, TXT, PDF and LRS.
%prep
%setup -q -n %{name}
+# The bundled textile needs to be modified to import python-pillow properly.
+# This could go away if we unbundle textile
+%patch0 -p1
+
# don't check for new upstream version (that's what packagers do)
%patch1 -p1 -b .no-update
@@ -279,6 +286,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{python_sitelib}/init_calibre.py*
%changelog
+* Mon Jan 14 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 0.9.13-2
+- Fix import of PIL in bundled textile so it will work with python-pillow
+
* Fri Jan 04 2013 Kevin Fenzi <kevin at scrye.com> 0.9.13-1
- Update to 0.9.13
More information about the scm-commits
mailing list