From 046b60f43585554016c156b76e73c74363e6fa1bf4ef82f51a16dd1966b81306 Mon Sep 17 00:00:00 2001 From: Denisart Benjamin Date: Tue, 21 Apr 2015 14:51:58 +0000 Subject: [PATCH] Accepting request 298321 from home:tbechtold:branches:devel:languages:python Fix tests for SLE11SP3 OBS-URL: https://build.opensuse.org/request/show/298321 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pillow?expand=0&rev=30 --- fix-textsize-equal.patch | 13 +++++++++++++ python-Pillow.changes | 6 +++++- python-Pillow.spec | 8 +++++--- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 fix-textsize-equal.patch diff --git a/fix-textsize-equal.patch b/fix-textsize-equal.patch new file mode 100644 index 0000000..293e965 --- /dev/null +++ b/fix-textsize-equal.patch @@ -0,0 +1,13 @@ +Index: Pillow-2.7.0/Tests/test_imagefont.py +=================================================================== +--- Pillow-2.7.0.orig/Tests/test_imagefont.py ++++ Pillow-2.7.0/Tests/test_imagefont.py +@@ -108,7 +108,7 @@ try: + + target = 'Tests/images/rectangle_surrounding_text.png' + target_img = Image.open(target) +- self.assert_image_equal(im, target_img) ++ self.assert_image_similar(im, target_img, .5) + + def test_render_multiline(self): + im = Image.new(mode='RGB', size=(300, 100)) diff --git a/python-Pillow.changes b/python-Pillow.changes index 2b51e3c..2fc3387 100644 --- a/python-Pillow.changes +++ b/python-Pillow.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 21 14:13:51 UTC 2015 - tbechtold@suse.com + +- Add fix-textsize-equal.patch. Fixes testsuite on SLE11SP3 + ------------------------------------------------------------------- Fri Feb 6 08:25:34 UTC 2015 - hpj@urpla.net @@ -37,7 +42,6 @@ Thu Jan 8 10:55:04 UTC 2015 - tbechtold@suse.com - Fix potential PNG decompression DOS #1060 - Fix Regression in PyPy 2.4 in streamio #958 - ------------------------------------------------------------------- Tue Nov 18 14:13:46 UTC 2014 - toddrme2178@gmail.com diff --git a/python-Pillow.spec b/python-Pillow.spec index dd8f03f..c5930c1 100644 --- a/python-Pillow.spec +++ b/python-Pillow.spec @@ -1,7 +1,7 @@ # # spec file for package python-Pillow # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,8 @@ License: HPND Group: Development/Languages/Python Url: http://python-imaging.github.io/ Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz -Patch: Pillow-fixtests.patch +Patch0: Pillow-fixtests.patch +Patch1: fix-textsize-equal.patch BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-tk @@ -86,7 +87,8 @@ Python Imaging Library by Fredrik Lundh and Contributors. %prep %setup -q -n Pillow-%{version} -%patch -p1 +%patch0 -p1 +%patch1 -p1 %build python setup.py build