[python-textile] Add patch to support pillow (bz 896295).

Thomas Moschny thm at fedoraproject.org
Wed Jan 30 18:28:27 UTC 2013


commit 9b53beadf988e31ce5cd82e9e9a4895c2a32958d
Author: Thomas Moschny <thm at fedoraproject.org>
Date:   Wed Jan 30 19:27:19 2013 +0100

    Add patch to support pillow (bz 896295).

 python-textile-2.1.5-pillow.patch |   34 ++++++++++++++++++++++++++++++++++
 python-textile.spec               |    8 +++++++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/python-textile-2.1.5-pillow.patch b/python-textile-2.1.5-pillow.patch
new file mode 100644
index 0000000..bc88da6
--- /dev/null
+++ b/python-textile-2.1.5-pillow.patch
@@ -0,0 +1,34 @@
+Index: textile-2.1.5/textile/tests/__init__.py
+===================================================================
+--- textile-2.1.5.orig/textile/tests/__init__.py
++++ textile-2.1.5/textile/tests/__init__.py
+@@ -426,7 +426,7 @@ class Tests():
+ 
+     def testImageSize(self):
+         try:
+-            import ImageFile
++            from PIL import ImageFile
+         except ImportError:
+             raise SkipTest()
+ 
+Index: textile-2.1.5/textile/tools/imagesize.py
+===================================================================
+--- textile-2.1.5.orig/textile/tools/imagesize.py
++++ textile-2.1.5/textile/tools/imagesize.py
+@@ -14,7 +14,7 @@ def getimagesize(url):
+     """
+ 
+     try:
+-        import ImageFile
++        from PIL import ImageFile
+         import urllib2
+     except ImportError:
+         return ''
+@@ -36,6 +36,6 @@ def getimagesize(url):
+ def setup_module(module):
+     from nose.plugins.skip import SkipTest
+     try:
+-        import ImageFile
++        from PIL import ImageFile
+     except ImportError:
+         raise SkipTest()
diff --git a/python-textile.spec b/python-textile.spec
index 568ec9e..5d81d18 100644
--- a/python-textile.spec
+++ b/python-textile.spec
@@ -4,7 +4,7 @@
 
 Name:           python-%{srcname}
 Version:        2.1.5
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A Humane Web Text Generator
 Group:          Development/Languages
 License:        BSD
@@ -12,6 +12,8 @@ URL:            http://loopcore.com/python-textile
 Source0:        http://pypi.python.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz
 Source1:        http://github.com/sebix/python-textile/raw/4554407d0a456e3a77403c998d4a724e8a523d54/README.textile
 Source2:        http://github.com/sebix/python-textile/raw/4554407d0a456e3a77403c998d4a724e8a523d54/LICENSE.txt
+# see https://github.com/sebix/python-textile/pull/10
+Patch0:         python-textile-2.1.5-pillow.patch
 BuildArch:      noarch
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools-devel
@@ -26,6 +28,7 @@ MathML translation, Python code coloring and much more.
 
 %prep
 %setup -q -n %{srcname}-%{version}
+%patch0 -p1
 cp -a %SOURCE1 .
 cp -a %SOURCE2 .
 
@@ -55,6 +58,9 @@ PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} \
 
 
 %changelog
+* Wed Jan 30 2013 Thomas Moschny <thomas.moschny at gmx.de> - 2.1.5-2
+- Add patch to support pillow (bz 896295).
+
 * Fri Nov 23 2012 Thomas Moschny <thomas.moschny at gmx.de> - 2.1.5-1
 - Update to 2.1.5.
 - Include LICENSE.txt.


More information about the scm-commits mailing list