1 |
commit: 9568918f494bc25512465018c824efa849b75110 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 3 04:24:16 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 3 04:24:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9568918f |
7 |
|
8 |
dev-python/pillow: add 9.0.1 |
9 |
|
10 |
Add 9.0.1-r1 with PEP 517 too, but we're not yet ready to stable that. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/832598 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
dev-python/pillow/Manifest | 1 + |
16 |
dev-python/pillow/pillow-9.0.1-r1.ebuild | 115 +++++++++++++++++++++++++++++++ |
17 |
dev-python/pillow/pillow-9.0.1.ebuild | 106 ++++++++++++++++++++++++++++ |
18 |
3 files changed, 222 insertions(+) |
19 |
|
20 |
diff --git a/dev-python/pillow/Manifest b/dev-python/pillow/Manifest |
21 |
index cb676a730573..068ecc763107 100644 |
22 |
--- a/dev-python/pillow/Manifest |
23 |
+++ b/dev-python/pillow/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST pillow-9.0.0.tar.gz 49510604 BLAKE2B c3b0d07e8fe280e3a253067c4da18ac2dee40d216280632d58ddaa7848e13a165587b9aca61c98f8b5380e53d6d59a4097320bacf6e016e236239af518ec7780 SHA512 d2fd74dd1b8824d994e3767ef9794175dd2f4adc8173612432a3e171705723ee8757d299a87fb1c010b40919792c1ca76578f41977ee3303ccb6f75165deb791 |
26 |
+DIST pillow-9.0.1.tar.gz 49512045 BLAKE2B 14f0969c87c57bad8fc38d873bba7a118d666e8b2e62e777ea17197e5ca973b3994bafb56b4464cde4059f2fc4040d73e7ddeec2a1053aeb1f201bf2ec2b38e2 SHA512 73893fe079bb2405c87b73b13b6eff198fb8970a891a7c9586bd2620ea0310d54cb35b1d594c6c6d3859e47d8d467700f987ae32aa6d3dc4a2e9286e8749869e |
27 |
|
28 |
diff --git a/dev-python/pillow/pillow-9.0.1-r1.ebuild b/dev-python/pillow/pillow-9.0.1-r1.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..44f4f456e65e |
31 |
--- /dev/null |
32 |
+++ b/dev-python/pillow/pillow-9.0.1-r1.ebuild |
33 |
@@ -0,0 +1,115 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+DISTUTILS_USE_PEP517=setuptools |
40 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
41 |
+PYTHON_REQ_USE='tk?,threads(+)' |
42 |
+ |
43 |
+inherit distutils-r1 toolchain-funcs virtualx |
44 |
+ |
45 |
+MY_PN=Pillow |
46 |
+MY_P=${MY_PN}-${PV} |
47 |
+ |
48 |
+DESCRIPTION="Python Imaging Library (fork)" |
49 |
+HOMEPAGE="https://python-pillow.org/" |
50 |
+SRC_URI="https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz -> ${P}.tar.gz" |
51 |
+S="${WORKDIR}/${MY_P}" |
52 |
+ |
53 |
+LICENSE="HPND" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" |
56 |
+IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" |
57 |
+REQUIRED_USE="test? ( jpeg jpeg2k tiff truetype )" |
58 |
+RESTRICT="!test? ( test )" |
59 |
+ |
60 |
+DEPEND=" |
61 |
+ imagequant? ( media-gfx/libimagequant:0 ) |
62 |
+ jpeg? ( virtual/jpeg:0 ) |
63 |
+ jpeg2k? ( media-libs/openjpeg:2= ) |
64 |
+ lcms? ( media-libs/lcms:2= ) |
65 |
+ tiff? ( media-libs/tiff:0=[jpeg,zlib] ) |
66 |
+ truetype? ( media-libs/freetype:2= ) |
67 |
+ webp? ( media-libs/libwebp:0= ) |
68 |
+ xcb? ( x11-libs/libxcb ) |
69 |
+ zlib? ( sys-libs/zlib:0= )" |
70 |
+RDEPEND="${DEPEND} |
71 |
+ dev-python/olefile[${PYTHON_USEDEP}]" |
72 |
+BDEPEND=" |
73 |
+ virtual/pkgconfig |
74 |
+ test? ( |
75 |
+ ${RDEPEND} |
76 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
77 |
+ || ( |
78 |
+ media-gfx/imagemagick[png] |
79 |
+ media-gfx/graphicsmagick[png] |
80 |
+ ) |
81 |
+ ) |
82 |
+" |
83 |
+ |
84 |
+EPYTEST_DESELECT=( |
85 |
+ # Fails because of ghostscript? |
86 |
+ Tests/test_file_eps.py::test_showpage |
87 |
+ Tests/test_file_eps.py::test_bytesio_object |
88 |
+ Tests/test_file_eps.py::test_render_scale1 |
89 |
+ Tests/test_file_eps.py::test_render_scale2 |
90 |
+) |
91 |
+ |
92 |
+usepil() { |
93 |
+ usex "${1}" enable disable |
94 |
+} |
95 |
+ |
96 |
+python_configure_all() { |
97 |
+ # It's important that these flags are also passed during the install phase |
98 |
+ # as well. Make sure of that if you change the lines below. See bug 661308. |
99 |
+ cat >> setup.cfg <<-EOF || die |
100 |
+ [build_ext] |
101 |
+ disable_platform_guessing = True |
102 |
+ $(usepil truetype)_freetype = True |
103 |
+ $(usepil jpeg)_jpeg = True |
104 |
+ $(usepil jpeg2k)_jpeg2000 = True |
105 |
+ $(usepil lcms)_lcms = True |
106 |
+ $(usepil tiff)_tiff = True |
107 |
+ $(usepil imagequant)_imagequant = True |
108 |
+ $(usepil webp)_webp = True |
109 |
+ $(usepil webp)_webpmux = True |
110 |
+ $(usepil xcb)_xcb = True |
111 |
+ $(usepil zlib)_zlib = True |
112 |
+ EOF |
113 |
+ |
114 |
+ # setup.py sucks at adding the right toolchain paths but it does |
115 |
+ # accept additional ones from INCLUDE and LIB so set these. You |
116 |
+ # wouldn't normally need these at all as the toolchain should look |
117 |
+ # here anyway but this setup.py does stupid things. |
118 |
+ export \ |
119 |
+ INCLUDE="${ESYSROOT}"/usr/include \ |
120 |
+ LIB="${ESYSROOT}"/usr/$(get_libdir) |
121 |
+ |
122 |
+ # We have patched in this env var. |
123 |
+ tc-export PKG_CONFIG |
124 |
+} |
125 |
+ |
126 |
+src_test() { |
127 |
+ virtx distutils-r1_src_test |
128 |
+} |
129 |
+ |
130 |
+python_test() { |
131 |
+ "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" |
132 |
+ # no:relaxed: pytest-relaxed plugin make our tests fail. deactivate if installed |
133 |
+ epytest -p no:relaxed || die "Tests failed with ${EPYTHON}" |
134 |
+} |
135 |
+ |
136 |
+python_install() { |
137 |
+ python_doheader src/libImaging/*.h |
138 |
+ distutils-r1_python_install |
139 |
+} |
140 |
+ |
141 |
+python_install_all() { |
142 |
+ if use examples ; then |
143 |
+ docinto example |
144 |
+ dodoc docs/example/* |
145 |
+ docompress -x /usr/share/doc/${PF}/example |
146 |
+ fi |
147 |
+ distutils-r1_python_install_all |
148 |
+} |
149 |
|
150 |
diff --git a/dev-python/pillow/pillow-9.0.1.ebuild b/dev-python/pillow/pillow-9.0.1.ebuild |
151 |
new file mode 100644 |
152 |
index 000000000000..b206e1b4a21a |
153 |
--- /dev/null |
154 |
+++ b/dev-python/pillow/pillow-9.0.1.ebuild |
155 |
@@ -0,0 +1,106 @@ |
156 |
+# Copyright 1999-2022 Gentoo Authors |
157 |
+# Distributed under the terms of the GNU General Public License v2 |
158 |
+ |
159 |
+EAPI=8 |
160 |
+ |
161 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
162 |
+PYTHON_REQ_USE='tk?,threads(+)' |
163 |
+ |
164 |
+inherit distutils-r1 toolchain-funcs virtualx |
165 |
+ |
166 |
+MY_PN=Pillow |
167 |
+MY_P=${MY_PN}-${PV} |
168 |
+ |
169 |
+DESCRIPTION="Python Imaging Library (fork)" |
170 |
+HOMEPAGE="https://python-pillow.org/" |
171 |
+SRC_URI="https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz -> ${P}.tar.gz" |
172 |
+S="${WORKDIR}/${MY_P}" |
173 |
+ |
174 |
+LICENSE="HPND" |
175 |
+SLOT="0" |
176 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" |
177 |
+IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" |
178 |
+REQUIRED_USE="test? ( jpeg jpeg2k tiff truetype )" |
179 |
+RESTRICT="!test? ( test )" |
180 |
+ |
181 |
+DEPEND=" |
182 |
+ imagequant? ( media-gfx/libimagequant:0 ) |
183 |
+ jpeg? ( virtual/jpeg:0 ) |
184 |
+ jpeg2k? ( media-libs/openjpeg:2= ) |
185 |
+ lcms? ( media-libs/lcms:2= ) |
186 |
+ tiff? ( media-libs/tiff:0=[jpeg,zlib] ) |
187 |
+ truetype? ( media-libs/freetype:2= ) |
188 |
+ webp? ( media-libs/libwebp:0= ) |
189 |
+ xcb? ( x11-libs/libxcb ) |
190 |
+ zlib? ( sys-libs/zlib:0= )" |
191 |
+RDEPEND="${DEPEND} |
192 |
+ dev-python/olefile[${PYTHON_USEDEP}]" |
193 |
+BDEPEND=" |
194 |
+ virtual/pkgconfig |
195 |
+ test? ( |
196 |
+ ${RDEPEND} |
197 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
198 |
+ || ( |
199 |
+ media-gfx/imagemagick[png] |
200 |
+ media-gfx/graphicsmagick[png] |
201 |
+ ) |
202 |
+ ) |
203 |
+" |
204 |
+ |
205 |
+EPYTEST_DESELECT=( |
206 |
+ # Fails because of ghostscript? |
207 |
+ Tests/test_file_eps.py::test_showpage |
208 |
+ Tests/test_file_eps.py::test_bytesio_object |
209 |
+ Tests/test_file_eps.py::test_render_scale1 |
210 |
+ Tests/test_file_eps.py::test_render_scale2 |
211 |
+) |
212 |
+ |
213 |
+python_configure_all() { |
214 |
+ # It's important that these flags are also passed during the install phase |
215 |
+ # as well. Make sure of that if you change the lines below. See bug 661308. |
216 |
+ DISTUTILS_ARGS=( |
217 |
+ build_ext |
218 |
+ --disable-platform-guessing |
219 |
+ $(use_enable truetype freetype) |
220 |
+ $(use_enable jpeg) |
221 |
+ $(use_enable jpeg2k jpeg2000) |
222 |
+ $(use_enable lcms) |
223 |
+ $(use_enable tiff) |
224 |
+ $(use_enable imagequant) |
225 |
+ $(use_enable webp) |
226 |
+ $(use_enable webp webpmux) |
227 |
+ $(use_enable xcb) |
228 |
+ $(use_enable zlib) |
229 |
+ ) |
230 |
+ |
231 |
+ # setup.py sucks at adding the right toolchain paths but it does |
232 |
+ # accept additional ones from INCLUDE and LIB so set these. You |
233 |
+ # wouldn't normally need these at all as the toolchain should look |
234 |
+ # here anyway but this setup.py does stupid things. |
235 |
+ export \ |
236 |
+ INCLUDE="${ESYSROOT}"/usr/include \ |
237 |
+ LIB="${ESYSROOT}"/usr/$(get_libdir) |
238 |
+ |
239 |
+ # We have patched in this env var. |
240 |
+ tc-export PKG_CONFIG |
241 |
+} |
242 |
+ |
243 |
+python_test() { |
244 |
+ "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" |
245 |
+ # no:relaxed: pytest-relaxed plugin make our tests fail. deactivate if installed |
246 |
+ virtx epytest -p no:relaxed |
247 |
+} |
248 |
+ |
249 |
+python_install() { |
250 |
+ python_doheader src/libImaging/*.h |
251 |
+ distutils-r1_python_install |
252 |
+} |
253 |
+ |
254 |
+python_install_all() { |
255 |
+ if use examples ; then |
256 |
+ docinto example |
257 |
+ dodoc docs/example/* |
258 |
+ docompress -x /usr/share/doc/${PF}/example |
259 |
+ fi |
260 |
+ distutils-r1_python_install_all |
261 |
+} |