commit:     30995940970b02cfe0556c53dbfe3156e679cc9e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 29 06:00:45 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 06:00:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30995940

dev-lang/python: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/python/Manifest                    |   6 -
 dev-lang/python/python-3.10.8.ebuild        | 459 --------------------------
 dev-lang/python/python-3.11.0_rc2_p1.ebuild | 481 ----------------------------
 dev-lang/python/python-3.8.15.ebuild        | 400 -----------------------
 dev-lang/python/python-3.9.15.ebuild        | 454 --------------------------
 5 files changed, 1800 deletions(-)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index e22f8f46ed25..eecf426274ee 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -4,8 +4,6 @@ DIST Python-3.10.8.tar.xz 19619508 BLAKE2B 
8bbfbae34fbc517c4a746e5e4c360efc57aca
 DIST Python-3.10.8.tar.xz.asc 833 BLAKE2B 
1e94822a57d055f5db1a5d2915df24be9d6fd9e6b301d148919a7643285a93ca1c8a16db7d74e0adabe7d2a21678b5126e3df7fffb253b35f8db6f74284a0aba
 SHA512 
0c2ef09d898257ba5e9ec7c5bb224a7e50e5ebca96843b4d9e25be6cdd2f17144772aafc92280af20c21491e3c8cedc697414688ece613c93b28ff7ecddcf93f
 DIST Python-3.11.0.tar.xz 19819768 BLAKE2B 
3a9852b8973e0e6ce414742f08f17f2c239d20a4e437e95656a325e151d04f4751f07fce955e55f2818af6810b767f2438b3d14e9f2313fe607bab31c47a2fca
 SHA512 
314eef88ae0d68760f34d7a32f238fd2ecb27c50963baa7357c42ad8159026ec50229a0b31d83c39710a472904a06422afc082f9658a90a1dc83ccb74c08039d
 DIST Python-3.11.0.tar.xz.asc 833 BLAKE2B 
7133f390ff8e7d856466c8d310903ef694196f5d945d6b753dcd7bf3e5416d69ef0e2320252ecce419ecce07ac5e2a37ad1657e2ded393d0c38a6521a65cebc2
 SHA512 
d20fb152c5b16cfef1f59af588f7576eb45c903d9e15fd4ad0e15fd32bef7ffd951b99a062d2944234ecffcf29eb9266544e92d2f6584710cbb20ba38f8ac224
-DIST Python-3.11.0rc2.tar.xz 19828340 BLAKE2B 
c4e8578d967917fc6f19355c466ba8e5487e83a17b373dd03ae90f2a73f5f6d07c38ec308c03435d23454cdcb06e63b74fc9ceb3900079996ae71b9327a4a5b3
 SHA512 
8b37bc9df3c966bd35cffdb7d6406a3c1a5ccfbea10bd8dad498880e3b1492f8cdbbe227ab3a30557843eb05d8fb93077c791e25d71b33ed420992d54b6c9473
-DIST Python-3.11.0rc2.tar.xz.asc 833 BLAKE2B 
80ea3e8a3565fef6552da2287a5bf07a764002c273842b7d03a417a75adfe616e1b7816c161c42751a495b32ab8d8c11efc6c90ade97c0b31be54f7391ee9c9d
 SHA512 
13e6bfa719db29aa169763399203168923cbfbb01d209e18269399ca84723582f480134edd3bf9f24785cd5ab0486411132d6bbb354fa45ebbba68bf4c70021a
 DIST Python-3.12.0a1.tar.xz 19776600 BLAKE2B 
035e75c5713f9ff139f6df50329d9b74ade3b255f5413311d7012b2298dd3cb6d71ed11f5855d01e79d6bac334f80bd6a3340591fc3654d9723fd1c5f80eb750
 SHA512 
fa69dddf36dfe89b869d4de71cb8e878ef1e8be2b96ddfe2d58286710dd09b64db67c130d0438e3cea6679f6e9cd6bb83633691c8b7d6f346b730668866a28f7
 DIST Python-3.12.0a1.tar.xz.asc 963 BLAKE2B 
5027ce705b80ad2d186f45c27d00542df1090dcaa30e9d97e483d7debdaeb35b5bf94c9f0cd000715a8ccf6dc5f752e0129bb42e48bfd6b308754bd73ee26090
 SHA512 
4db7946d27505da9c9b358a3b0fc2f47bb79b10bbcdb8f3ce2f918d1b74665e41a51600de3b94d50b126b66c72f191f8532f4030af184698c32430c35ef8d821
 DIST Python-3.8.15.tar.xz 19038408 BLAKE2B 
4ce84171b2f7ca8c9cf1d130adf70f16a0899766cea98965c3e7afcb84b73c482bcb400b59b91736d20e31c57be79edc178f6eeecd775a1f8920a8fbfdd90c24
 SHA512 
4fb3827b13c2452faa75e5ed18dddf381e80b4fffcfde046e289b4629cff0bb87fba1d09916b9b8a6f8039dc422c952293ebdb381c49f8ca7e7893ae4be6c28d
@@ -13,12 +11,8 @@ DIST Python-3.8.15.tar.xz.asc 833 BLAKE2B 
bff055e28f4a2e59bb9e6d131ed39f954b729a
 DIST Python-3.9.15.tar.xz 19712208 BLAKE2B 
a8490c998c89ed4e3e87ef48e3b5d622e5d06ebd7b8b79db564d668cd1f0c7fe89e0ef37ec4481ff82b30778e2be1a96c1b16199b9dce1f82de32f73b4343ddd
 SHA512 
9310d263bc7a7925f73a6f66fd254ae61f377f43011a6bc5c58e57c8b170c2da4f197a646927ab9d05f8912ed8be4369c09576063931a3f93c3b0228ccb33a39
 DIST Python-3.9.15.tar.xz.asc 833 BLAKE2B 
c325fb52fae254153456c24c1039b07c9ccf8734df3665640215d35219ccacb705f99d94c9f8b644d15d4ea4612f5ac0da599814f68f7d3b6fc1fdc175db9002
 SHA512 
722625091731536757b9db447590c31620665133d45076367a3281f2ee3add23a781b10ce5cea582d65caabb18814583c1a347689d2b396214e36a6771182f38
 DIST python-gentoo-patches-2.7.18_p15.tar.xz 34956 BLAKE2B 
d173f276dd9c0ce31004dcc55a0d18e9ce25a47683c2df3c4dd62e967dfbbb35be59a2f08cf20f30a19475a8a2344dd95b17400eafa88b5fdbe9270a12ccbf32
 SHA512 
d9386808265f978808e5c0ffd384cefe54fb0e05aeccfd394167d5227d9cd66e25c8e93c54914762b2cfc3c2dd851b26a7a84d62634c6aa8a0798aacbb7ac25f
-DIST python-gentoo-patches-3.10.8.tar.xz 10104 BLAKE2B 
a2e5fa956652fda1464c65ba4f648da2d77a545d53bf8d2429bce745c93e82eaea40bf6da3289f4216fe4b029b97ccf6ac0c3cfbdcc179f3c5f9e64e89cd5fe4
 SHA512 
e506c7fc3f6ebff340f090b462716c745f1acfa95c00a39a58367941efb356b8dcd72a3fa46d6760422733c0d6b65b79f0e8bedc77b93289c51ca4dc2ea0db2a
 DIST python-gentoo-patches-3.10.8_p1.tar.xz 12712 BLAKE2B 
54370dc973fedfab4dda33a20733f483f1592fede407541b90d8389bf03f9697bf755e35a39d1d45ea99b42edaa434a0901a35b7058c73fbc4e9ca8472fce35e
 SHA512 
093a9a532713eea68b18a0681db782cf38176f4582473e4fb45c45ce6d27f9a4a7f8fd37141ae44492283bbe9eda698c7190cfd8b4cddaf4f945124b908f3cf2
 DIST python-gentoo-patches-3.11.0.tar.xz 5404 BLAKE2B 
7109040bd27e77b4a17e94d24060644ae9b42f618768beb4ae0659c65b33a943e6158ccf8724432ff0f97d7b3a86e2efb99795fbeed801723049a99d2dcc96c3
 SHA512 
94f3f7f3262f5c064fec4977230bbde09ca8f77e92739aa230f73ef9e1012049a2d9cefc7774a2538f732e0e7ba170214956578d64c19124bd964d4915982bb0
-DIST python-gentoo-patches-3.11.0rc2_p1.tar.xz 6292 BLAKE2B 
e52e0066ca3f53e2efd2d71c035849cd619d3a8cdeb9767cc28369f4b7f04ffd74419e7c02913d4b10958937dc8960fa4287862e8db627e5f421472a18efeb73
 SHA512 
a6ae37288e7621275b46ab1a813dfbbbf24ee511d644b4027e396f5cba56fccf94e19cb354468ea4c35cd86db2040b165c87c8e24cc2c9e598e91946a1f80863
 DIST python-gentoo-patches-3.12.0a1.tar.xz 4896 BLAKE2B 
2c1582f37372eedd3fddae0a07db718cb9bd2ae41e1b9c5807ee400c554bb9aa928445ea8043fe8d12dc64c6d23766875b5957e10aa8414658cc9e037ad87244
 SHA512 
d6f6f522ee8c9c616bea4237449417f585b0dd3606307fe80e0a3f719856ea5691c90a6ea5bf8b330d71d88477a5411f66146dc2aebb697edcfa04112bad4e2c
-DIST python-gentoo-patches-3.8.15.tar.xz 25700 BLAKE2B 
1f13964caed36f70f5d5d2637ce39ac06efd52b744c353463486844dfaa411d38c37e3e50921a97183315bf44aa36557bd071dbfd8b2a69e8f1a05de5f11bba8
 SHA512 
39326cd1cff1794ca607c769750525a77cb0a4e6435d0fab141cff82cb05d68a6269014f8a30d7143b57b51170b3efcf43bfa6b41a079f588880e5562a63d54f
 DIST python-gentoo-patches-3.8.15_p1.tar.xz 26988 BLAKE2B 
c289b6c17052187b0c8ea012c6c283c3513f7465bc14f58be22d4d38447390a6f334f60a2f5aa7b1a3393dcdb175adf6c8cc659148ea2742046fba26ad8a65b4
 SHA512 
6d20d2329b4bd9cbd147cf12211ad14d071be7434571c45a4ab4535af16ae865a09a924bf2960281e716cd0f57c7b290a7786c607995c996d2211d41fb8c7a14
-DIST python-gentoo-patches-3.9.15.tar.xz 20200 BLAKE2B 
4367cdeb0d9c27110f52f5061717e37da6b9d8a167de24417fdf2b88b4cf6d512fba2c81df90a19f02e929baaf755e70ede305b5ebbb0be94bd5ab3dc3f1bdfa
 SHA512 
9c3a20b49a29d83d2c55d7432f606ebdcaf6210c6bf6d891084d0b2161502002c6f6738cee6e05eceb8ffd6b6a40d4c6ea42f6e07634388644aaeb8f87dbdf8e
 DIST python-gentoo-patches-3.9.15_p1.tar.xz 22716 BLAKE2B 
8bfe3ed3642a6734d7662c68be50c050112c1f2ae5bc10742b47e2b2943336df3bc6b0b5e6f0c1a1180dffc0590bbdd7341e84bafbfcfaf5977cde3184de6278
 SHA512 
f68b88a296a5ba6cf352c20345abe8c1dcaf9fbcaf6e48c2d7390e5d3ca57f786bfcefb912962d6642272f00dde832595bb73b48b03f3300bc11e3417e0f5fa6

diff --git a/dev-lang/python/python-3.10.8.ebuild 
b/dev-lang/python/python-3.10.8.ebuild
deleted file mode 100644
index 0b7ad7f2c527..000000000000
--- a/dev-lang/python/python-3.10.8.ebuild
+++ /dev/null
@@ -1,459 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
-       https://www.python.org/
-       https://github.com/python/cpython/
-"
-SRC_URI="
-       https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
-       https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
-       verify-sig? (
-               https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
-       )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86"
-IUSE="
-       bluetooth build +ensurepip examples gdbm hardened libedit lto
-       +ncurses pgo +readline +sqlite +ssl test tk +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="
-       app-arch/bzip2:=
-       app-arch/xz-utils:=
-       dev-lang/python-exec[python_targets_python3_10(-)]
-       dev-libs/libffi:=
-       sys-apps/util-linux:=
-       >=sys-libs/zlib-1.1.3:=
-       virtual/libcrypt:=
-       virtual/libintl
-       ensurepip? ( dev-python/ensurepip-wheels )
-       gdbm? ( sys-libs/gdbm:=[berkdb] )
-       ncurses? ( >=sys-libs/ncurses-5.2:= )
-       readline? (
-               !libedit? ( >=sys-libs/readline-4.1:= )
-               libedit? ( dev-libs/libedit:= )
-       )
-       sqlite? ( >=dev-db/sqlite-3.3.8:3= )
-       ssl? ( >=dev-libs/openssl-1.1.1:= )
-       tk? (
-               >=dev-lang/tcl-8.0:=
-               >=dev-lang/tk-8.0:=
-               dev-tcltk/blt:=
-               dev-tcltk/tix
-       )
-       xml? ( >=dev-libs/expat-2.1:= )
-       !!<sys-apps/sandbox-2.21
-"
-# bluetooth requires headers from bluez
-DEPEND="
-       ${RDEPEND}
-       bluetooth? ( net-wireless/bluez )
-       test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
-       sys-devel/autoconf-archive
-       virtual/awk
-       virtual/pkgconfig
-       verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
-       !build? ( app-misc/mime-types )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
-       use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-       use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
-       if use verify-sig; then
-               verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
-       fi
-       default
-}
-
-src_prepare() {
-       # Ensure that internal copies of expat and libffi are not used.
-       rm -r Modules/expat || die
-       rm -r Modules/_ctypes/libffi* || die
-
-       local PATCHES=(
-               "${WORKDIR}/${PATCHSET}"
-       )
-
-       default
-
-       # https://bugs.gentoo.org/850151
-       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
-       # force the correct number of jobs
-       # https://bugs.gentoo.org/737660
-       local jobs=$(makeopts_jobs)
-       sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
-       sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
-       eautoreconf
-}
-
-src_configure() {
-       # disable automagic bluetooth headers detection
-       if ! use bluetooth; then
-               local -x ac_cv_header_bluetooth_bluetooth_h=no
-       fi
-       local disable
-       use gdbm      || disable+=" gdbm"
-       use ncurses   || disable+=" _curses _curses_panel"
-       use readline  || disable+=" readline"
-       use sqlite    || disable+=" _sqlite3"
-       use ssl       || export PYTHON_DISABLE_SSL="1"
-       use tk        || disable+=" _tkinter"
-       use xml       || disable+=" _elementtree pyexpat" # _elementtree uses 
pyexpat.
-       export PYTHON_DISABLE_MODULES="${disable}"
-
-       if ! use xml; then
-               ewarn "You have configured Python without XML support."
-               ewarn "This is NOT a recommended configuration as you"
-               ewarn "may face problems parsing any XML documents."
-       fi
-
-       if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
-               einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
-       fi
-
-       append-flags -fwrapv
-       filter-flags -malign-double
-
-       # https://bugs.gentoo.org/700012
-       if is-flagq -flto || is-flagq '-flto=*'; then
-               append-cflags $(test-flags-CC -ffat-lto-objects)
-       fi
-
-       # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-       # PKG_CONFIG needed for cross.
-       tc-export CXX PKG_CONFIG
-
-       # Fix implicit declarations on cross and prefix builds. Bug #674070.
-       if use ncurses; then
-               append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-       fi
-
-       local dbmliborder=
-       if use gdbm; then
-               dbmliborder+="${dbmliborder:+:}gdbm"
-       fi
-
-       if use pgo; then
-               local profile_task_flags=(
-                       -m test
-                       "-j$(makeopts_jobs)"
-                       --pgo-extended
-                       -x test_gdb
-                       -u-network
-
-                       # All of these seem to occasionally hang for PGO 
inconsistently
-                       # They'll even hang here but be fine in src_test 
sometimes.
-                       # bug #828535 (and related: bug #788022)
-                       -x test_asyncio
-                       -x test_httpservers
-                       -x test_logging
-                       -x test_multiprocessing_fork
-                       -x test_socket
-                       -x test_xmlrpc
-               )
-
-               if has_version "app-arch/rpm" ; then
-                       # Avoid sandbox failure (attempts to write to 
/var/lib/rpm)
-                       profile_task_flags+=(
-                               -x test_distutils
-                       )
-               fi
-               local -x PROFILE_TASK="${profile_task_flags[*]}"
-       fi
-
-       local myeconfargs=(
-               # glibc-2.30 removes it; since we can't cleanly force-rebuild
-               # Python on glibc upgrade, remove it proactively to give
-               # a chance for users rebuilding python before glibc
-               ac_cv_header_stropts_h=no
-
-               --enable-shared
-               --without-static-libpython
-               --enable-ipv6
-               --infodir='${prefix}/share/info'
-               --mandir='${prefix}/share/man'
-               --with-computed-gotos
-               --with-dbmliborder="${dbmliborder}"
-               --with-libc=
-               --enable-loadable-sqlite-extensions
-               --without-ensurepip
-               --with-system-expat
-               --with-system-ffi
-               --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
-               $(use_with lto)
-               $(use_enable pgo optimizations)
-               $(use_with readline readline "$(usex libedit editline 
readline)")
-       )
-
-       # disable implicit optimization/debugging flags
-       local -x OPT=
-
-       if tc-is-cross-compiler ; then
-               # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-               # propagated to sysconfig for built extensions
-               local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
-               local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
-               local -x CFLAGS= LDFLAGS=
-
-               # We need to build our own Python on CBUILD first, and feed it 
in.
-               # bug #847910 and bug #864911.
-               local myeconfargs_cbuild=(
-                       "${myeconfargs[@]}"
-
-                       # As minimal as possible for the mini CBUILD Python
-                       # we build just for cross.
-                       --without-lto
-                       --disable-optimizations
-               )
-
-               # Point the imminent CHOST build to the Python we just
-               # built for CBUILD.
-               export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
-
-               mkdir "${WORKDIR}"/${P}-${CBUILD} || die
-               pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
-               ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
-               # Avoid as many dependencies as possible for the cross build.
-               cat >> Makefile <<-EOF || die
-                       MODULE_NIS=disabled
-                       MODULE__DBM=disabled
-                       MODULE__GDBM=disabled
-                       MODULE__DBM=disabled
-                       MODULE__SQLITE3=disabled
-                       MODULE__HASHLIB=disabled
-                       MODULE__SSL=disabled
-                       MODULE__CURSES=disabled
-                       MODULE__CURSES_PANEL=disabled
-                       MODULE_READLINE=disabled
-                       MODULE__TKINTER=disabled
-                       MODULE_PYEXPAT=disabled
-                       MODULE_ZLIB=disabled
-               EOF
-
-               # Unfortunately, we do have to build this immediately, and
-               # not in src_compile, because CHOST configure for Python
-               # will check the existence of the Python it was pointed to
-               # immediately.
-               emake
-               popd &> /dev/null || die
-       fi
-
-       # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-       # propagated to sysconfig for built extensions
-       local -x CFLAGS_NODIST=${CFLAGS}
-       local -x LDFLAGS_NODIST=${LDFLAGS}
-       local -x CFLAGS= LDFLAGS=
-
-       econf "${myeconfargs[@]}"
-
-       if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
-               eerror "configure has detected that the sem_open function is 
broken."
-               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
-               die "Broken sem_open function (bug 496328)"
-       fi
-
-       # install epython.py as part of stdlib
-       echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
-}
-
-src_compile() {
-       # Ensure sed works as expected
-       # https://bugs.gentoo.org/594768
-       local -x LC_ALL=C
-       # Prevent using distutils bundled by setuptools.
-       # https://bugs.gentoo.org/823728
-       export SETUPTOOLS_USE_DISTUTILS=stdlib
-
-       # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
-       # end up writing bytecode & violating sandbox.
-       # bug #831897
-       local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
-
-       if use pgo ; then
-               # bug 660358
-               local -x COLUMNS=80
-               local -x PYTHONDONTWRITEBYTECODE=
-
-               addpredict /usr/lib/python3.10/site-packages
-       fi
-
-       # also need to clear the flags explicitly here or they end up
-       # in _sysconfigdata*
-       emake CPPFLAGS= CFLAGS= LDFLAGS=
-
-       # Restore saved value from above.
-       local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
-       # Work around bug 329499. See also bug 413751 and 457194.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E python
-       else
-               pax-mark m python
-       fi
-}
-
-src_test() {
-       # Tests will not work when cross compiling.
-       if tc-is-cross-compiler; then
-               elog "Disabling tests due to crosscompiling."
-               return
-       fi
-
-       local test_opts=(
-               -u-network
-               -j "$(makeopts_jobs)"
-
-               # fails
-               -x test_gdb
-       )
-
-       if use sparc ; then
-               # bug #788022
-               test_opts+=(
-                       -x test_multiprocessing_fork
-                       -x test_multiprocessing_forkserver
-               )
-       fi
-
-       # bug 660358
-       local -x COLUMNS=80
-       local -x PYTHONDONTWRITEBYTECODE=
-       # workaround https://bugs.gentoo.org/775416
-       addwrite /usr/lib/python3.10/site-packages
-
-       emake test EXTRATESTOPTS="${test_opts[*]}" \
-               CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
-}
-
-src_install() {
-       local libdir=${ED}/usr/lib/python${PYVER}
-
-       emake DESTDIR="${D}" altinstall
-
-       # Fix collisions between different slots of Python.
-       rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
-       # Cheap hack to get version with ABIFLAGS
-       local abiver=$(cd "${ED}/usr/include"; echo python*)
-       if [[ ${abiver} != python${PYVER} ]]; then
-               # Replace python3.X with a symlink to python3.Xm
-               rm "${ED}/usr/bin/python${PYVER}" || die
-               dosym "${abiver}" "/usr/bin/python${PYVER}"
-               # Create python3.X-config symlink
-               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
-               # Create python-3.5m.pc symlink
-               dosym "python-${PYVER}.pc" 
"/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
-       fi
-
-       # python seems to get rebuilt in src_install (bug 569908)
-       # Work around it for now.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E "${ED}/usr/bin/${abiver}"
-       else
-               pax-mark m "${ED}/usr/bin/${abiver}"
-       fi
-
-       rm -r "${libdir}"/ensurepip/_bundled || die
-       if ! use ensurepip; then
-               rm -r "${libdir}"/ensurepip || die
-       fi
-       if ! use sqlite; then
-               rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-       fi
-       if ! use tk; then
-               rm -r "${ED}/usr/bin/idle${PYVER}" || die
-               rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-       fi
-
-       dodoc Misc/{ACKS,HISTORY,NEWS}
-
-       if use examples; then
-               docinto examples
-               find Tools -name __pycache__ -exec rm -fr {} + || die
-               dodoc -r Tools
-       fi
-       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-       local libname=$(
-               printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
-               emake --no-print-directory -s -f - 2>/dev/null
-       )
-       newins Tools/gdb/libpython.py "${libname}"-gdb.py
-
-       newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
-       newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
-       sed \
-               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-               -e "s:@PYDOC@:pydoc${PYVER}:" \
-               -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
-               "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
-       # python-exec wrapping support
-       local pymajor=${PYVER%.*}
-       local EPYTHON=python${PYVER}
-       local scriptdir=${D}$(python_get_scriptdir)
-       mkdir -p "${scriptdir}" || die
-       # python and pythonX
-       ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
-       ln -s "python${pymajor}" "${scriptdir}/python" || die
-       # python-config and pythonX-config
-       # note: we need to create a wrapper rather than symlinking it due
-       # to some random dirname(argv[0]) magic performed by python-config
-       cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
-               #!/bin/sh
-               exec "${abiver}-config" "\${@}"
-       EOF
-       chmod +x "${scriptdir}/python${pymajor}-config" || die
-       ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
-       # 2to3, pydoc
-       ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
-       ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
-       # idle
-       if use tk; then
-               ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
-       fi
-}

diff --git a/dev-lang/python/python-3.11.0_rc2_p1.ebuild 
b/dev-lang/python/python-3.11.0_rc2_p1.ebuild
deleted file mode 100644
index bba860f7875a..000000000000
--- a/dev-lang/python/python-3.11.0_rc2_p1.ebuild
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
-       https://www.python.org/
-       https://github.com/python/cpython/
-"
-SRC_URI="
-       https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
-       https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
-       verify-sig? (
-               https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
-       )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
-IUSE="
-       bluetooth build +ensurepip examples gdbm hardened libedit lto
-       +ncurses pgo +readline +sqlite +ssl test tk
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="
-       app-arch/bzip2:=
-       app-arch/xz-utils:=
-       app-crypt/libb2
-       >=dev-libs/expat-2.1:=
-       dev-libs/libffi:=
-       sys-apps/util-linux:=
-       >=sys-libs/zlib-1.1.3:=
-       virtual/libcrypt:=
-       virtual/libintl
-       ensurepip? ( dev-python/ensurepip-wheels )
-       gdbm? ( sys-libs/gdbm:=[berkdb] )
-       ncurses? ( >=sys-libs/ncurses-5.2:= )
-       readline? (
-               !libedit? ( >=sys-libs/readline-4.1:= )
-               libedit? ( dev-libs/libedit:= )
-       )
-       sqlite? ( >=dev-db/sqlite-3.3.8:3= )
-       ssl? ( >=dev-libs/openssl-1.1.1:= )
-       tk? (
-               >=dev-lang/tcl-8.0:=
-               >=dev-lang/tk-8.0:=
-               dev-tcltk/blt:=
-               dev-tcltk/tix
-       )
-       !!<sys-apps/sandbox-2.21
-"
-# bluetooth requires headers from bluez
-DEPEND="
-       ${RDEPEND}
-       bluetooth? ( net-wireless/bluez )
-       test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
-       sys-devel/autoconf-archive
-       virtual/awk
-       virtual/pkgconfig
-       verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
-       !build? ( app-misc/mime-types )
-"
-if [[ ${PV} != *_alpha* ]]; then
-       RDEPEND+="
-               dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
-       "
-fi
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
-       use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-       use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
-       if use verify-sig; then
-               verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
-       fi
-       default
-}
-
-src_prepare() {
-       # Ensure that internal copies of expat and libffi are not used.
-       rm -r Modules/expat || die
-       rm -r Modules/_ctypes/libffi* || die
-
-       local PATCHES=(
-               "${WORKDIR}/${PATCHSET}"
-       )
-
-       default
-
-       # https://bugs.gentoo.org/850151
-       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
-       # force the correct number of jobs
-       # https://bugs.gentoo.org/737660
-       local jobs=$(makeopts_jobs)
-       sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
-       sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
-       eautoreconf
-}
-
-src_configure() {
-       local disable
-       # disable automagic bluetooth headers detection
-       if ! use bluetooth; then
-               local -x ac_cv_header_bluetooth_bluetooth_h=no
-       fi
-
-       append-flags -fwrapv
-       filter-flags -malign-double
-
-       # https://bugs.gentoo.org/700012
-       if is-flagq -flto || is-flagq '-flto=*'; then
-               append-cflags $(test-flags-CC -ffat-lto-objects)
-       fi
-
-       # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-       # PKG_CONFIG needed for cross.
-       tc-export CXX PKG_CONFIG
-
-       # Fix implicit declarations on cross and prefix builds. Bug #674070.
-       if use ncurses; then
-               append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-       fi
-
-       local dbmliborder=
-       if use gdbm; then
-               dbmliborder+="${dbmliborder:+:}gdbm"
-       fi
-
-       if use pgo; then
-               local profile_task_flags=(
-                       -m test
-                       "-j$(makeopts_jobs)"
-                       --pgo-extended
-                       -x test_gdb
-                       -u-network
-
-                       # All of these seem to occasionally hang for PGO 
inconsistently
-                       # They'll even hang here but be fine in src_test 
sometimes.
-                       # bug #828535 (and related: bug #788022)
-                       -x test_asyncio
-                       -x test_httpservers
-                       -x test_logging
-                       -x test_multiprocessing_fork
-                       -x test_socket
-                       -x test_xmlrpc
-               )
-
-               if has_version "app-arch/rpm" ; then
-                       # Avoid sandbox failure (attempts to write to 
/var/lib/rpm)
-                       profile_task_flags+=(
-                               -x test_distutils
-                       )
-               fi
-               local -x PROFILE_TASK="${profile_task_flags[*]}"
-       fi
-
-       local myeconfargs=(
-               # glibc-2.30 removes it; since we can't cleanly force-rebuild
-               # Python on glibc upgrade, remove it proactively to give
-               # a chance for users rebuilding python before glibc
-               ac_cv_header_stropts_h=no
-
-               --enable-shared
-               --without-static-libpython
-               --enable-ipv6
-               --infodir='${prefix}/share/info'
-               --mandir='${prefix}/share/man'
-               --with-computed-gotos
-               --with-dbmliborder="${dbmliborder}"
-               --with-libc=
-               --enable-loadable-sqlite-extensions
-               --without-ensurepip
-               --with-system-expat
-               --with-system-ffi
-               --with-platlibdir=lib
-               --with-pkg-config=yes
-               --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
-               $(use_with lto)
-               $(use_enable pgo optimizations)
-               $(use_with readline readline "$(usex libedit editline 
readline)")
-       )
-
-       # disable implicit optimization/debugging flags
-       local -x OPT=
-       # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-       # propagated to sysconfig for built extensions
-       local -x CFLAGS_NODIST=${CFLAGS}
-       local -x LDFLAGS_NODIST=${LDFLAGS}
-       local -x CFLAGS= LDFLAGS=
-
-       if tc-is-cross-compiler ; then
-               # We need to build our own Python on CBUILD first, and feed it 
in.
-               # bug #847910
-               local myeconfargs_cbuild=(
-                       "${myeconfargs[@]}"
-
-                       # As minimal as possible for the mini CBUILD Python
-                       # we build just for cross to satisfy 
--with-build-python.
-                       --without-lto
-                       --without-readline
-                       --disable-optimizations
-               )
-
-               myeconfargs+=(
-                       # Point the imminent CHOST build to the Python we just
-                       # built for CBUILD.
-                       --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
-               )
-
-               mkdir "${WORKDIR}"/${P}-${CBUILD} || die
-               pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
-               ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
-               # Avoid as many dependencies as possible for the cross build.
-               cat >> Makefile <<-EOF || die
-                       MODULE_NIS_STATE=disabled
-                       MODULE__DBM_STATE=disabled
-                       MODULE__GDBM_STATE=disabled
-                       MODULE__DBM_STATE=disabled
-                       MODULE__SQLITE3_STATE=disabled
-                       MODULE__HASHLIB_STATE=disabled
-                       MODULE__SSL_STATE=disabled
-                       MODULE__CURSES_STATE=disabled
-                       MODULE__CURSES_PANEL_STATE=disabled
-                       MODULE_READLINE_STATE=disabled
-                       MODULE__TKINTER_STATE=disabled
-                       MODULE_PYEXPAT_STATE=disabled
-                       MODULE_ZLIB_STATE=disabled
-               EOF
-
-               # Unfortunately, we do have to build this immediately, and
-               # not in src_compile, because CHOST configure for Python
-               # will check the existence of the --with-build-python value
-               # immediately.
-               emake
-               popd &> /dev/null || die
-       fi
-
-       econf "${myeconfargs[@]}"
-
-       if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
-               eerror "configure has detected that the sem_open function is 
broken."
-               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
-               die "Broken sem_open function (bug 496328)"
-       fi
-
-       # force-disable modules we don't want built
-       local disable_modules=( NIS )
-       use gdbm || disable_modules+=( _GDBM _DBM )
-       use sqlite || disable_modules+=( _SQLITE3 )
-       use ssl || disable_modules+=( _HASHLIB _SSL )
-       use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
-       use readline || disable_modules+=( READLINE )
-       use tk || disable_modules+=( _TKINTER )
-
-       local mod
-       for mod in "${disable_modules[@]}"; do
-               echo "MODULE_${mod}_STATE=disabled"
-       done >> Makefile || die
-
-       # install epython.py as part of stdlib
-       echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
-}
-
-src_compile() {
-       # Ensure sed works as expected
-       # https://bugs.gentoo.org/594768
-       local -x LC_ALL=C
-       # Prevent using distutils bundled by setuptools.
-       # https://bugs.gentoo.org/823728
-       export SETUPTOOLS_USE_DISTUTILS=stdlib
-       export PYTHONSTRICTEXTENSIONBUILD=1
-
-       # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
-       # end up writing bytecode & violating sandbox.
-       # bug #831897
-       local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
-
-       if use pgo ; then
-               # bug 660358
-               local -x COLUMNS=80
-               local -x PYTHONDONTWRITEBYTECODE=
-
-               addpredict /usr/lib/python3.11/site-packages
-       fi
-
-       # also need to clear the flags explicitly here or they end up
-       # in _sysconfigdata*
-       emake CPPFLAGS= CFLAGS= LDFLAGS=
-
-       # Restore saved value from above.
-       local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
-       # Work around bug 329499. See also bug 413751 and 457194.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E python
-       else
-               pax-mark m python
-       fi
-}
-
-src_test() {
-       # Tests will not work when cross compiling.
-       if tc-is-cross-compiler; then
-               elog "Disabling tests due to crosscompiling."
-               return
-       fi
-
-       # this just happens to skip test_support.test_freeze that is broken
-       # without bundled expat
-       # TODO: get a proper skip for it upstream
-       local -x LOGNAME=buildbot
-
-       local test_opts=(
-               -u-network
-               -j "$(makeopts_jobs)"
-
-               # fails
-               -x test_gdb
-       )
-
-       if use sparc ; then
-               # bug #788022
-               test_opts+=(
-                       -x test_multiprocessing_fork
-                       -x test_multiprocessing_forkserver
-               )
-       fi
-
-       # bug 660358
-       local -x COLUMNS=80
-       local -x PYTHONDONTWRITEBYTECODE=
-       # workaround https://bugs.gentoo.org/775416
-       addwrite /usr/lib/python3.11/site-packages
-
-       emake test EXTRATESTOPTS="${test_opts[*]}" \
-               CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
-}
-
-src_install() {
-       local libdir=${ED}/usr/lib/python${PYVER}
-
-       # -j1 hack for now for bug #843458
-       emake -j1 DESTDIR="${D}" altinstall
-
-       # Fix collisions between different slots of Python.
-       rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
-       # Cheap hack to get version with ABIFLAGS
-       local abiver=$(cd "${ED}/usr/include"; echo python*)
-       if [[ ${abiver} != python${PYVER} ]]; then
-               # Replace python3.X with a symlink to python3.Xm
-               rm "${ED}/usr/bin/python${PYVER}" || die
-               dosym "${abiver}" "/usr/bin/python${PYVER}"
-               # Create python3.X-config symlink
-               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
-               # Create python-3.5m.pc symlink
-               dosym "python-${PYVER}.pc" 
"/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
-       fi
-
-       # python seems to get rebuilt in src_install (bug 569908)
-       # Work around it for now.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E "${ED}/usr/bin/${abiver}"
-       else
-               pax-mark m "${ED}/usr/bin/${abiver}"
-       fi
-
-       rm -r "${libdir}"/ensurepip/_bundled || die
-       if ! use ensurepip; then
-               rm -r "${libdir}"/ensurepip || die
-       fi
-       if ! use sqlite; then
-               rm -r "${libdir}/"sqlite3 || die
-       fi
-       if ! use tk; then
-               rm -r "${ED}/usr/bin/idle${PYVER}" || die
-               rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-       fi
-
-       dodoc Misc/{ACKS,HISTORY,NEWS}
-
-       if use examples; then
-               docinto examples
-               find Tools -name __pycache__ -exec rm -fr {} + || die
-               dodoc -r Tools
-       fi
-       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-       local libname=$(
-               printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
-               emake --no-print-directory -s -f - 2>/dev/null
-       )
-       newins Tools/gdb/libpython.py "${libname}"-gdb.py
-
-       newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
-       newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
-       sed \
-               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-               -e "s:@PYDOC@:pydoc${PYVER}:" \
-               -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
-               "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
-       # python-exec wrapping support
-       local pymajor=${PYVER%.*}
-       local EPYTHON=python${PYVER}
-       local scriptdir=${D}$(python_get_scriptdir)
-       mkdir -p "${scriptdir}" || die
-       # python and pythonX
-       ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
-       ln -s "python${pymajor}" "${scriptdir}/python" || die
-       # python-config and pythonX-config
-       # note: we need to create a wrapper rather than symlinking it due
-       # to some random dirname(argv[0]) magic performed by python-config
-       cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
-               #!/bin/sh
-               exec "${abiver}-config" "\${@}"
-       EOF
-       chmod +x "${scriptdir}/python${pymajor}-config" || die
-       ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
-       # 2to3, pydoc
-       ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
-       ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
-       # idle
-       if use tk; then
-               ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
-       fi
-}
-
-pkg_postinst() {
-       local v
-       for v in ${REPLACING_VERSIONS}; do
-               if ver_test "${v}" -lt 3.11.0_beta4-r2; then
-                       ewarn "Python 3.11.0b4 has changed its module ABI.  The 
.pyc files"
-                       ewarn "installed previously are no longer valid and 
will be regenerated"
-                       ewarn "(or ignored) on the next import.  This may cause 
sandbox failures"
-                       ewarn "when installing some packages and checksum 
mismatches when removing"
-                       ewarn "old versions.  To actively prevent this, rebuild 
all packages"
-                       ewarn "installing Python 3.11 modules, e.g. using:"
-                       ewarn
-                       ewarn "  emerge -1v /usr/lib/python3.11/site-packages"
-               fi
-       done
-}

diff --git a/dev-lang/python/python-3.8.15.ebuild 
b/dev-lang/python/python-3.8.15.ebuild
deleted file mode 100644
index c45c62c2e163..000000000000
--- a/dev-lang/python/python-3.8.15.ebuild
+++ /dev/null
@@ -1,400 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
-       https://www.python.org/
-       https://github.com/python/cpython/
-"
-SRC_URI="
-       https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
-       https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
-       verify-sig? (
-               https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
-       )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86"
-IUSE="
-       bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
-       +readline +sqlite +ssl test tk wininst +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="
-       app-arch/bzip2:=
-       app-arch/xz-utils:=
-       dev-lang/python-exec[python_targets_python3_8(-)]
-       dev-libs/libffi:=
-       sys-apps/util-linux:=
-       >=sys-libs/zlib-1.1.3:=
-       virtual/libcrypt:=
-       virtual/libintl
-       ensurepip? ( dev-python/ensurepip-wheels )
-       gdbm? ( sys-libs/gdbm:=[berkdb] )
-       ncurses? ( >=sys-libs/ncurses-5.2:= )
-       readline? ( >=sys-libs/readline-4.1:= )
-       sqlite? ( >=dev-db/sqlite-3.3.8:3= )
-       ssl? ( >=dev-libs/openssl-1.1.1:= )
-       tk? (
-               >=dev-lang/tcl-8.0:=
-               >=dev-lang/tk-8.0:=
-               dev-tcltk/blt:=
-               dev-tcltk/tix
-       )
-       xml? ( >=dev-libs/expat-2.1:= )
-"
-# bluetooth requires headers from bluez
-DEPEND="
-       ${RDEPEND}
-       bluetooth? ( net-wireless/bluez )
-       test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
-       sys-devel/autoconf-archive
-       virtual/awk
-       virtual/pkgconfig
-       verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
-       !build? ( app-misc/mime-types )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-src_unpack() {
-       if use verify-sig; then
-               verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
-       fi
-       default
-}
-
-src_prepare() {
-       # Ensure that internal copies of expat and libffi are not used.
-       rm -r Modules/expat || die
-       rm -r Modules/_ctypes/libffi* || die
-
-       local PATCHES=(
-               "${WORKDIR}/${PATCHSET}"
-       )
-
-       default
-
-       # https://bugs.gentoo.org/850151
-       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
-       # force the correct number of jobs
-       # https://bugs.gentoo.org/737660
-       local jobs=$(makeopts_jobs)
-       sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
-       sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
-       eautoreconf
-}
-
-src_configure() {
-       # disable automagic bluetooth headers detection
-       if ! use bluetooth; then
-               local -x ac_cv_header_bluetooth_bluetooth_h=no
-       fi
-       local disable
-       use gdbm      || disable+=" gdbm"
-       use ncurses   || disable+=" _curses _curses_panel"
-       use readline  || disable+=" readline"
-       use sqlite    || disable+=" _sqlite3"
-       use ssl       || export PYTHON_DISABLE_SSL="1"
-       use tk        || disable+=" _tkinter"
-       use xml       || disable+=" _elementtree pyexpat" # _elementtree uses 
pyexpat.
-       export PYTHON_DISABLE_MODULES="${disable}"
-
-       if ! use xml; then
-               ewarn "You have configured Python without XML support."
-               ewarn "This is NOT a recommended configuration as you"
-               ewarn "may face problems parsing any XML documents."
-       fi
-
-       if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
-               einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
-       fi
-
-       append-flags -fwrapv
-
-       filter-flags -malign-double
-
-       # https://bugs.gentoo.org/700012
-       if is-flagq -flto || is-flagq '-flto=*'; then
-               append-cflags $(test-flags-CC -ffat-lto-objects)
-       fi
-
-       # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-       # PKG_CONFIG needed for cross.
-       tc-export CXX PKG_CONFIG
-
-       # Fix implicit declarations on cross and prefix builds. Bug #674070.
-       if use ncurses; then
-               append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-       fi
-
-       local dbmliborder=
-       if use gdbm; then
-               dbmliborder+="${dbmliborder:+:}gdbm"
-       fi
-
-       local myeconfargs=(
-               # glibc-2.30 removes it; since we can't cleanly force-rebuild
-               # Python on glibc upgrade, remove it proactively to give
-               # a chance for users rebuilding python before glibc
-               ac_cv_header_stropts_h=no
-
-               --enable-shared
-               --enable-ipv6
-               --infodir='${prefix}/share/info'
-               --mandir='${prefix}/share/man'
-               --with-computed-gotos
-               --with-dbmliborder="${dbmliborder}"
-               --with-libc=
-               --enable-loadable-sqlite-extensions
-               --without-ensurepip
-               --with-system-expat
-               --with-system-ffi
-               --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-       )
-
-       # disable implicit optimization/debugging flags
-       local -x OPT=
-
-       if tc-is-cross-compiler ; then
-               # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-               # propagated to sysconfig for built extensions
-               local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
-               local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
-               local -x CFLAGS= LDFLAGS=
-
-               # We need to build our own Python on CBUILD first, and feed it 
in.
-               # bug #847910 and bug #864911.
-               local myeconfargs_cbuild=(
-                       "${myeconfargs[@]}"
-
-                       # As minimal as possible for the mini CBUILD Python
-                       # we build just for cross.
-                       --without-lto
-                       --disable-optimizations
-               )
-
-               # Point the imminent CHOST build to the Python we just
-               # built for CBUILD.
-               export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
-
-               mkdir "${WORKDIR}"/${P}-${CBUILD} || die
-               pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
-               ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
-               # Avoid as many dependencies as possible for the cross build.
-               cat >> Makefile <<-EOF || die
-                       MODULE_NIS=disabled
-                       MODULE__DBM=disabled
-                       MODULE__GDBM=disabled
-                       MODULE__DBM=disabled
-                       MODULE__SQLITE3=disabled
-                       MODULE__HASHLIB=disabled
-                       MODULE__SSL=disabled
-                       MODULE__CURSES=disabled
-                       MODULE__CURSES_PANEL=disabled
-                       MODULE_READLINE=disabled
-                       MODULE__TKINTER=disabled
-                       MODULE_PYEXPAT=disabled
-                       MODULE_ZLIB=disabled
-               EOF
-
-               # Unfortunately, we do have to build this immediately, and
-               # not in src_compile, because CHOST configure for Python
-               # will check the existence of the Python it was pointed to
-               # immediately.
-               emake
-               popd &> /dev/null || die
-       fi
-
-       # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-       # propagated to sysconfig for built extensions
-       local -x CFLAGS_NODIST=${CFLAGS}
-       local -x LDFLAGS_NODIST=${LDFLAGS}
-       local -x CFLAGS= LDFLAGS=
-
-       econf "${myeconfargs[@]}"
-
-       if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
-               eerror "configure has detected that the sem_open function is 
broken."
-               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
-               die "Broken sem_open function (bug 496328)"
-       fi
-
-       # install epython.py as part of stdlib
-       echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
-}
-
-src_compile() {
-       # Ensure sed works as expected
-       # https://bugs.gentoo.org/594768
-       local -x LC_ALL=C
-       # Prevent using distutils bundled by setuptools.
-       # https://bugs.gentoo.org/823728
-       export SETUPTOOLS_USE_DISTUTILS=stdlib
-
-       # also need to clear the flags explicitly here or they end up
-       # in _sysconfigdata*
-       emake CPPFLAGS= CFLAGS= LDFLAGS=
-
-       # Work around bug 329499. See also bug 413751 and 457194.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E python
-       else
-               pax-mark m python
-       fi
-}
-
-src_test() {
-       # Tests will not work when cross compiling.
-       if tc-is-cross-compiler; then
-               elog "Disabling tests due to crosscompiling."
-               return
-       fi
-
-       local test_opts=(
-               -u-network
-               -j "$(makeopts_jobs)"
-
-               # fails
-               -x test_gdb
-       )
-
-       if use sparc ; then
-               # bug #788022
-               test_opts+=(
-                       -x test_multiprocessing_fork
-                       -x test_multiprocessing_forkserver
-               )
-       fi
-
-       # bug 660358
-       local -x COLUMNS=80
-       local -x PYTHONDONTWRITEBYTECODE=
-
-       emake test EXTRATESTOPTS="${test_opts[*]}" \
-               CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
-}
-
-src_install() {
-       local libdir=${ED}/usr/lib/python${PYVER}
-
-       emake DESTDIR="${D}" altinstall
-
-       # Remove static library
-       rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
-       # Fix collisions between different slots of Python.
-       rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
-       # Cheap hack to get version with ABIFLAGS
-       local abiver=$(cd "${ED}/usr/include"; echo python*)
-       if [[ ${abiver} != python${PYVER} ]]; then
-               # Replace python3.X with a symlink to python3.Xm
-               rm "${ED}/usr/bin/python${PYVER}" || die
-               dosym "${abiver}" "/usr/bin/python${PYVER}"
-               # Create python3.X-config symlink
-               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
-               # Create python-3.5m.pc symlink
-               dosym "python-${PYVER}.pc" 
"/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
-       fi
-
-       # python seems to get rebuilt in src_install (bug 569908)
-       # Work around it for now.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E "${ED}/usr/bin/${abiver}"
-       else
-               pax-mark m "${ED}/usr/bin/${abiver}"
-       fi
-
-       rm -r "${libdir}"/ensurepip/_bundled || die
-       if ! use ensurepip; then
-               rm -r "${libdir}"/ensurepip || die
-       fi
-       if ! use sqlite; then
-               rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-       fi
-       if ! use tk; then
-               rm -r "${ED}/usr/bin/idle${PYVER}" || die
-               rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-       fi
-       if ! use wininst; then
-               rm "${libdir}/distutils/command/"wininst-*.exe || die
-       fi
-
-       dodoc Misc/{ACKS,HISTORY,NEWS}
-
-       if use examples; then
-               docinto examples
-               find Tools -name __pycache__ -exec rm -fr {} + || die
-               dodoc -r Tools
-       fi
-       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-       local libname=$(
-               printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
-               emake --no-print-directory -s -f - 2>/dev/null
-       )
-       newins Tools/gdb/libpython.py "${libname}"-gdb.py
-
-       newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
-       newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
-       sed \
-               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-               -e "s:@PYDOC@:pydoc${PYVER}:" \
-               -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
-               "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
-       # python-exec wrapping support
-       local pymajor=${PYVER%.*}
-       local EPYTHON=python${PYVER}
-       local scriptdir=${D}$(python_get_scriptdir)
-       mkdir -p "${scriptdir}" || die
-       # python and pythonX
-       ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
-       ln -s "python${pymajor}" "${scriptdir}/python" || die
-       # python-config and pythonX-config
-       # note: we need to create a wrapper rather than symlinking it due
-       # to some random dirname(argv[0]) magic performed by python-config
-       cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
-               #!/bin/sh
-               exec "${abiver}-config" "\${@}"
-       EOF
-       chmod +x "${scriptdir}/python${pymajor}-config" || die
-       ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
-       # 2to3, pydoc
-       ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
-       ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
-       # idle
-       if use tk; then
-               ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
-       fi
-}

diff --git a/dev-lang/python/python-3.9.15.ebuild 
b/dev-lang/python/python-3.9.15.ebuild
deleted file mode 100644
index a4f409cd861b..000000000000
--- a/dev-lang/python/python-3.9.15.ebuild
+++ /dev/null
@@ -1,454 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
-       https://www.python.org/
-       https://github.com/python/cpython/
-"
-SRC_URI="
-       https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
-       https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
-       verify-sig? (
-               https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
-       )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86"
-IUSE="
-       bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
-       +readline +sqlite +ssl test tk +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="
-       app-arch/bzip2:=
-       app-arch/xz-utils:=
-       dev-lang/python-exec[python_targets_python3_9(-)]
-       dev-libs/libffi:=
-       sys-apps/util-linux:=
-       >=sys-libs/zlib-1.1.3:=
-       virtual/libcrypt:=
-       virtual/libintl
-       ensurepip? ( dev-python/ensurepip-wheels )
-       gdbm? ( sys-libs/gdbm:=[berkdb] )
-       ncurses? ( >=sys-libs/ncurses-5.2:= )
-       readline? ( >=sys-libs/readline-4.1:= )
-       sqlite? ( >=dev-db/sqlite-3.3.8:3= )
-       ssl? ( >=dev-libs/openssl-1.1.1:= )
-       tk? (
-               >=dev-lang/tcl-8.0:=
-               >=dev-lang/tk-8.0:=
-               dev-tcltk/blt:=
-               dev-tcltk/tix
-       )
-       xml? ( >=dev-libs/expat-2.1:= )
-"
-# bluetooth requires headers from bluez
-DEPEND="
-       ${RDEPEND}
-       bluetooth? ( net-wireless/bluez )
-       test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
-       sys-devel/autoconf-archive
-       virtual/awk
-       virtual/pkgconfig
-       verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
-       !build? ( app-misc/mime-types )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
-       use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-       use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
-       if use verify-sig; then
-               verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
-       fi
-       default
-}
-
-src_prepare() {
-       # Ensure that internal copies of expat and libffi are not used.
-       rm -r Modules/expat || die
-       rm -r Modules/_ctypes/libffi* || die
-
-       local PATCHES=(
-               "${WORKDIR}/${PATCHSET}"
-       )
-
-       default
-
-       # https://bugs.gentoo.org/850151
-       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
-       # force the correct number of jobs
-       # https://bugs.gentoo.org/737660
-       local jobs=$(makeopts_jobs)
-       sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
-       sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
-       eautoreconf
-}
-
-src_configure() {
-       # disable automagic bluetooth headers detection
-       if ! use bluetooth; then
-               local -x ac_cv_header_bluetooth_bluetooth_h=no
-       fi
-       local disable
-       use gdbm      || disable+=" gdbm"
-       use ncurses   || disable+=" _curses _curses_panel"
-       use readline  || disable+=" readline"
-       use sqlite    || disable+=" _sqlite3"
-       use ssl       || export PYTHON_DISABLE_SSL="1"
-       use tk        || disable+=" _tkinter"
-       use xml       || disable+=" _elementtree pyexpat" # _elementtree uses 
pyexpat.
-       export PYTHON_DISABLE_MODULES="${disable}"
-
-       if ! use xml; then
-               ewarn "You have configured Python without XML support."
-               ewarn "This is NOT a recommended configuration as you"
-               ewarn "may face problems parsing any XML documents."
-       fi
-
-       if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
-               einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
-       fi
-
-       append-flags -fwrapv
-       filter-flags -malign-double
-
-       # https://bugs.gentoo.org/700012
-       if is-flagq -flto || is-flagq '-flto=*'; then
-               append-cflags $(test-flags-CC -ffat-lto-objects)
-       fi
-
-       # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-       # PKG_CONFIG needed for cross.
-       tc-export CXX PKG_CONFIG
-
-       # Fix implicit declarations on cross and prefix builds. Bug #674070.
-       if use ncurses; then
-               append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-       fi
-
-       local dbmliborder=
-       if use gdbm; then
-               dbmliborder+="${dbmliborder:+:}gdbm"
-       fi
-
-       if use pgo; then
-               local profile_task_flags=(
-                       -m test
-                       "-j$(makeopts_jobs)"
-                       --pgo-extended
-                       -x test_gdb
-                       -u-network
-
-                       # All of these seem to occasionally hang for PGO 
inconsistently
-                       # They'll even hang here but be fine in src_test 
sometimes.
-                       # bug #828535 (and related: bug #788022)
-                       -x test_asyncio
-                       -x test_httpservers
-                       -x test_logging
-                       -x test_multiprocessing_fork
-                       -x test_socket
-                       -x test_xmlrpc
-               )
-
-               if has_version "app-arch/rpm" ; then
-                       # Avoid sandbox failure (attempts to write to 
/var/lib/rpm)
-                       profile_task_flags+=(
-                               -x test_distutils
-                       )
-               fi
-               local -x PROFILE_TASK="${profile_task_flags[*]}"
-       fi
-
-       local myeconfargs=(
-               # glibc-2.30 removes it; since we can't cleanly force-rebuild
-               # Python on glibc upgrade, remove it proactively to give
-               # a chance for users rebuilding python before glibc
-               ac_cv_header_stropts_h=no
-
-               --enable-shared
-               --enable-ipv6
-               --infodir='${prefix}/share/info'
-               --mandir='${prefix}/share/man'
-               --with-computed-gotos
-               --with-dbmliborder="${dbmliborder}"
-               --with-libc=
-               --enable-loadable-sqlite-extensions
-               --without-ensurepip
-               --with-system-expat
-               --with-system-ffi
-               --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
-               $(use_with lto)
-               $(use_enable pgo optimizations)
-       )
-
-       # disable implicit optimization/debugging flags
-       local -x OPT=
-
-       if tc-is-cross-compiler ; then
-               # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-               # propagated to sysconfig for built extensions
-               local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
-               local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
-               local -x CFLAGS= LDFLAGS=
-
-               # We need to build our own Python on CBUILD first, and feed it 
in.
-               # bug #847910 and bug #864911.
-               local myeconfargs_cbuild=(
-                       "${myeconfargs[@]}"
-
-                       # As minimal as possible for the mini CBUILD Python
-                       # we build just for cross.
-                       --without-lto
-                       --disable-optimizations
-               )
-
-               # Point the imminent CHOST build to the Python we just
-               # built for CBUILD.
-               export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
-
-               mkdir "${WORKDIR}"/${P}-${CBUILD} || die
-               pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
-               ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
-               # Avoid as many dependencies as possible for the cross build.
-               cat >> Makefile <<-EOF || die
-                       MODULE_NIS=disabled
-                       MODULE__DBM=disabled
-                       MODULE__GDBM=disabled
-                       MODULE__DBM=disabled
-                       MODULE__SQLITE3=disabled
-                       MODULE__HASHLIB=disabled
-                       MODULE__SSL=disabled
-                       MODULE__CURSES=disabled
-                       MODULE__CURSES_PANEL=disabled
-                       MODULE_READLINE=disabled
-                       MODULE__TKINTER=disabled
-                       MODULE_PYEXPAT=disabled
-                       MODULE_ZLIB=disabled
-               EOF
-
-               # Unfortunately, we do have to build this immediately, and
-               # not in src_compile, because CHOST configure for Python
-               # will check the existence of the Python it was pointed to
-               # immediately.
-               emake
-               popd &> /dev/null || die
-       fi
-
-       # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
-       # propagated to sysconfig for built extensions
-       local -x CFLAGS_NODIST=${CFLAGS}
-       local -x LDFLAGS_NODIST=${LDFLAGS}
-       local -x CFLAGS= LDFLAGS=
-
-       econf "${myeconfargs[@]}"
-
-       if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
-               eerror "configure has detected that the sem_open function is 
broken."
-               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
-               die "Broken sem_open function (bug 496328)"
-       fi
-
-       # install epython.py as part of stdlib
-       echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
-}
-
-src_compile() {
-       # Ensure sed works as expected
-       # https://bugs.gentoo.org/594768
-       local -x LC_ALL=C
-       # Prevent using distutils bundled by setuptools.
-       # https://bugs.gentoo.org/823728
-       export SETUPTOOLS_USE_DISTUTILS=stdlib
-
-       # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
-       # end up writing bytecode & violating sandbox.
-       # bug #831897
-       local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
-
-       if use pgo ; then
-               # bug 660358
-               local -x COLUMNS=80
-               local -x PYTHONDONTWRITEBYTECODE=
-
-               addpredict /usr/lib/python3.9/site-packages
-       fi
-
-       # also need to clear the flags explicitly here or they end up
-       # in _sysconfigdata*
-       emake CPPFLAGS= CFLAGS= LDFLAGS=
-
-       # Restore saved value from above.
-       local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
-       # Work around bug 329499. See also bug 413751 and 457194.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E python
-       else
-               pax-mark m python
-       fi
-}
-
-src_test() {
-       # Tests will not work when cross compiling.
-       if tc-is-cross-compiler; then
-               elog "Disabling tests due to crosscompiling."
-               return
-       fi
-
-       local test_opts=(
-               -u-network
-               -j "$(makeopts_jobs)"
-
-               # fails
-               -x test_gdb
-       )
-
-       if use sparc ; then
-               # bug #788022
-               test_opts+=(
-                       -x test_multiprocessing_fork
-                       -x test_multiprocessing_forkserver
-               )
-       fi
-
-       # bug 660358
-       local -x COLUMNS=80
-       local -x PYTHONDONTWRITEBYTECODE=
-
-       emake test EXTRATESTOPTS="${test_opts[*]}" \
-               CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
-}
-
-src_install() {
-       local libdir=${ED}/usr/lib/python${PYVER}
-
-       emake DESTDIR="${D}" altinstall
-
-       # Remove static library
-       rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
-       # Fix collisions between different slots of Python.
-       rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
-       # Cheap hack to get version with ABIFLAGS
-       local abiver=$(cd "${ED}/usr/include"; echo python*)
-       if [[ ${abiver} != python${PYVER} ]]; then
-               # Replace python3.X with a symlink to python3.Xm
-               rm "${ED}/usr/bin/python${PYVER}" || die
-               dosym "${abiver}" "/usr/bin/python${PYVER}"
-               # Create python3.X-config symlink
-               dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
-               # Create python-3.5m.pc symlink
-               dosym "python-${PYVER}.pc" 
"/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
-       fi
-
-       # python seems to get rebuilt in src_install (bug 569908)
-       # Work around it for now.
-       if has_version dev-libs/libffi[pax-kernel]; then
-               pax-mark E "${ED}/usr/bin/${abiver}"
-       else
-               pax-mark m "${ED}/usr/bin/${abiver}"
-       fi
-
-       rm -r "${libdir}"/ensurepip/_bundled || die
-       if ! use ensurepip; then
-               rm -r "${libdir}"/ensurepip || die
-       fi
-       if ! use sqlite; then
-               rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-       fi
-       if ! use tk; then
-               rm -r "${ED}/usr/bin/idle${PYVER}" || die
-               rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-       fi
-
-       dodoc Misc/{ACKS,HISTORY,NEWS}
-
-       if use examples; then
-               docinto examples
-               find Tools -name __pycache__ -exec rm -fr {} + || die
-               dodoc -r Tools
-       fi
-       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-       local libname=$(
-               printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
-               emake --no-print-directory -s -f - 2>/dev/null
-       )
-       newins Tools/gdb/libpython.py "${libname}"-gdb.py
-
-       newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
-       newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
-       sed \
-               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-               -e "s:@PYDOC@:pydoc${PYVER}:" \
-               -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
-               "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
-       # python-exec wrapping support
-       local pymajor=${PYVER%.*}
-       local EPYTHON=python${PYVER}
-       local scriptdir=${D}$(python_get_scriptdir)
-       mkdir -p "${scriptdir}" || die
-       # python and pythonX
-       ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
-       ln -s "python${pymajor}" "${scriptdir}/python" || die
-       # python-config and pythonX-config
-       # note: we need to create a wrapper rather than symlinking it due
-       # to some random dirname(argv[0]) magic performed by python-config
-       cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
-               #!/bin/sh
-               exec "${abiver}-config" "\${@}"
-       EOF
-       chmod +x "${scriptdir}/python${pymajor}-config" || die
-       ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
-       # 2to3, pydoc
-       ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
-       ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
-       # idle
-       if use tk; then
-               ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
-       fi
-}

Reply via email to