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: Mon, 05 Sep 2022 07:44:26
Message-Id: 1662363858.22e53fc3fa62440bc49522a58efa98c3f588c1ad.mgorny@gentoo
1 commit: 22e53fc3fa62440bc49522a58efa98c3f588c1ad
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 5 07:24:52 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 5 07:44:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22e53fc3
7
8 dev-lang/python: Backport more bignum fixes to 3.11.0_rc1_p2
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-lang/python/Manifest | 1 +
13 dev-lang/python/python-3.11.0_rc1_p2.ebuild | 481 ++++++++++++++++++++++++++++
14 2 files changed, 482 insertions(+)
15
16 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
17 index c261b6a966ac..5f6dcd704221 100644
18 --- a/dev-lang/python/Manifest
19 +++ b/dev-lang/python/Manifest
20 @@ -13,6 +13,7 @@ DIST python-gentoo-patches-3.10.6_p2.tar.xz 12040 BLAKE2B 75c93fab19137a966b3775
21 DIST python-gentoo-patches-3.10.6_p3.tar.xz 26712 BLAKE2B 701a7a4da1a09f71dee8fdf924a45e030b8ae93e469a2789b28b904d2fd6b011589fb940eb0c262e8b19005af523a2f66075d053fb60892d6ebd473159fce718 SHA512 ed43ba18735ddf72c434bfe905894d156a144a77f9fb8266378d384e840b376c6220859d8d1af83f304293368bf1dd45881316c1797ba25d618a064daaacab17
22 DIST python-gentoo-patches-3.11.0rc1.tar.xz 4384 BLAKE2B 31bcdc055bfaf3434dbb02543aaf66910eaccd01808d9a0e57bf7cb3b097fc0046c00ac44737d9c37e3b6d074c524f4dd3ab439a741e66d74a0425889ecaead5 SHA512 05b044e2d8f881c471528600ee300bfd9cf5160609dfb3d7cbdb8e43f47b681542582a85de97e28e6a3b89a3fb6c8d7398e029d31e20cea9c5a2a71700382d4e
23 DIST python-gentoo-patches-3.11.0rc1_p1.tar.xz 19584 BLAKE2B 33c87e2e7141fa5cdf343df8cf30e8e0bd37fdfc7b4d84564b1131c57db27b5886184fd1291b2a898efafec60da5c01d16dce8b3c8792df7df15793d767d74cd SHA512 dc5547622a17bc899dfa7f55a4705f780fd3b731ccdb2c0a87e3d71b4490a32b54683ff862f412e2ac3480f0e84acf2e88176ecf89a8d62b97454e51258696ea
24 +DIST python-gentoo-patches-3.11.0rc1_p2.tar.xz 21580 BLAKE2B 188a3b2e5bc0d067dac20a7d5bfe3149eeac062bdb29972b0d0a8b24238aa21eb2f2a797b57f6ded80cb85d255f6cc1e6336d57c3e5f43d2b8aa890e7d35ef50 SHA512 fbc740b7e8161d4878cc91d9ee66026ae51082f2b18d77dc40167bfab4891e7b811fa4920ddf5c5a27d8ddc84a0220ccb1b3612744818084da321188ada09563
25 DIST python-gentoo-patches-3.8.13_p6.tar.xz 27968 BLAKE2B 0cafbdfed47e0d58a9798c1e090abb17428472f769ebe4125cf1210218b90bcfd2ad8790fafbfdc1daccc51078a6bf5e068157f05151c2283eb80d5fe128d85c SHA512 b23d51478cc126a6f7f3d1d6d2302a13f3e873a3fac19c7b2b86b79f4b25bd421b60e5ecbe9bb606ee0eedc0e6871d20c0befd1b6596b525bf6ef79a19230ae2
26 DIST python-gentoo-patches-3.8.13_p7.tar.xz 41332 BLAKE2B e61fe83b1260fbdc3086384834914625ae361c3ab2365f5f86c454423f4738b1aa20f46cf95b8a64b54b7cc000761964d5db65383bba9bdcc2a86894aacbdd5b SHA512 e71fff8291c4dfec43d3609e84de2fe6afc29ee6087410f047e972294e555e5a17b7f8d19778a79e67bad66855fd7a163b5a047aee99ee357d5306d7cd01f989
27 DIST python-gentoo-patches-3.9.13_p4.tar.xz 22072 BLAKE2B a0e084eff35d075d2255b139d0db114d282cb6c9c0c2ea51a8ecb7f5f1dc8096d6578ae5f804b7583a2b7842152b5723ad802ca816d46813c40aaa756118afc8 SHA512 cdf8d43fd5263c4956be234f36c0767215ab2495705d4f2a060b32ecbfbe159e618e31693b0538a1b970f7b27ebe4953063f585930d074dcaf59f2f61486e6b6
28
29 diff --git a/dev-lang/python/python-3.11.0_rc1_p2.ebuild b/dev-lang/python/python-3.11.0_rc1_p2.ebuild
30 new file mode 100644
31 index 000000000000..bba860f7875a
32 --- /dev/null
33 +++ b/dev-lang/python/python-3.11.0_rc1_p2.ebuild
34 @@ -0,0 +1,481 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI="7"
39 +WANT_LIBTOOL="none"
40 +
41 +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
42 +inherit python-utils-r1 toolchain-funcs verify-sig
43 +
44 +MY_PV=${PV/_rc/rc}
45 +MY_P="Python-${MY_PV%_p*}"
46 +PYVER=$(ver_cut 1-2)
47 +PATCHSET="python-gentoo-patches-${MY_PV}"
48 +
49 +DESCRIPTION="An interpreted, interactive, object-oriented programming language"
50 +HOMEPAGE="
51 + https://www.python.org/
52 + https://github.com/python/cpython/
53 +"
54 +SRC_URI="
55 + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
56 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
57 + verify-sig? (
58 + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
59 + )
60 +"
61 +S="${WORKDIR}/${MY_P}"
62 +
63 +LICENSE="PSF-2"
64 +SLOT="${PYVER}"
65 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
66 +IUSE="
67 + bluetooth build +ensurepip examples gdbm hardened libedit lto
68 + +ncurses pgo +readline +sqlite +ssl test tk
69 +"
70 +RESTRICT="!test? ( test )"
71 +
72 +# Do not add a dependency on dev-lang/python to this ebuild.
73 +# If you need to apply a patch which requires python for bootstrapping, please
74 +# run the bootstrap code on your dev box and include the results in the
75 +# patchset. See bug 447752.
76 +
77 +RDEPEND="
78 + app-arch/bzip2:=
79 + app-arch/xz-utils:=
80 + app-crypt/libb2
81 + >=dev-libs/expat-2.1:=
82 + dev-libs/libffi:=
83 + sys-apps/util-linux:=
84 + >=sys-libs/zlib-1.1.3:=
85 + virtual/libcrypt:=
86 + virtual/libintl
87 + ensurepip? ( dev-python/ensurepip-wheels )
88 + gdbm? ( sys-libs/gdbm:=[berkdb] )
89 + ncurses? ( >=sys-libs/ncurses-5.2:= )
90 + readline? (
91 + !libedit? ( >=sys-libs/readline-4.1:= )
92 + libedit? ( dev-libs/libedit:= )
93 + )
94 + sqlite? ( >=dev-db/sqlite-3.3.8:3= )
95 + ssl? ( >=dev-libs/openssl-1.1.1:= )
96 + tk? (
97 + >=dev-lang/tcl-8.0:=
98 + >=dev-lang/tk-8.0:=
99 + dev-tcltk/blt:=
100 + dev-tcltk/tix
101 + )
102 + !!<sys-apps/sandbox-2.21
103 +"
104 +# bluetooth requires headers from bluez
105 +DEPEND="
106 + ${RDEPEND}
107 + bluetooth? ( net-wireless/bluez )
108 + test? ( app-arch/xz-utils[extra-filters(+)] )
109 +"
110 +# autoconf-archive needed to eautoreconf
111 +BDEPEND="
112 + sys-devel/autoconf-archive
113 + virtual/awk
114 + virtual/pkgconfig
115 + verify-sig? ( sec-keys/openpgp-keys-python )
116 +"
117 +RDEPEND+="
118 + !build? ( app-misc/mime-types )
119 +"
120 +if [[ ${PV} != *_alpha* ]]; then
121 + RDEPEND+="
122 + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
123 + "
124 +fi
125 +
126 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
127 +
128 +# large file tests involve a 2.5G file being copied (duplicated)
129 +CHECKREQS_DISK_BUILD=5500M
130 +
131 +QA_PKGCONFIG_VERSION=${PYVER}
132 +
133 +pkg_pretend() {
134 + use test && check-reqs_pkg_pretend
135 +}
136 +
137 +pkg_setup() {
138 + use test && check-reqs_pkg_setup
139 +}
140 +
141 +src_unpack() {
142 + if use verify-sig; then
143 + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
144 + fi
145 + default
146 +}
147 +
148 +src_prepare() {
149 + # Ensure that internal copies of expat and libffi are not used.
150 + rm -r Modules/expat || die
151 + rm -r Modules/_ctypes/libffi* || die
152 +
153 + local PATCHES=(
154 + "${WORKDIR}/${PATCHSET}"
155 + )
156 +
157 + default
158 +
159 + # https://bugs.gentoo.org/850151
160 + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
161 +
162 + # force the correct number of jobs
163 + # https://bugs.gentoo.org/737660
164 + local jobs=$(makeopts_jobs)
165 + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
166 + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
167 +
168 + eautoreconf
169 +}
170 +
171 +src_configure() {
172 + local disable
173 + # disable automagic bluetooth headers detection
174 + if ! use bluetooth; then
175 + local -x ac_cv_header_bluetooth_bluetooth_h=no
176 + fi
177 +
178 + append-flags -fwrapv
179 + filter-flags -malign-double
180 +
181 + # https://bugs.gentoo.org/700012
182 + if is-flagq -flto || is-flagq '-flto=*'; then
183 + append-cflags $(test-flags-CC -ffat-lto-objects)
184 + fi
185 +
186 + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
187 + # PKG_CONFIG needed for cross.
188 + tc-export CXX PKG_CONFIG
189 +
190 + # Fix implicit declarations on cross and prefix builds. Bug #674070.
191 + if use ncurses; then
192 + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
193 + fi
194 +
195 + local dbmliborder=
196 + if use gdbm; then
197 + dbmliborder+="${dbmliborder:+:}gdbm"
198 + fi
199 +
200 + if use pgo; then
201 + local profile_task_flags=(
202 + -m test
203 + "-j$(makeopts_jobs)"
204 + --pgo-extended
205 + -x test_gdb
206 + -u-network
207 +
208 + # All of these seem to occasionally hang for PGO inconsistently
209 + # They'll even hang here but be fine in src_test sometimes.
210 + # bug #828535 (and related: bug #788022)
211 + -x test_asyncio
212 + -x test_httpservers
213 + -x test_logging
214 + -x test_multiprocessing_fork
215 + -x test_socket
216 + -x test_xmlrpc
217 + )
218 +
219 + if has_version "app-arch/rpm" ; then
220 + # Avoid sandbox failure (attempts to write to /var/lib/rpm)
221 + profile_task_flags+=(
222 + -x test_distutils
223 + )
224 + fi
225 + local -x PROFILE_TASK="${profile_task_flags[*]}"
226 + fi
227 +
228 + local myeconfargs=(
229 + # glibc-2.30 removes it; since we can't cleanly force-rebuild
230 + # Python on glibc upgrade, remove it proactively to give
231 + # a chance for users rebuilding python before glibc
232 + ac_cv_header_stropts_h=no
233 +
234 + --enable-shared
235 + --without-static-libpython
236 + --enable-ipv6
237 + --infodir='${prefix}/share/info'
238 + --mandir='${prefix}/share/man'
239 + --with-computed-gotos
240 + --with-dbmliborder="${dbmliborder}"
241 + --with-libc=
242 + --enable-loadable-sqlite-extensions
243 + --without-ensurepip
244 + --with-system-expat
245 + --with-system-ffi
246 + --with-platlibdir=lib
247 + --with-pkg-config=yes
248 + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
249 +
250 + $(use_with lto)
251 + $(use_enable pgo optimizations)
252 + $(use_with readline readline "$(usex libedit editline readline)")
253 + )
254 +
255 + # disable implicit optimization/debugging flags
256 + local -x OPT=
257 + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
258 + # propagated to sysconfig for built extensions
259 + local -x CFLAGS_NODIST=${CFLAGS}
260 + local -x LDFLAGS_NODIST=${LDFLAGS}
261 + local -x CFLAGS= LDFLAGS=
262 +
263 + if tc-is-cross-compiler ; then
264 + # We need to build our own Python on CBUILD first, and feed it in.
265 + # bug #847910
266 + local myeconfargs_cbuild=(
267 + "${myeconfargs[@]}"
268 +
269 + # As minimal as possible for the mini CBUILD Python
270 + # we build just for cross to satisfy --with-build-python.
271 + --without-lto
272 + --without-readline
273 + --disable-optimizations
274 + )
275 +
276 + myeconfargs+=(
277 + # Point the imminent CHOST build to the Python we just
278 + # built for CBUILD.
279 + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
280 + )
281 +
282 + mkdir "${WORKDIR}"/${P}-${CBUILD} || die
283 + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
284 + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
285 +
286 + # Avoid as many dependencies as possible for the cross build.
287 + cat >> Makefile <<-EOF || die
288 + MODULE_NIS_STATE=disabled
289 + MODULE__DBM_STATE=disabled
290 + MODULE__GDBM_STATE=disabled
291 + MODULE__DBM_STATE=disabled
292 + MODULE__SQLITE3_STATE=disabled
293 + MODULE__HASHLIB_STATE=disabled
294 + MODULE__SSL_STATE=disabled
295 + MODULE__CURSES_STATE=disabled
296 + MODULE__CURSES_PANEL_STATE=disabled
297 + MODULE_READLINE_STATE=disabled
298 + MODULE__TKINTER_STATE=disabled
299 + MODULE_PYEXPAT_STATE=disabled
300 + MODULE_ZLIB_STATE=disabled
301 + EOF
302 +
303 + # Unfortunately, we do have to build this immediately, and
304 + # not in src_compile, because CHOST configure for Python
305 + # will check the existence of the --with-build-python value
306 + # immediately.
307 + emake
308 + popd &> /dev/null || die
309 + fi
310 +
311 + econf "${myeconfargs[@]}"
312 +
313 + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
314 + eerror "configure has detected that the sem_open function is broken."
315 + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
316 + die "Broken sem_open function (bug 496328)"
317 + fi
318 +
319 + # force-disable modules we don't want built
320 + local disable_modules=( NIS )
321 + use gdbm || disable_modules+=( _GDBM _DBM )
322 + use sqlite || disable_modules+=( _SQLITE3 )
323 + use ssl || disable_modules+=( _HASHLIB _SSL )
324 + use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
325 + use readline || disable_modules+=( READLINE )
326 + use tk || disable_modules+=( _TKINTER )
327 +
328 + local mod
329 + for mod in "${disable_modules[@]}"; do
330 + echo "MODULE_${mod}_STATE=disabled"
331 + done >> Makefile || die
332 +
333 + # install epython.py as part of stdlib
334 + echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
335 +}
336 +
337 +src_compile() {
338 + # Ensure sed works as expected
339 + # https://bugs.gentoo.org/594768
340 + local -x LC_ALL=C
341 + # Prevent using distutils bundled by setuptools.
342 + # https://bugs.gentoo.org/823728
343 + export SETUPTOOLS_USE_DISTUTILS=stdlib
344 + export PYTHONSTRICTEXTENSIONBUILD=1
345 +
346 + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
347 + # end up writing bytecode & violating sandbox.
348 + # bug #831897
349 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
350 +
351 + if use pgo ; then
352 + # bug 660358
353 + local -x COLUMNS=80
354 + local -x PYTHONDONTWRITEBYTECODE=
355 +
356 + addpredict /usr/lib/python3.11/site-packages
357 + fi
358 +
359 + # also need to clear the flags explicitly here or they end up
360 + # in _sysconfigdata*
361 + emake CPPFLAGS= CFLAGS= LDFLAGS=
362 +
363 + # Restore saved value from above.
364 + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
365 +
366 + # Work around bug 329499. See also bug 413751 and 457194.
367 + if has_version dev-libs/libffi[pax-kernel]; then
368 + pax-mark E python
369 + else
370 + pax-mark m python
371 + fi
372 +}
373 +
374 +src_test() {
375 + # Tests will not work when cross compiling.
376 + if tc-is-cross-compiler; then
377 + elog "Disabling tests due to crosscompiling."
378 + return
379 + fi
380 +
381 + # this just happens to skip test_support.test_freeze that is broken
382 + # without bundled expat
383 + # TODO: get a proper skip for it upstream
384 + local -x LOGNAME=buildbot
385 +
386 + local test_opts=(
387 + -u-network
388 + -j "$(makeopts_jobs)"
389 +
390 + # fails
391 + -x test_gdb
392 + )
393 +
394 + if use sparc ; then
395 + # bug #788022
396 + test_opts+=(
397 + -x test_multiprocessing_fork
398 + -x test_multiprocessing_forkserver
399 + )
400 + fi
401 +
402 + # bug 660358
403 + local -x COLUMNS=80
404 + local -x PYTHONDONTWRITEBYTECODE=
405 + # workaround https://bugs.gentoo.org/775416
406 + addwrite /usr/lib/python3.11/site-packages
407 +
408 + emake test EXTRATESTOPTS="${test_opts[*]}" \
409 + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
410 +}
411 +
412 +src_install() {
413 + local libdir=${ED}/usr/lib/python${PYVER}
414 +
415 + # -j1 hack for now for bug #843458
416 + emake -j1 DESTDIR="${D}" altinstall
417 +
418 + # Fix collisions between different slots of Python.
419 + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
420 +
421 + # Cheap hack to get version with ABIFLAGS
422 + local abiver=$(cd "${ED}/usr/include"; echo python*)
423 + if [[ ${abiver} != python${PYVER} ]]; then
424 + # Replace python3.X with a symlink to python3.Xm
425 + rm "${ED}/usr/bin/python${PYVER}" || die
426 + dosym "${abiver}" "/usr/bin/python${PYVER}"
427 + # Create python3.X-config symlink
428 + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
429 + # Create python-3.5m.pc symlink
430 + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
431 + fi
432 +
433 + # python seems to get rebuilt in src_install (bug 569908)
434 + # Work around it for now.
435 + if has_version dev-libs/libffi[pax-kernel]; then
436 + pax-mark E "${ED}/usr/bin/${abiver}"
437 + else
438 + pax-mark m "${ED}/usr/bin/${abiver}"
439 + fi
440 +
441 + rm -r "${libdir}"/ensurepip/_bundled || die
442 + if ! use ensurepip; then
443 + rm -r "${libdir}"/ensurepip || die
444 + fi
445 + if ! use sqlite; then
446 + rm -r "${libdir}/"sqlite3 || die
447 + fi
448 + if ! use tk; then
449 + rm -r "${ED}/usr/bin/idle${PYVER}" || die
450 + rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
451 + fi
452 +
453 + dodoc Misc/{ACKS,HISTORY,NEWS}
454 +
455 + if use examples; then
456 + docinto examples
457 + find Tools -name __pycache__ -exec rm -fr {} + || die
458 + dodoc -r Tools
459 + fi
460 + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
461 + local libname=$(
462 + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
463 + emake --no-print-directory -s -f - 2>/dev/null
464 + )
465 + newins Tools/gdb/libpython.py "${libname}"-gdb.py
466 +
467 + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
468 + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
469 + sed \
470 + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
471 + -e "s:@PYDOC@:pydoc${PYVER}:" \
472 + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
473 + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
474 +
475 + # python-exec wrapping support
476 + local pymajor=${PYVER%.*}
477 + local EPYTHON=python${PYVER}
478 + local scriptdir=${D}$(python_get_scriptdir)
479 + mkdir -p "${scriptdir}" || die
480 + # python and pythonX
481 + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
482 + ln -s "python${pymajor}" "${scriptdir}/python" || die
483 + # python-config and pythonX-config
484 + # note: we need to create a wrapper rather than symlinking it due
485 + # to some random dirname(argv[0]) magic performed by python-config
486 + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
487 + #!/bin/sh
488 + exec "${abiver}-config" "\${@}"
489 + EOF
490 + chmod +x "${scriptdir}/python${pymajor}-config" || die
491 + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
492 + # 2to3, pydoc
493 + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
494 + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
495 + # idle
496 + if use tk; then
497 + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
498 + fi
499 +}
500 +
501 +pkg_postinst() {
502 + local v
503 + for v in ${REPLACING_VERSIONS}; do
504 + if ver_test "${v}" -lt 3.11.0_beta4-r2; then
505 + ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
506 + ewarn "installed previously are no longer valid and will be regenerated"
507 + ewarn "(or ignored) on the next import. This may cause sandbox failures"
508 + ewarn "when installing some packages and checksum mismatches when removing"
509 + ewarn "old versions. To actively prevent this, rebuild all packages"
510 + ewarn "installing Python 3.11 modules, e.g. using:"
511 + ewarn
512 + ewarn " emerge -1v /usr/lib/python3.11/site-packages"
513 + fi
514 + done
515 +}