Accepting request 433093 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/433093 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Pillow?expand=0&rev=23
This commit is contained in:
commit
3cce18616b
59
python-Pillow-tests-update-epsilon-for-freetype27.patch
Normal file
59
python-Pillow-tests-update-epsilon-for-freetype27.patch
Normal file
@ -0,0 +1,59 @@
|
||||
Index: Pillow-3.1.1/Tests/test_imagefont.py
|
||||
===================================================================
|
||||
--- Pillow-3.1.1.orig/Tests/test_imagefont.py
|
||||
+++ Pillow-3.1.1/Tests/test_imagefont.py
|
||||
@@ -124,7 +124,9 @@ try:
|
||||
|
||||
target = 'Tests/images/rectangle_surrounding_text.png'
|
||||
target_img = Image.open(target)
|
||||
- self.assert_image_similar(im, target_img, .5)
|
||||
+ # Original epsilon=0.5 causes the test to fail with freetype >= 2.7
|
||||
+ # Setting it to ~2.5 fixes this failure
|
||||
+ self.assert_image_similar(im, target_img, 2.5)
|
||||
|
||||
def test_render_multiline(self):
|
||||
im = Image.new(mode='RGB', size=(300, 100))
|
||||
@@ -143,7 +145,9 @@ try:
|
||||
# some versions of freetype have different horizontal spacing.
|
||||
# setting a tight epsilon, I'm showing the original test failure
|
||||
# at epsilon = ~38.
|
||||
- self.assert_image_similar(im, target_img, .5)
|
||||
+ # Original epsilon=0.5 causes the test to fail with freetype >= 2.7
|
||||
+ # Setting it to ~6.5 fixes this failure
|
||||
+ self.assert_image_similar(im, target_img, 6.2)
|
||||
|
||||
def test_render_multiline_text(self):
|
||||
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
|
||||
@@ -157,7 +161,9 @@ try:
|
||||
target = 'Tests/images/multiline_text.png'
|
||||
target_img = Image.open(target)
|
||||
|
||||
- self.assert_image_similar(im, target_img, .5)
|
||||
+ # Original epsilon=0.5 causes the test to fail with freetype >= 2.7
|
||||
+ # Setting it to ~6.5 fixes this failure
|
||||
+ self.assert_image_similar(im, target_img, 6.2)
|
||||
|
||||
# Test align center and right
|
||||
for align, ext in {"center": "_center",
|
||||
@@ -169,7 +175,9 @@ try:
|
||||
target = 'Tests/images/multiline_text'+ext+'.png'
|
||||
target_img = Image.open(target)
|
||||
|
||||
- self.assert_image_similar(im, target_img, .5)
|
||||
+ # Original epsilon=0.5 causes the test to fail with freetype >= 2.7
|
||||
+ # Setting it to ~6.5 fixes this failure
|
||||
+ self.assert_image_similar(im, target_img, 6.2)
|
||||
|
||||
def test_unknown_align(self):
|
||||
im = Image.new(mode='RGB', size=(300, 100))
|
||||
@@ -210,7 +218,9 @@ try:
|
||||
target = 'Tests/images/multiline_text_spacing.png'
|
||||
target_img = Image.open(target)
|
||||
|
||||
- self.assert_image_similar(im, target_img, .5)
|
||||
+ # Original epsilon=0.5 causes the test to fail with freetype >= 2.7
|
||||
+ # Setting it to ~6.5 fixes this failure
|
||||
+ self.assert_image_similar(im, target_img, 6.2)
|
||||
|
||||
def test_rotated_transposed_font(self):
|
||||
img_grey = Image.new("L", (100, 100))
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 29 01:13:38 UTC 2016 - badshah400@gmail.com
|
||||
|
||||
- Add python-Pillow-tests-update-epsilon-for-freetype27.patch: Fix
|
||||
buildfailures against freetype 2.7 by increasing the epsilon
|
||||
(gh#python-pillow/Pillow#2116); this seems to be the recommended
|
||||
solution by upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 23 00:16:32 CEST 2016 - ro@suse.de
|
||||
|
||||
|
@ -24,6 +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-FIX-UPSTREAM python-Pillow-tests-update-epsilon-for-freetype27.patch gh#python-pillow/Pillow#2116 badshah400@gmail.com -- Fix buildfailures against freetype 2.7 by increasing the epsilon
|
||||
Patch0: python-Pillow-tests-update-epsilon-for-freetype27.patch
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-tk
|
||||
@ -91,6 +93,7 @@ Python Imaging Library by Fredrik Lundh and Contributors.
|
||||
|
||||
%prep
|
||||
%setup -q -n Pillow-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# no need to build it here, as setup.py install will build it again, anyway
|
||||
|
Loading…
Reference in New Issue
Block a user