diff --git a/python-pillow.spec b/python-pillow.spec index 601dc04..e4b8042 100644 --- a/python-pillow.spec +++ b/python-pillow.spec @@ -17,7 +17,7 @@ Name: python-pillow Version: 2.0.0 -Release: 7%{?snap}%{?dist} +Release: 8%{?snap}%{?dist} Summary: Python image processing library # License: see http://www.pythonware.com/products/pil/license.htm @@ -30,6 +30,8 @@ Source0: https://github.com/python-imaging/Pillow/tarball/%{commit}/pytho # Add s390* and ppc* archs Patch0: python-pillow-archs.patch +# Fix test hardcoded for little-endian +Patch1: python-pillow_endian.patch BuildRequires: python2-devel BuildRequires: python-setuptools @@ -193,6 +195,7 @@ PIL image wrapper for Qt. %prep %setup -q -n python-imaging-Pillow-%{shortcommit} %patch0 -p1 -b .archs +%patch1 -p1 -b .endian %if %{with_python3} # Create Python 3 source tree @@ -350,6 +353,9 @@ popd %endif %changelog +* Wed May 08 2013 Sandro Mani - 2.0.0-8.gitd1c6db8 +- Add patch to fix test failure on big-endian + * Thu Apr 25 2013 Toshio Kuratomi - 2.0.0-7.gitd1c6db8 - Remove Obsoletes in the python-pillow-qt subpackage. Obsoletes isn't appropriate since qt support didn't exist in the previous python-pillow diff --git a/python-pillow_endian.patch b/python-pillow_endian.patch new file mode 100644 index 0000000..20e4dd7 --- /dev/null +++ b/python-pillow_endian.patch @@ -0,0 +1,14 @@ +--- python-imaging-Pillow-d1c6db8/Tests/test_numpy.py 2013-04-19 02:11:52.000000000 +0200 ++++ python-imaging-Pillow-d1c6db8/Tests/test_numpy.py 2013-05-07 23:50:38.425987793 +0200 +@@ -41,7 +41,10 @@ def test_numpy_to_image(): + assert_exception(TypeError, lambda: to_image(numpy.uint64)) + + assert_image(to_image(numpy.int8), "I", (10, 10)) +- assert_image(to_image(numpy.int16), "I;16", (10, 10)) ++ if Image._ENDIAN == '<': # Little endian ++ assert_image(to_image(numpy.int16), "I;16", (10, 10)) ++ else: ++ assert_image(to_image(numpy.int16), "I;16B", (10, 10)) + assert_image(to_image(numpy.int32), "I", (10, 10)) + assert_exception(TypeError, lambda: to_image(numpy.int64)) +