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-lang/python/
Date: Wed, 07 Sep 2022 14:10:41
Message-Id: 1662558980.cc542d8d26c63b08a07a78c1d8747ad9df5caf43.mgorny@gentoo
1 commit: cc542d8d26c63b08a07a78c1d8747ad9df5caf43
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 7 13:56:20 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 7 13:56:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc542d8d
7
8 dev-lang/python: Bump 3.8.14
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-lang/python/Manifest | 3 +
13 dev-lang/python/python-3.8.14.ebuild | 348 +++++++++++++++++++++++++++++++++++
14 2 files changed, 351 insertions(+)
15
16 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
17 index b44e9aec5f9b..95cd58f448b3 100644
18 --- a/dev-lang/python/Manifest
19 +++ b/dev-lang/python/Manifest
20 @@ -8,6 +8,8 @@ DIST Python-3.11.0rc1.tar.xz 19815524 BLAKE2B 7dae240dbed052667b46927ccbb483a717
21 DIST Python-3.11.0rc1.tar.xz.asc 833 BLAKE2B da46a0ab62ef3f2b7a7921294a0d775ca6ab254e3229338232b3d11107aa1d74adc21911678f08f44cc1cd9184beada00d4b60dde60722ef91a247367b13e191 SHA512 d4cffc90c2ed7b8ea7228a21f7ac902a92f27003f1420ad751b1691de950974ea174cb0471b6e19ed1548dc5382012fa9ad5fcf83c34646c7ea2d73c88799e38
22 DIST Python-3.8.13.tar.xz 19023016 BLAKE2B d3cb8624496e56d93d34f2aa5082746869a99210197529bc19e6a9d265f4ce246e0e83a3528a7602a28aac8855bf84e6bf6495b85e9202fcf04ef90600cb5e43 SHA512 5c732b5d21b189b99a0e9ccd3ae59466bed60a930d5d3f437a262d38f0797b776cecbf12a1852eaebcfb638a6f2e28e471cc2ebf94237cc728144be21842cb81
23 DIST Python-3.8.13.tar.xz.asc 833 BLAKE2B 918894777e1a783f2a7c7958a808610631cb7a6039df84675158e8d2fd66782f29921d44ab9b4625c4ca3821852e0d0e0005163b086c7d0c3d617e3a76cb7033 SHA512 6683c4ae6cf20a97a29165f96b9f5dd09d618892583650d803aa677240695968dfe344294fc33db68fd4669c82021afcc29a1f6afe49915be51fae281eeeedbe
24 +DIST Python-3.8.14.tar.xz 19031932 BLAKE2B 5044743ba4d0b9dd634b42c08e6693126ee396a75b4b728e80333aaac94ade447a12bed16e29d32c480fd670e75b44315ea6951489cc9b85c7fd385116b383ef SHA512 380de19b461e71e268943ef555b78ba68814f4ff77a7576fbcd45d6690db750590213171e1905326b8bcb217070adf66228a00792350293ec6575c20b27a6cc3
25 +DIST Python-3.8.14.tar.xz.asc 833 BLAKE2B fe4ae94ecc96ea78089d36db79922825d0207301ab45ab202c2333d7b16cce2699446699614ab0e96ff58ddc6488734697c1c47b44e49d6546a166d1ea128928 SHA512 1226702abc3027c29004b2fe2bd35e7a06b72146e428d92b1ec13600456e5948b1f814a3c031dd2439854cee696d4ccb0871112a0c66f135db611d6da1932f3d
26 DIST Python-3.9.13.tar.xz 19754368 BLAKE2B 4f583f66c28b791e19cd6d79695fe9eb815fd333542be22aec8bd73d1f4d3f17f2c4e9de198e7b16c1ca6362a613a8a02fb965c7dc7db3e510fd31de15ba2d19 SHA512 e9664e7f908092df11236b22465d217531d6f0378e88d889108d19fe77f28f46ffb629b8733f84b41409e255367321893a2b1bd64518930d9d8cae5d1b774d23
27 DIST Python-3.9.13.tar.xz.asc 833 BLAKE2B db01c01be9d56cd15f9ab4a9e2cfa800faf4ebecb92b01c133865d3b3134bc910258a33b766306c3d01f98e35bbf9c03c7cba697760b7095999cbd63ed6c276c SHA512 9367afe8ec32195adbb64fa32eb9e3881cfdbbb38efcb5e0804a15486232aecbc81ed20a8ffed652f06a881744f3efd2c2df3cc652d70671c94d6668a17a391e
28 DIST Python-3.9.14.tar.xz 19750176 BLAKE2B 0f6b5177fc3572f40d14ddfca4ee37e7839b996826b5c929551a6d152cd2707de6312a8b0cd05dba62c98fd309b00ece07a750cca88803de2a18dd4a09238ae3 SHA512 691a7814cf6c7bee96d8dbb7c5c85cb11f2e999101e20491b99435cdec07c3bbd5ce43ad3d9c64f695383b79197884caa1965c4346e4525e23b09c686271e4ab
29 @@ -23,6 +25,7 @@ DIST python-gentoo-patches-3.11.0rc1_p2.tar.xz 21580 BLAKE2B 188a3b2e5bc0d067dac
30 DIST python-gentoo-patches-3.8.13_p6.tar.xz 27968 BLAKE2B 0cafbdfed47e0d58a9798c1e090abb17428472f769ebe4125cf1210218b90bcfd2ad8790fafbfdc1daccc51078a6bf5e068157f05151c2283eb80d5fe128d85c SHA512 b23d51478cc126a6f7f3d1d6d2302a13f3e873a3fac19c7b2b86b79f4b25bd421b60e5ecbe9bb606ee0eedc0e6871d20c0befd1b6596b525bf6ef79a19230ae2
31 DIST python-gentoo-patches-3.8.13_p7.tar.xz 41332 BLAKE2B e61fe83b1260fbdc3086384834914625ae361c3ab2365f5f86c454423f4738b1aa20f46cf95b8a64b54b7cc000761964d5db65383bba9bdcc2a86894aacbdd5b SHA512 e71fff8291c4dfec43d3609e84de2fe6afc29ee6087410f047e972294e555e5a17b7f8d19778a79e67bad66855fd7a163b5a047aee99ee357d5306d7cd01f989
32 DIST python-gentoo-patches-3.8.13_p8.tar.xz 43204 BLAKE2B 6fb162bfcd2ab8c1fb4208716382aa144bf21b1bd8c2f00a2bd60e7cd0b0d8e034803e8f4129cf49cf6e594467aa2e4a45eb4cb72ddd8516ffd8f797570d59cd SHA512 41ec04e3257021fdcc848587c2275b241d0b31d1d6c10162e30b86920109286c92171d6143bb8be6d1f1c9070d43d31dc0290bdffac50d09d32c2493e631637c
33 +DIST python-gentoo-patches-3.8.14.tar.xz 25700 BLAKE2B de4ff020ecc6889a1c7ae29917cf0f06f930dbfbc2084d13149d8c64e25e1f9881b9f6ded5943101df871e91176a05bf983efdaa293831cc7801a8bad8e8f6d7 SHA512 8073bf34b12cbe71fcc54cf438b8686cd1b073e41846a6877482483951ed25e09fc74106b787f3f6c5705961b83e83f0c79184c1b5b4de3539a4e670b70efcb2
34 DIST python-gentoo-patches-3.9.13_p4.tar.xz 22072 BLAKE2B a0e084eff35d075d2255b139d0db114d282cb6c9c0c2ea51a8ecb7f5f1dc8096d6578ae5f804b7583a2b7842152b5723ad802ca816d46813c40aaa756118afc8 SHA512 cdf8d43fd5263c4956be234f36c0767215ab2495705d4f2a060b32ecbfbe159e618e31693b0538a1b970f7b27ebe4953063f585930d074dcaf59f2f61486e6b6
35 DIST python-gentoo-patches-3.9.13_p5.tar.xz 35660 BLAKE2B be3fe3a4db5e94a06c6bcb36eee71fd7e33cf27a4f3a259e5d0bd332b4765e77d5753247ddf5bbc3cbf10647f55e1897c943a7149afc76a9649d634fbfaff682 SHA512 7d6f1d215df0e50b1b4837f62c160d3262c6d9a29dad1a3f82590f5f84245defcd9b3de500ec78f01a3308275647b7a5e72a16c7425aec1edb841ba079100e1b
36 DIST python-gentoo-patches-3.9.13_p6.tar.xz 37508 BLAKE2B 6d55aec9ae139cbe6d35b84335174d5fba5784bf52eb665e2d3a27693a2abb843bce1f190c92bfd173359c3782cae06a6b3520932b08aec678332928c5a27277 SHA512 1b1dec45d959849bf72b0646329e8cf74301e0f5373d6e2dbefb63d60fdddbe9fc33abda7d2312af8c52feadf3bacd04b627626d876acecc8984d3192a2d029d
37
38 diff --git a/dev-lang/python/python-3.8.14.ebuild b/dev-lang/python/python-3.8.14.ebuild
39 new file mode 100644
40 index 000000000000..add41cfe710b
41 --- /dev/null
42 +++ b/dev-lang/python/python-3.8.14.ebuild
43 @@ -0,0 +1,348 @@
44 +# Copyright 1999-2022 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI="7"
48 +WANT_LIBTOOL="none"
49 +
50 +inherit autotools flag-o-matic multiprocessing pax-utils
51 +inherit python-utils-r1 toolchain-funcs verify-sig
52 +
53 +MY_PV=${PV/_rc/rc}
54 +MY_P="Python-${MY_PV%_p*}"
55 +PYVER=$(ver_cut 1-2)
56 +PATCHSET="python-gentoo-patches-${MY_PV}"
57 +
58 +DESCRIPTION="An interpreted, interactive, object-oriented programming language"
59 +HOMEPAGE="
60 + https://www.python.org/
61 + https://github.com/python/cpython/
62 +"
63 +SRC_URI="
64 + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
65 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
66 + verify-sig? (
67 + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
68 + )
69 +"
70 +S="${WORKDIR}/${MY_P}"
71 +
72 +LICENSE="PSF-2"
73 +SLOT="${PYVER}"
74 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
75 +IUSE="
76 + bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
77 + +readline +sqlite +ssl test tk wininst +xml
78 +"
79 +RESTRICT="!test? ( test )"
80 +
81 +# Do not add a dependency on dev-lang/python to this ebuild.
82 +# If you need to apply a patch which requires python for bootstrapping, please
83 +# run the bootstrap code on your dev box and include the results in the
84 +# patchset. See bug 447752.
85 +
86 +RDEPEND="
87 + app-arch/bzip2:=
88 + app-arch/xz-utils:=
89 + dev-lang/python-exec[python_targets_python3_8(-)]
90 + dev-libs/libffi:=
91 + sys-apps/util-linux:=
92 + >=sys-libs/zlib-1.1.3:=
93 + virtual/libcrypt:=
94 + virtual/libintl
95 + ensurepip? ( dev-python/ensurepip-wheels )
96 + gdbm? ( sys-libs/gdbm:=[berkdb] )
97 + ncurses? ( >=sys-libs/ncurses-5.2:= )
98 + readline? ( >=sys-libs/readline-4.1:= )
99 + sqlite? ( >=dev-db/sqlite-3.3.8:3= )
100 + ssl? ( >=dev-libs/openssl-1.1.1:= )
101 + tk? (
102 + >=dev-lang/tcl-8.0:=
103 + >=dev-lang/tk-8.0:=
104 + dev-tcltk/blt:=
105 + dev-tcltk/tix
106 + )
107 + xml? ( >=dev-libs/expat-2.1:= )
108 +"
109 +# bluetooth requires headers from bluez
110 +DEPEND="
111 + ${RDEPEND}
112 + bluetooth? ( net-wireless/bluez )
113 + test? ( app-arch/xz-utils[extra-filters(+)] )
114 +"
115 +# autoconf-archive needed to eautoreconf
116 +BDEPEND="
117 + sys-devel/autoconf-archive
118 + virtual/awk
119 + virtual/pkgconfig
120 + verify-sig? ( sec-keys/openpgp-keys-python )
121 +"
122 +RDEPEND+="
123 + !build? ( app-misc/mime-types )
124 +"
125 +
126 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
127 +
128 +QA_PKGCONFIG_VERSION=${PYVER}
129 +
130 +src_unpack() {
131 + if use verify-sig; then
132 + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
133 + fi
134 + default
135 +}
136 +
137 +src_prepare() {
138 + # Ensure that internal copies of expat and libffi are not used.
139 + rm -r Modules/expat || die
140 + rm -r Modules/_ctypes/libffi* || die
141 +
142 + local PATCHES=(
143 + "${WORKDIR}/${PATCHSET}"
144 + )
145 +
146 + default
147 +
148 + # https://bugs.gentoo.org/850151
149 + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
150 +
151 + # force the correct number of jobs
152 + # https://bugs.gentoo.org/737660
153 + local jobs=$(makeopts_jobs)
154 + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
155 + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
156 +
157 + eautoreconf
158 +}
159 +
160 +src_configure() {
161 + # disable automagic bluetooth headers detection
162 + if ! use bluetooth; then
163 + local -x ac_cv_header_bluetooth_bluetooth_h=no
164 + fi
165 + local disable
166 + use gdbm || disable+=" gdbm"
167 + use ncurses || disable+=" _curses _curses_panel"
168 + use readline || disable+=" readline"
169 + use sqlite || disable+=" _sqlite3"
170 + use ssl || export PYTHON_DISABLE_SSL="1"
171 + use tk || disable+=" _tkinter"
172 + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
173 + export PYTHON_DISABLE_MODULES="${disable}"
174 +
175 + if ! use xml; then
176 + ewarn "You have configured Python without XML support."
177 + ewarn "This is NOT a recommended configuration as you"
178 + ewarn "may face problems parsing any XML documents."
179 + fi
180 +
181 + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
182 + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
183 + fi
184 +
185 + append-flags -fwrapv
186 +
187 + filter-flags -malign-double
188 +
189 + # https://bugs.gentoo.org/700012
190 + if is-flagq -flto || is-flagq '-flto=*'; then
191 + append-cflags $(test-flags-CC -ffat-lto-objects)
192 + fi
193 +
194 + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
195 + # PKG_CONFIG needed for cross.
196 + tc-export CXX PKG_CONFIG
197 +
198 + # Fix implicit declarations on cross and prefix builds. Bug #674070.
199 + if use ncurses; then
200 + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
201 + fi
202 +
203 + local dbmliborder=
204 + if use gdbm; then
205 + dbmliborder+="${dbmliborder:+:}gdbm"
206 + fi
207 +
208 + local myeconfargs=(
209 + # glibc-2.30 removes it; since we can't cleanly force-rebuild
210 + # Python on glibc upgrade, remove it proactively to give
211 + # a chance for users rebuilding python before glibc
212 + ac_cv_header_stropts_h=no
213 +
214 + --enable-shared
215 + --enable-ipv6
216 + --infodir='${prefix}/share/info'
217 + --mandir='${prefix}/share/man'
218 + --with-computed-gotos
219 + --with-dbmliborder="${dbmliborder}"
220 + --with-libc=
221 + --enable-loadable-sqlite-extensions
222 + --without-ensurepip
223 + --with-system-expat
224 + --with-system-ffi
225 + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
226 + )
227 +
228 + # disable implicit optimization/debugging flags
229 + local -x OPT=
230 + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
231 + # propagated to sysconfig for built extensions
232 + local -x CFLAGS_NODIST=${CFLAGS}
233 + local -x LDFLAGS_NODIST=${LDFLAGS}
234 + local -x CFLAGS= LDFLAGS=
235 +
236 + econf "${myeconfargs[@]}"
237 +
238 + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
239 + eerror "configure has detected that the sem_open function is broken."
240 + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
241 + die "Broken sem_open function (bug 496328)"
242 + fi
243 +
244 + # install epython.py as part of stdlib
245 + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
246 +}
247 +
248 +src_compile() {
249 + # Ensure sed works as expected
250 + # https://bugs.gentoo.org/594768
251 + local -x LC_ALL=C
252 + # Prevent using distutils bundled by setuptools.
253 + # https://bugs.gentoo.org/823728
254 + export SETUPTOOLS_USE_DISTUTILS=stdlib
255 +
256 + # also need to clear the flags explicitly here or they end up
257 + # in _sysconfigdata*
258 + emake CPPFLAGS= CFLAGS= LDFLAGS=
259 +
260 + # Work around bug 329499. See also bug 413751 and 457194.
261 + if has_version dev-libs/libffi[pax-kernel]; then
262 + pax-mark E python
263 + else
264 + pax-mark m python
265 + fi
266 +}
267 +
268 +src_test() {
269 + # Tests will not work when cross compiling.
270 + if tc-is-cross-compiler; then
271 + elog "Disabling tests due to crosscompiling."
272 + return
273 + fi
274 +
275 + local test_opts=(
276 + -u-network
277 + -j "$(makeopts_jobs)"
278 +
279 + # fails
280 + -x test_gdb
281 + )
282 +
283 + if use sparc ; then
284 + # bug #788022
285 + test_opts+=(
286 + -x test_multiprocessing_fork
287 + -x test_multiprocessing_forkserver
288 + )
289 + fi
290 +
291 + # bug 660358
292 + local -x COLUMNS=80
293 + local -x PYTHONDONTWRITEBYTECODE=
294 +
295 + emake test EXTRATESTOPTS="${test_opts[*]}" \
296 + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
297 +}
298 +
299 +src_install() {
300 + local libdir=${ED}/usr/lib/python${PYVER}
301 +
302 + emake DESTDIR="${D}" altinstall
303 +
304 + # Remove static library
305 + rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
306 +
307 + # Fix collisions between different slots of Python.
308 + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
309 +
310 + # Cheap hack to get version with ABIFLAGS
311 + local abiver=$(cd "${ED}/usr/include"; echo python*)
312 + if [[ ${abiver} != python${PYVER} ]]; then
313 + # Replace python3.X with a symlink to python3.Xm
314 + rm "${ED}/usr/bin/python${PYVER}" || die
315 + dosym "${abiver}" "/usr/bin/python${PYVER}"
316 + # Create python3.X-config symlink
317 + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
318 + # Create python-3.5m.pc symlink
319 + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
320 + fi
321 +
322 + # python seems to get rebuilt in src_install (bug 569908)
323 + # Work around it for now.
324 + if has_version dev-libs/libffi[pax-kernel]; then
325 + pax-mark E "${ED}/usr/bin/${abiver}"
326 + else
327 + pax-mark m "${ED}/usr/bin/${abiver}"
328 + fi
329 +
330 + rm -r "${libdir}"/ensurepip/_bundled || die
331 + if ! use ensurepip; then
332 + rm -r "${libdir}"/ensurepip || die
333 + fi
334 + if ! use sqlite; then
335 + rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
336 + fi
337 + if ! use tk; then
338 + rm -r "${ED}/usr/bin/idle${PYVER}" || die
339 + rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
340 + fi
341 + if ! use wininst; then
342 + rm "${libdir}/distutils/command/"wininst-*.exe || die
343 + fi
344 +
345 + dodoc Misc/{ACKS,HISTORY,NEWS}
346 +
347 + if use examples; then
348 + docinto examples
349 + find Tools -name __pycache__ -exec rm -fr {} + || die
350 + dodoc -r Tools
351 + fi
352 + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
353 + local libname=$(
354 + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
355 + emake --no-print-directory -s -f - 2>/dev/null
356 + )
357 + newins Tools/gdb/libpython.py "${libname}"-gdb.py
358 +
359 + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
360 + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
361 + sed \
362 + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
363 + -e "s:@PYDOC@:pydoc${PYVER}:" \
364 + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
365 + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
366 +
367 + # python-exec wrapping support
368 + local pymajor=${PYVER%.*}
369 + local EPYTHON=python${PYVER}
370 + local scriptdir=${D}$(python_get_scriptdir)
371 + mkdir -p "${scriptdir}" || die
372 + # python and pythonX
373 + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
374 + ln -s "python${pymajor}" "${scriptdir}/python" || die
375 + # python-config and pythonX-config
376 + # note: we need to create a wrapper rather than symlinking it due
377 + # to some random dirname(argv[0]) magic performed by python-config
378 + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
379 + #!/bin/sh
380 + exec "${abiver}-config" "\${@}"
381 + EOF
382 + chmod +x "${scriptdir}/python${pymajor}-config" || die
383 + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
384 + # 2to3, pydoc
385 + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
386 + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
387 + # idle
388 + if use tk; then
389 + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
390 + fi
391 +}