Accepting request 284878 from devel:languages:python

Update

OBS-URL: https://build.opensuse.org/request/show/284878
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Pillow?expand=0&rev=12
This commit is contained in:
Dominique Leuenberger 2015-02-10 19:23:17 +00:00 committed by Git OBS Bridge
commit e9b43844da
3 changed files with 25 additions and 0 deletions

17
Pillow-fixtests.patch Normal file
View File

@ -0,0 +1,17 @@
diff --git a/Tests/test_file_webp_alpha.py b/Tests/test_file_webp_alpha.py
index 22c5c09..f316b71 100644
--- a/Tests/test_file_webp_alpha.py
+++ b/Tests/test_file_webp_alpha.py
@@ -83,7 +83,11 @@ class TestFileWebpAlpha(PillowTestCase):
image.load()
image.getdata()
- self.assert_image_similar(image, pil_image, 1.0)
+ # early versions of webp are known to produce higher deviations: deal with it
+ if _webp.WebPDecoderVersion(self) <= 0x201:
+ self.assert_image_similar(image, pil_image, 3.0)
+ else:
+ self.assert_image_similar(image, pil_image, 1.0)
if __name__ == '__main__':

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 6 08:25:34 UTC 2015 - hpj@urpla.net
- fix test for lossy webp alpha deviation of earlier lib versions
* Add Pillow-fixtests.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 8 10:55:04 UTC 2015 - tbechtold@suse.com Thu Jan 8 10:55:04 UTC 2015 - tbechtold@suse.com

View File

@ -24,6 +24,7 @@ License: HPND
Group: Development/Languages/Python Group: Development/Languages/Python
Url: http://python-imaging.github.io/ Url: http://python-imaging.github.io/
Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz
Patch: Pillow-fixtests.patch
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: python-tk BuildRequires: python-tk
@ -85,6 +86,7 @@ Python Imaging Library by Fredrik Lundh and Contributors.
%prep %prep
%setup -q -n Pillow-%{version} %setup -q -n Pillow-%{version}
%patch -p1
%build %build
python setup.py build python setup.py build