Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pillow/files/, dev-python/pillow/
Date: Fri, 07 Sep 2018 18:46:20
Message-Id: 1536345931.33875ec2cd5306aad166cb0e5202f6342c3a2f95.vdupras@gentoo
1 commit: 33875ec2cd5306aad166cb0e5202f6342c3a2f95
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 7 18:43:59 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 7 18:45:31 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33875ec2
7
8 dev-python/pillow: re-support pypy
9
10 pypy support had been dropped in pillow 4.3 ebuild and is being
11 re-introduced now. Tests pass.
12
13 This required a little bit of library path fiddling in setup.py, the
14 root cause of it being that `sysconfig.get_config_var('prefix')` under
15 pypy doesn't return the same thing as with CPython. This fiddling was
16 required if we wanted to keep the --disable-platform-guessing flag.
17
18 I tried not to break the fix that was done in bug 661830.
19
20 I've tried pypy3, but not all tests passed. I didn't investigate further
21 (I'm just trying to return to pre-4.3 levels so that we can stabilize)
22
23 Bug: https://bugs.gentoo.org/661830
24 Closes: https://bugs.gentoo.org/608620
25 Package-Manager: Portage-2.3.49, Repoman-2.3.10
26
27 dev-python/pillow/files/pillow-5.2.0-fix-lib-paths.patch | 16 ++++++++++++++++
28 dev-python/pillow/files/pillow-5.2.0-no-usr-lib.patch | 12 ------------
29 dev-python/pillow/pillow-5.2.0.ebuild | 4 ++--
30 3 files changed, 18 insertions(+), 14 deletions(-)
31
32 diff --git a/dev-python/pillow/files/pillow-5.2.0-fix-lib-paths.patch b/dev-python/pillow/files/pillow-5.2.0-fix-lib-paths.patch
33 new file mode 100644
34 index 00000000000..b73681831a6
35 --- /dev/null
36 +++ b/dev-python/pillow/files/pillow-5.2.0-fix-lib-paths.patch
37 @@ -0,0 +1,16 @@
38 +diff --git a/setup.py b/setup.py
39 +index 761d552c..c4a55092 100755
40 +--- a/setup.py
41 ++++ b/setup.py
42 +@@ -435,6 +435,11 @@ class pil_build_ext(build_ext):
43 + _add_directory(include_dirs,
44 + os.path.join(best_path, 'include'))
45 +
46 ++ # The logic above fails in many cases (such as pypy builds) and we fix
47 ++ # it here by making sure we look in standard places first.
48 ++ library_dirs = ['/usr/lib64', '/usr/lib'] + library_dirs
49 ++ include_dirs = ['/usr/include'] + include_dirs
50 ++
51 + #
52 + # insert new dirs *before* default libs, to avoid conflicts
53 + # between Python PYD stub libs and real libraries
54
55 diff --git a/dev-python/pillow/files/pillow-5.2.0-no-usr-lib.patch b/dev-python/pillow/files/pillow-5.2.0-no-usr-lib.patch
56 deleted file mode 100644
57 index 4b6cc50eaf5..00000000000
58 --- a/dev-python/pillow/files/pillow-5.2.0-no-usr-lib.patch
59 +++ /dev/null
60 @@ -1,12 +0,0 @@
61 ---- a/setup.py 2018-07-22 22:09:23.840195059 +0300
62 -+++ a/setup.py 2018-07-22 22:11:43.400626135 +0300
63 -@@ -258,9 +258,8 @@
64 - _add_directory(library_dirs, d)
65 -
66 - prefix = sysconfig.get_config_var("prefix")
67 - if prefix:
68 -- _add_directory(library_dirs, os.path.join(prefix, "lib"))
69 - _add_directory(include_dirs, os.path.join(prefix, "include"))
70 -
71 - #
72 - # add platform directories
73
74 diff --git a/dev-python/pillow/pillow-5.2.0.ebuild b/dev-python/pillow/pillow-5.2.0.ebuild
75 index 406d711de0d..04ae4108561 100644
76 --- a/dev-python/pillow/pillow-5.2.0.ebuild
77 +++ b/dev-python/pillow/pillow-5.2.0.ebuild
78 @@ -3,7 +3,7 @@
79
80 EAPI=7
81
82 -PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
83 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
84 PYTHON_REQ_USE='tk?,threads(+)'
85
86 inherit distutils-r1 virtualx
87 @@ -47,7 +47,7 @@ DEPEND="${RDEPEND}
88 S="${WORKDIR}/${MY_P}"
89
90 PATCHES=(
91 - "${FILESDIR}/${PN}-5.2.0-no-usr-lib.patch"
92 + "${FILESDIR}/${PN}-5.2.0-fix-lib-paths.patch"
93 )
94
95 python_configure_all() {