Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pillow/
Date: Sun, 30 Oct 2022 06:39:58
Message-Id: 1667111642.7070145d23e04910d83818060ff2e822389a558e.mgorny@gentoo
1 commit: 7070145d23e04910d83818060ff2e822389a558e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 05:43:59 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 06:34:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7070145d
7
8 dev-python/pillow: Bump to 9.3.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pillow/Manifest | 1 +
13 dev-python/pillow/pillow-9.3.0.ebuild | 125 ++++++++++++++++++++++++++++++++++
14 2 files changed, 126 insertions(+)
15
16 diff --git a/dev-python/pillow/Manifest b/dev-python/pillow/Manifest
17 index e73a55dc8b3e..c5393be9f468 100644
18 --- a/dev-python/pillow/Manifest
19 +++ b/dev-python/pillow/Manifest
20 @@ -1,2 +1,3 @@
21 DIST pillow-9.1.1.tar.gz 49753799 BLAKE2B 969a338f768951c340177d0590c50ba1213f48810870ac3fdbc2556c57344e356e0cf1ef080bde29bf89291adbf9f64b2dd1f950260d2ce5c0eb28d197f2dfe2 SHA512 8c05c0af6be992667d764046c6d7c189e1486d6ab987474c15e3bc8a64b9955d4c91d94b94ea46ef6d1c6f343ba424240dfa7d758c666bec40fa580728206a5f
22 DIST pillow-9.2.0.gh.tar.gz 50018953 BLAKE2B 72dc1175c08276531c5949f0eb19bdce37afb25303614d489375c57aba19c5f708db7d149a033490f95848bdd6b4249dd36993205069e7f471a2efd602cb3ac4 SHA512 02926d6c88aa8bc0df05b0ecd04b9852821a6400a24c6e70b66d4092eb3174139dee116adfa94ba8b7f3df8f6725cc68b32705f308f4347153e0112d987fc5f2
23 +DIST pillow-9.3.0.gh.tar.gz 50370806 BLAKE2B d0d4775c8b60e40560328e4f1c14055743d1a826b0ab01353075f1f48a461bcd8bf5883f18713976399f9b0f688125f3a883ea5818a359db9e540aac8895f02a SHA512 60c529d8a222a521a0c3f4254917aa3f6c5a47c7cb8930b4b9a05ef442d1a7e776018dc4ac834a9effc1342f8457898cae79820531ff430728f6c39d6297b2d7
24
25 diff --git a/dev-python/pillow/pillow-9.3.0.ebuild b/dev-python/pillow/pillow-9.3.0.ebuild
26 new file mode 100644
27 index 000000000000..351a6629aba3
28 --- /dev/null
29 +++ b/dev-python/pillow/pillow-9.3.0.ebuild
30 @@ -0,0 +1,125 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..11} pypy3 )
38 +PYTHON_REQ_USE='tk?,threads(+)'
39 +
40 +inherit distutils-r1 toolchain-funcs virtualx
41 +
42 +MY_PN=Pillow
43 +MY_P=${MY_PN}-${PV}
44 +
45 +DESCRIPTION="Python Imaging Library (fork)"
46 +HOMEPAGE="
47 + https://python-pillow.org/
48 + https://github.com/python-pillow/
49 + https://pypi.org/project/Pillow/
50 +"
51 +SRC_URI="
52 + https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz
53 + -> ${P}.gh.tar.gz
54 +"
55 +S="${WORKDIR}/${MY_P}"
56 +
57 +LICENSE="HPND"
58 +SLOT="0"
59 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
60 +IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib"
61 +REQUIRED_USE="test? ( jpeg jpeg2k tiff truetype )"
62 +RESTRICT="!test? ( test )"
63 +
64 +DEPEND="
65 + imagequant? ( media-gfx/libimagequant:0 )
66 + jpeg? ( media-libs/libjpeg-turbo )
67 + jpeg2k? ( media-libs/openjpeg:2= )
68 + lcms? ( media-libs/lcms:2= )
69 + tiff? ( media-libs/tiff:0=[jpeg,zlib] )
70 + truetype? ( media-libs/freetype:2= )
71 + webp? ( media-libs/libwebp:0= )
72 + xcb? ( x11-libs/libxcb )
73 + zlib? ( sys-libs/zlib:0= )
74 +"
75 +RDEPEND="
76 + ${DEPEND}
77 + dev-python/olefile[${PYTHON_USEDEP}]
78 +"
79 +BDEPEND="
80 + virtual/pkgconfig
81 + test? (
82 + ${RDEPEND}
83 + dev-python/defusedxml[${PYTHON_USEDEP}]
84 + dev-python/packaging[${PYTHON_USEDEP}]
85 + dev-python/pytest[${PYTHON_USEDEP}]
86 + dev-python/pytest-timeout[${PYTHON_USEDEP}]
87 + || (
88 + media-gfx/imagemagick[png]
89 + media-gfx/graphicsmagick[png]
90 + )
91 + )
92 +"
93 +
94 +EPYTEST_DESELECT=(
95 + # TODO; incompatible Qt version?
96 + Tests/test_qt_image_qapplication.py::test_sanity
97 +)
98 +
99 +usepil() {
100 + usex "${1}" enable disable
101 +}
102 +
103 +python_configure_all() {
104 + # It's important that these flags are also passed during the install phase
105 + # as well. Make sure of that if you change the lines below. See bug 661308.
106 + cat >> setup.cfg <<-EOF || die
107 + [build_ext]
108 + disable_platform_guessing = True
109 + $(usepil truetype)_freetype = True
110 + $(usepil jpeg)_jpeg = True
111 + $(usepil jpeg2k)_jpeg2000 = True
112 + $(usepil lcms)_lcms = True
113 + $(usepil tiff)_tiff = True
114 + $(usepil imagequant)_imagequant = True
115 + $(usepil webp)_webp = True
116 + $(usepil webp)_webpmux = True
117 + $(usepil xcb)_xcb = True
118 + $(usepil zlib)_zlib = True
119 + EOF
120 +
121 + # setup.py won't let us add the right toolchain paths but it does
122 + # accept additional ones from INCLUDE and LIB so set these. You
123 + # wouldn't normally need these at all as the toolchain should look
124 + # here anyway but it doesn't for this setup.py.
125 + export \
126 + INCLUDE="${ESYSROOT}"/usr/include \
127 + LIB="${ESYSROOT}"/usr/$(get_libdir)
128 +
129 + # We have patched in this env var.
130 + tc-export PKG_CONFIG
131 +}
132 +
133 +src_test() {
134 + virtx distutils-r1_src_test
135 +}
136 +
137 +python_test() {
138 + "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}"
139 + # no:relaxed: pytest-relaxed plugin make our tests fail. deactivate if installed
140 + epytest -p no:relaxed || die "Tests failed with ${EPYTHON}"
141 +}
142 +
143 +python_install() {
144 + python_doheader src/libImaging/*.h
145 + distutils-r1_python_install
146 +}
147 +
148 +python_install_all() {
149 + if use examples ; then
150 + docinto example
151 + dodoc docs/example/*
152 + docompress -x /usr/share/doc/${PF}/example
153 + fi
154 + distutils-r1_python_install_all
155 +}