summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-21 00:15:53 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-21 00:15:53 +0000
commitdb653baf275126269bb89ea0d2bdb8e50497a94c (patch)
tree9d1ee94cfa7312384acd366d3dd8f629660b3f18 /dev-lang
parent1534d50aaf24272ec425fa439389ef7e1f7bf174 (diff)
gentoo auto-resync : 21:02:2025 - 00:15:53
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin22672 -> 22664 bytes
-rw-r--r--dev-lang/go-bootstrap/Manifest19
-rwxr-xr-xdev-lang/go-bootstrap/files/make-go-bootstraps32
-rw-r--r--dev-lang/go-bootstrap/go-bootstrap-1.22.12.ebuild51
-rw-r--r--dev-lang/python/Manifest4
-rw-r--r--dev-lang/python/python-3.10.16_p2.ebuild595
-rw-r--r--dev-lang/python/python-3.11.11_p2.ebuild629
7 files changed, 1312 insertions, 18 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index ae12a03daa88..91669bdd40ae 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/go-bootstrap/Manifest b/dev-lang/go-bootstrap/Manifest
index e0d188575039..7403cef7a9c1 100644
--- a/dev-lang/go-bootstrap/Manifest
+++ b/dev-lang/go-bootstrap/Manifest
@@ -1,4 +1,4 @@
-AUX make-go-bootstraps 1440 BLAKE2B 9ff79d6209a5b7b9b843e66e800155d738b8c2164af38b410ec71cc7c9b4737d2fa89be90ad122e3afe355ceb8268ca8cc82e2f615f046f77cccca894f0ed9e6 SHA512 0d815704dcda842f9873073e15f7b533741d472386e6424b0262cf010fa5ec1e03e484fffb5c400b07abf7a8f121ae900e4991d7aceb3c810e25dd3bfa9194ce
+AUX make-go-bootstraps 1568 BLAKE2B 1570c17b5908c3bfaaf6fc67ef6326744f91f9cc289f1db01cb8706f8ae9e81913585ee8c507f2612cbe10f472e77ba9a55163b61ce30d7102049d65c9cbb097 SHA512 280112d98672cf0d8fea95faefd87c758ce4a6df33e3dcd3b756a0aa5c107337b136d845b63e285629ebb83661eb8f32bb0ab13c2bae8ef835e8084d0b9ddf3f
DIST go-1.20.14-darwin-amd64-bootstrap.tbz 94549781 BLAKE2B 604d6b183b6be19f98f330a73fd07db1824442b14c3870447340e628b3fd13c87972d9a192f888e329b1d0337a48d66651f35c0237e4a5a609091e73385925d7 SHA512 ef2b179a096319dca8cd3907ad7c9d80bc61d409ce198a323073fbceb3b6ab3f5752eaeeb8f37f9287ba1c009f5e37da341e359228d0509ab766340f61a10c68
DIST go-1.20.14-darwin-arm64-bootstrap.tbz 92159553 BLAKE2B 28a95dafd3126e95fd997744ca20385bf634c3bc08be5698bc314c8e902e261d66ebae754492997562ba3bd2635f68ad8173cbd84aa6e59bcf38fe0c2cd35a65 SHA512 1f39a132037f9b1141cac752c20c34da0f87583dba9094965ffb7f65015d3d5273a1b63201e1f68e00d436aa1b1d79972f6f50a195a3d5799f012fb3fbaa20b6
DIST go-1.20.14-linux-386-bootstrap.tbz 96049477 BLAKE2B 63e52312a2ea5edf9fc3aa2f6dbcf7438ddaa5d41705426ee6e1060d56ff7837e6b16e74e90567aa96b1e1b90088503936614caf5d41f3a83dd278cc252975f1 SHA512 c9fc51ce495b3b48915e8da2bb404adfe59c957480dbf174491c63b528f7e0fc4bcadbfb8395a2885cc83523e9245c0e4718637313b4fbaeb53bf0f18be0c7ce
@@ -15,5 +15,22 @@ DIST go-1.20.14-linux-ppc64le-bootstrap.tbz 90575770 BLAKE2B 0c76ba27d41d329a7c5
DIST go-1.20.14-linux-riscv64-bootstrap.tbz 93091456 BLAKE2B 197811a57c728ef546b9660328ab6624b87ae085e98264e5b3317fc66581fc0ee8ef95af3040c07a6cebfe30da88d209bf5bdb8ee11a647b716fa3122031724a SHA512 a3faaeaac90354a9be130d01108c8fdb178a0427d7dab0362c570428216ddd362f55044021082cbbb466f3a69458869d4978bd28652f7a4e55295d357c9c7c54
DIST go-1.20.14-linux-s390x-bootstrap.tbz 94671247 BLAKE2B 7ff60a7c1245b66cbe852662589fe3a87c4fc29a1134dd46ad76272b9bc619b7ffba823374658a0f8d54a440d808d3eb8d97788483bbe69628bda167f4377109 SHA512 bc6c7efddfcc90fe2f1bbb2dee7f4396eb5b478eee7236216ca00c5bd4ce1dc0e3315edb58bf6ef3f7a7e5c45950e6f5be9163cfffd1cf5c36004aaa4916a1b7
DIST go-1.20.14-solaris-amd64-bootstrap.tbz 95085901 BLAKE2B aed378201db555121bae1ab049d44b297dc922d7cd977c3d6f2dbff1b3cc46f59a697a211c244ed2f012d5c8ea6211501527512325188e34a3ccd2946ef6dbe8 SHA512 22a8b79ab2eb08319d1d9fb517458cdafd1a4fcbba2da70935d65ccdcc3808978ca0dbb045a7cfde2ca43eb6effd3ce687d2f99ee24dedcae9967b414fd6fe57
+DIST go-bootstrap-1.22.12-darwin-amd64.tbz 64955332 BLAKE2B 8b5f2a60f2e2d250e5e944decaafe4bbae02b989467a30ad01542b5b95820b2bd5127ce42467e82d10bcdd6985b097b2b38a6e61b19071916b8f9dfab04b8ea7 SHA512 d143031c7032620460190618ccbc0112dd0f01e2cf64c48a75b554538be0d49b979d02050189e81a50b4f172bb5ffe4db5163936c1d8a6bfc09c5e2ea12bbed8
+DIST go-bootstrap-1.22.12-darwin-arm64.tbz 62274977 BLAKE2B 2fb43878eff785652fa41edbcdb9fbb7c2d54b3f012a594a8c14d997a10b31aba347fc93a9887b39cad5b1817e9249224e22fba3a2ced90241c75f93b9eee2fa SHA512 161312a2a8ea953215b006ff73cf2e0345db4a7079429fabe022e2a0f3dfa2dba441bf05b0ef9450d39a20f4d2e5ac1a5d1dd659030551a996c869670d0e4bdc
+DIST go-bootstrap-1.22.12-linux-386.tbz 61905608 BLAKE2B 036006e1d73663c9adc0746c1e6b048df0630fd6dcb35513e3085f92225e71e3e0678b551d9b6bcae8efbb71684c0718bf49d06941661c88f56c4e9473464778 SHA512 be643e1a327221ccffe6b9bdeeeea38b6bad0fcea9bd8305a774a0a93103042f3f96b2d51983d87f92971cb71d8f1817a3da57048646a8b76f83641fae94bb36
+DIST go-bootstrap-1.22.12-linux-amd64.tbz 64061301 BLAKE2B eee49d2ffe36dc50bdffad69bc2e106736f62e04d1bca3da55400f47f032f2bb79ef772eb6eac0f9fac17bc340770a6bed5c86e4968da4c8613d032bff4dd426 SHA512 3ba2083435af5be97cd02f36d27d100b62285d1f680d519309619d47e07fd0184a4dbf92c5f00b2c661b62ffc66ab03e0add0331a122730e35270a2dc9a83b5c
+DIST go-bootstrap-1.22.12-linux-arm.tbz 61282567 BLAKE2B 4ca77e3d4488973f4ea190003d9ab181de0bb6a216074bbc85118e39420e03749bb83b326d1f5221a8ca117e78656af15bfde3e28b1b276d999476892ea87e59 SHA512 0d3a8fa91872c94de22bf07969573196593b556592c017dcdde794dd620cee92d1ac33a2d3505cd1d3ca55df167595b82c18991e7cb06d8399a6d25adf3bf6fd
+DIST go-bootstrap-1.22.12-linux-arm64.tbz 60296549 BLAKE2B 29417911aa5c9096c1fddb6bff4684865c873a51a2acbdf8fff18556cd3d920d92bce6df8cf8401e34c187ee44dd840e521bd9457aef76ba8948170ef755e337 SHA512 7bb3a375a65eab9d5e5a66bf070948034734af245b4cb06825009fb10f122a7a41f0f718f3838e2a8d37dcf8440348c1dfbc12370f65651388c473400850e84f
+DIST go-bootstrap-1.22.12-linux-loong64.tbz 60917942 BLAKE2B 59904642dcf0874afafb714dc31e2dd71920615d45f4111933661786921436a20f10bd1625e3742f040d250934b103f9ffe37f317ca1ba55dd92bd96bbb759cf SHA512 f170b92ed621a7ec0c83c77b4cdd8ce7ccac3fa05f659a40cbf729b3e28a20181dc0295464ca627100cc8141e3a3d7f05e0a811d55d7abf661020faf7511755c
+DIST go-bootstrap-1.22.12-linux-mips.tbz 58135007 BLAKE2B f84fddc176549fa3b903c307c90df9b5177d79322b61b6647795fbdfc728fd9d642c7eda0634e41f6ed3563c5fdc1ce7d4d26ff179a19c60270ac9c9752cae03 SHA512 eb0642cbf7f5cef2ea40809f98fb66f882236defb948c0034deeb6e7b332ed7eabda6f4028bd417d1b6a48c06d7c970dff818f54dd9f20db3bcff9322070382a
+DIST go-bootstrap-1.22.12-linux-mips64.tbz 57252236 BLAKE2B 1ef06b548fbeb7fbafde5119b62259bec42e234deedc48e7909bd5699eede30dd5ef019416879959e302775f7e685079e1f8ebc393c48c8b6321722d5ed139cc SHA512 ade5f0e2b5d9de43e09bf281b6ce83784684a03e6fde5197283efba24bdefba20d938378f0c6d7a31db74762a0542de1473f866abf41f0e6271d140f993c7b6e
+DIST go-bootstrap-1.22.12-linux-mips64le.tbz 57548639 BLAKE2B edb1866b1940f3c213f3a4090086e4be814947bccf5b27b492584e241ca3a723bd5b895d87d4fb8e68cb50b7f046aeb76f734a17290e61a4cd1e1b1b9bc42238 SHA512 2956596b9ae5c98b5b78d95db68ce424857510bcdcb82682bb135606ada8c987ac888840de9b4e0b3700120734665b8e880590d459ffd249c426baef61c964ae
+DIST go-bootstrap-1.22.12-linux-mipsle.tbz 58434883 BLAKE2B d926b7990b8e458bbc8f0890a29ae1959b2e1926e8e29a708a7076ceb53e02c0294f15708dcd8a99e1141d09b519dfa686a164e3e81faa793ba0b2e0a2a4b93d SHA512 ca5cf6fb254267e66d80a6a140da3bbeee532f2c8200370e81db315cd4e88837f9fc640f23286b843f6bfb432a10f7b53a63da14f0bb0538fecf7740f3657ac5
+DIST go-bootstrap-1.22.12-linux-ppc64.tbz 59542900 BLAKE2B 81ed60e3f64f76bd8f97aac7a79f4026fc7f4a644e92ed011d7b4295398ef52838dfcef2e8c9e8163bf7f2949611a77246a086bcaf713755768a147690656b2f SHA512 b6230a2dc29cd5547e15f06bcfdb5f74a6060ce5050c0ac9a4ab1ee3c4046dbea22a7f59ad8351302d2d697bccee0426edd27105b67b6c0d330e655db3ed7036
+DIST go-bootstrap-1.22.12-linux-ppc64le.tbz 60214299 BLAKE2B 9506975d7ed9170c28078d6d10bf9fcbd11040368360803964c178f015dba5fc73e3a8e69af62e00cea014a712a2dec619e39826255f7c15ecc160ce9255b97d SHA512 3c24fe4979b7c6c3eed39fd7ba477c32d68c6555126085696d54531323f6c96776f83ace18bb4b0a305827bbb5449bfabf90fe9bc4bdbf74c99392b0a69a10d6
+DIST go-bootstrap-1.22.12-linux-riscv64.tbz 61337982 BLAKE2B 04bad675e1d0bbd7578acf8ac545b09bb0542cc8336b3e7ed0d62c0a2620ab63c3d1e28644bfdce984130ef851d19e59375ab9ffe8e3cea6f9dbb8cd0ac56246 SHA512 b0002a0a1fa976b1b575920053bb88cd89fb5b76ff1e34bde1ef001cc87f70541a60f755d9dd9d898ca05bfb59a4b79e6892082f43b5cb78c62c8703b14c10d1
+DIST go-bootstrap-1.22.12-linux-s390x.tbz 62183020 BLAKE2B f6fb0f28e2e24523b49263cc5f74c7d0c54e7933ce56fd3c6774b4d003cc0d8ae774d86133f84cc475bb6270b2c3f44f6576f81689f38e8fffd679f097d0963b SHA512 34144ead46490c57b486f01ca86e78025c45b74c721128047095bab02fc9e31c7681e172f4726bb87d422889eb78b3e9762de242e7c9eb1770ac322edb1c933f
+DIST go-bootstrap-1.22.12-solaris-amd64.tbz 63917252 BLAKE2B ec274db725ae7e27174e708c8e719494a2053de01d829d594c29d16c23576bd1118968855b0b9ac4e904817c3f06ce6ac49301d749f3c8c4615066d92af5f5ea SHA512 22021ce136c6885a5f90cb42a6f8683c5ad1f6dae5f2f6f0c296556ddc571ec4d5b0c200b1739dda6121d717729a1f1ab27eeac46d9589187d96105996423d0a
EBUILD go-bootstrap-1.20.14.ebuild 1905 BLAKE2B fa27a4c302b5f21f27f8dda30c46d4b776452fff4d68147623beecbbf73e21ded056cebc91efd315615f765ee438405ef3fb0d1a8ae4826383922b4a758e3e2f SHA512 ae4485db8e3765d1bd9373b5f1b5ab9bef21156361bcfde98ca4fe24c589e85c1d04520de403f2a5663ca23c3ce863f32324b44304419a92c63d6de6ca0dd42c
+EBUILD go-bootstrap-1.22.12.ebuild 1686 BLAKE2B 1d1b743aed78a812044e5aef122fb695dfe9dec253a72b6aa8428f972360034697237ec332bd1055cbe849ca3b734996f985a504b4437122130def46560dbc95 SHA512 f9712a8c0b5b7d6350dcf8f668f19ce1f0b36a6813649e098dc1fd3c4b01c73c36182b441e143429c8dce2c30586f7f6c87c859e32b4a68c991f5c8809295483
MISC metadata.xml 416 BLAKE2B 160ffa2aa64cbf398e08b31e47fc4d44dd4488b1f416bcdd2aa67269588c6869c3aecfa98d697c2930b1d8f7843117ff3d1e3fc665e796022276fd2e37cb6518 SHA512 8a75c24b4fc5f61c612fb297b3ff761bd30884618aba4bafedcc1bed1a091584275a03e673365cc5f91d3f7f021409528de418d4361e3a250bc67ad747f0a5fa
diff --git a/dev-lang/go-bootstrap/files/make-go-bootstraps b/dev-lang/go-bootstrap/files/make-go-bootstraps
index 8340dbaecfd8..6ad27296b57e 100755
--- a/dev-lang/go-bootstrap/files/make-go-bootstraps
+++ b/dev-lang/go-bootstrap/files/make-go-bootstraps
@@ -31,25 +31,23 @@ go_tuples=(
solaris-amd64
)
-go_version=$(go version)
-go_version=${go_version##*go}
-go_version=${go_version%% *}
+go_tag=$(go env GOVERSION)
+go_version=${go_tag#go}
+go_repo="https://github.com/golang/go"
build_path=$(mktemp -d /tmp/go-bootstraps-XXXXXX)
-pushd "${build_path}"
-git clone https://github.com/golang/go.git
-cd go
-git checkout go"${go_version}"
-cd src
-for tuple in ${go_tuples[@]}; do
+pushd "${build_path}" > /dev/null
+git clone --depth 1 --quiet --branch "${go_tag}" "${go_repo}" "${build_path}/go"
+for tuple in "${go_tuples[@]}"; do
printf "Building go version %s bootstrap tarball for %s\n" "${go_version}" "${tuple}"
+ pushd go/src > /dev/null
GO386=softfloat GOOS=${tuple%%-*} GOARCH=${tuple##*-} ./bootstrap.bash
- rm -fr ../../go-${tuple}-bootstrap
+ git clean -d -f -x
+ popd > /dev/null
+ rm -fr "go-${tuple}-bootstrap"
+ mv "go-${tuple}-bootstrap.tbz" "go-bootstrap-${go_version}-${tuple}.tbz"
done
-cd ../..
rm -fr go
-for f in *tbz; do
- mv "${f}" "${f/go/go-${go_version}}"
- done
-popd
-mv "${build_path}" "${build_path%-*}"
-printf "The bootstrap tarballs are stored in %s\n" "${build_path%-*}"
+popd /dev/null
+final_path="${HOME}/go-bootstrap-${go_version}"
+mv "${build_path}" "${final_path}"
+printf "The bootstrap tarballs are stored in %s\n" "${final_path}"
diff --git a/dev-lang/go-bootstrap/go-bootstrap-1.22.12.ebuild b/dev-lang/go-bootstrap/go-bootstrap-1.22.12.ebuild
new file mode 100644
index 000000000000..e590f0e854ac
--- /dev/null
+++ b/dev-lang/go-bootstrap/go-bootstrap-1.22.12.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Bootstrap package for dev-lang/go"
+HOMEPAGE="https://golang.org"
+BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
+SRC_URI="
+ x64-macos? ( ${BOOTSTRAP_DIST}/${P}-darwin-amd64.tbz )
+ arm64-macos? ( ${BOOTSTRAP_DIST}/${P}-darwin-arm64.tbz )
+ x86? ( ${BOOTSTRAP_DIST}/${P}-linux-386.tbz )
+ amd64? ( ${BOOTSTRAP_DIST}/${P}-linux-amd64.tbz )
+ arm64? ( ${BOOTSTRAP_DIST}/${P}-linux-arm64.tbz )
+ arm? ( ${BOOTSTRAP_DIST}/${P}-linux-arm.tbz )
+ loong? ( ${BOOTSTRAP_DIST}/${P}-linux-loong64.tbz )
+ mips? (
+ abi_mips_n64? (
+ !big-endian? ( ${BOOTSTRAP_DIST}/${P}-linux-mips64le.tbz )
+ big-endian? ( ${BOOTSTRAP_DIST}/${P}-linux-mips64.tbz )
+ )
+ abi_mips_o32? (
+ !big-endian? ( ${BOOTSTRAP_DIST}/${P}-linux-mipsle.tbz )
+ big-endian? ( ${BOOTSTRAP_DIST}/${P}-linux-mips.tbz )
+ )
+ )
+ ppc64? (
+ !big-endian? ( ${BOOTSTRAP_DIST}/${P}-linux-ppc64le.tbz )
+ big-endian? ( ${BOOTSTRAP_DIST}/${P}-linux-ppc64.tbz )
+ )
+ riscv? ( ${BOOTSTRAP_DIST}/${P}-linux-riscv64.tbz )
+ s390? ( ${BOOTSTRAP_DIST}/${P}-linux-s390x.tbz )
+ x64-solaris? ( ${BOOTSTRAP_DIST}/${P}-solaris-amd64.tbz )
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos ~x64-solaris"
+IUSE="abi_mips_n64 abi_mips_o32 big-endian"
+RESTRICT="strip"
+QA_PREBUILT="*"
+
+S="${WORKDIR}"
+
+src_install() {
+ dodir /usr/lib
+ mv go-*-bootstrap "${ED}/usr/lib/go-bootstrap" || die
+
+ # testdata directories are not needed on the installed system
+ rm -fr $(find "${ED}"/usr/lib/go-bootstrap -iname testdata -type d -print)
+}
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 5dbcaa28b33f..7baeed7b79de 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -30,7 +30,9 @@ DIST Python-3.9.21.tar.xz 19647056 BLAKE2B 7f77a7fb38d9a9f4fda7007587f744ade5f32
DIST Python-3.9.21.tar.xz.asc 833 BLAKE2B f6e666179d745638a38ace35e13c26cc3e07c116a8c8362cc260a74113cd29a5c1909d2091f2eed4bb088bc71b79ed18c5503739d1cc3cb7ff95d625f4311421 SHA512 1e5e5a5db8074a7ee5eb51e6c789d6e46467165d72d2d636d1fc0d3e15d4355051f9f7ad3063ba43b37b611095765c9d654ed890067c201c087da1eecb620ef9
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
DIST python-gentoo-patches-3.10.16_p1.tar.xz 24964 BLAKE2B 93cf5d208f80f1017e4afdcf7d3551d150a1d68c378312af43c668156d98f10087d2b6f315f717823a9aae1114e2baa999f61ce179639e5511d30ed9620c9570 SHA512 74ad92d3256d744e3572c0d858b4ba4d5f0f6fda84d8f3c1a1fb675376c2d525e2d9fd636a65c8a859a0a312eda00877b13ba311f620b6a51e47dfb082843333
+DIST python-gentoo-patches-3.10.16_p2.tar.xz 29428 BLAKE2B fa63d2fcdbb53e3b6381eaadfbcfca02a03eddd7035dd4776c706fd1aa0226a2c809260ba5a543a209a63563dab12ea109bf03a2026ea4b5797fa6afc7b45c52 SHA512 0186abf035632a3f8018052f8021c1d0dadbc28b7d03551f6992a658fe53878ac9ea86b79512e0e147efecedfda133cf7936746946238177918be9c695248f15
DIST python-gentoo-patches-3.11.11_p1.tar.xz 11644 BLAKE2B d080e1b987ea0e1b397113f20a5c84f6a34d6619a3ed9f7389fd10d95636169563fba97d212477ca7f9b93d2bd0b66c9521fc61963bb468805a661ca3ab287a7 SHA512 f6045adf25923053fc9a60506b9164c9c062580d6886f1a3dcaca00dc4affe69aa9e138f8ce93f093798ccf33322ccca2aca674ab87457df98a93dcaca234b44
+DIST python-gentoo-patches-3.11.11_p2.tar.xz 16224 BLAKE2B d8404c8c87e109d2c699dbab63c20a319c6efd5b62dab5fcc1b53b5b291e25686e69ef92b495eed0d80491cfa29ae9f523df6b53c7c6a12c3f713c53e3c5b7c6 SHA512 f1bf897305678c2b113aef4553d14e916e83312708352765725d754dffbf2f5dd7ef0f7cd84a774e4a8c18dde8a517d7eaf8e58720d73d25430b28fe49906258
DIST python-gentoo-patches-3.12.8.tar.xz 10772 BLAKE2B 9833b5ee6c307a4aa1335fd966fcd64a0f3732a97a190abdd3121b3496ea68ead9436af4ec5e3e8c0e781fd68df41403a1b2e5f29f264fc8569a883141e5f7f9 SHA512 d5906845a6259f7349a0299e185f569750b493c64ea1f6537dc8bfc0babc9b54de7db1c4f1b5b6ec2f7076937ad07ca0ca9c4941bbb8d542da6c687957bdbd5e
DIST python-gentoo-patches-3.12.8_p1.tar.xz 11088 BLAKE2B 4d7ccf4759b624aafde1ef2a0a341cda8f4d3e7c4d86586201a910d77327219e61b134985f2fe85e83892ad4ba607b4e661aed675cc038e4cc193efe9fbe6f6e SHA512 6f1d6ab2b9e958ae7d2ca3f204b7c7eb1435998919cf5a577a82bbf1339232f92a2f517c248afb9e1802850acd2b59b84c41e87f4b8582e19ec88155743cdaae
DIST python-gentoo-patches-3.12.9.tar.xz 10736 BLAKE2B 1f87d1bba8c094936e5cd3e0ef2eede0dbca3e658430f81b398735d8f02fff1f87739914014dbcb17163f8a969ffc5e7e4cce7d71557ce3c2e58487e6ed8b80f SHA512 342f11df85926e32455d52115d06b817a17f7ae104e3ea8e852046d321d829835bba7c07803c50dd5433ac8b615499428d5bc1a088b484ca0c4304eb8b2cb879
@@ -46,7 +48,9 @@ DIST python-gentoo-patches-3.9.20_p2.tar.xz 36140 BLAKE2B af0a9e08f3bfd8eb631760
DIST python-gentoo-patches-3.9.21_p1.tar.xz 35404 BLAKE2B 7b5ac27e814b06791fa5f0566763711c1b65a7c82ba66f97e237eebc6076f0bfdad3d8269ece6c4d4c238b62cc75b01f68ea3a5d7c4fffc46e88f79b2ba3e7fc SHA512 92c8548b31100a921378c72cc94a81062c96fd795fa2cd001c57a71e4af39e91b21b99e9e84db12adb142d9c4bda809445519c5c8a35545bd10230926bd7eded
EBUILD python-2.7.18_p16-r2.ebuild 8597 BLAKE2B c472b0b3c49d4f848d910ac9d1d5fcffdbdf3f6f1454a4471807a1bc5129d7d6ff86c1af4515dec79056f3b079d1a0ea81e1693cfd49af2c2338462bb1f04cff SHA512 a7b48dff6e121915589a3ad746da6f52d29bef98d0d0a02578a5cc31cf9adcb1c32c82747cb768f355671e64825f75a8593d8424b7da36c09e8523a142b1ce1f
EBUILD python-3.10.16_p1.ebuild 15531 BLAKE2B cec70438eef3917846e6d26035f33bf2a0e90515a916c4283c286744deaea86f26b33e0fe96f9fba34552bd5917750abac8ec9726cb12937140291cfab689c9f SHA512 edf67f6b68442b860d209a2216b5c72151c242972329bd62463ef9e29d172f64a7bd4d8eb708f8b6830eaaed35336ddda5343c1f30dc3199abe859d97ba4c948
+EBUILD python-3.10.16_p2.ebuild 15539 BLAKE2B 1dd164e28dfecd11ec27aadafbe67258c686aa02aefe644f1cd161d77b0009fcecb76d03de52d9904324e79ecc1880ca6229bf2b69f942bfd523bfb07d97c726 SHA512 4977b4ffe465a1a6ae7f7d590b9b5bedc608bbd9de266b8bafaa54628c7ad21e7dd691a6fff4ce9938e5159513387e8920a1bd2e80d113fd9c986943bae548c6
EBUILD python-3.11.11_p1.ebuild 16752 BLAKE2B aa28431e87c648e6bf7951c8b20c240f10f8e069fedbb41e8e6600c97d0cad0364df79dfcb60d0c8c057eb946d59b37b98aba52c0874455310e2fa7e440526d4 SHA512 1ca31c3e5965e94224e3784531d9d2adda1b93558bb2693b9a9ca82ba5a8e51f9d132ffe7fd43ab413699ae67d0043dae5b14e0ca621cbac34e19b014efd730c
+EBUILD python-3.11.11_p2.ebuild 16760 BLAKE2B 834e1990ff776d5becd18a0cd7168aeeaf4d490ed6aa7dc22e459033e84979cb565e1c4bd16aff499380841c3bca630bbe12c2621fa68aea968bda1aa530852e SHA512 cfc4cffad84f59c372fccc71889e2a647c9df84b5b55d24f59bfbde9066d803f8306b65f09c15cc40155fdd38c3fbd5b085fdd528313e2bca23fbc06e2c48667
EBUILD python-3.12.8.ebuild 15671 BLAKE2B 7b4dbd1c4b60b57c12ca33c2523230a3d52f9d5ec6ef56b922e34c369476d07f31fc9aa93b6b3346c092dfefa6631c86d2f498c4f69fc88cc1e4b42dc0698435 SHA512 c53dabbaf74fe6e19525865b42b43b4754171df43c6295183debf108ee43365fd409b302ec6febc90c10e7ef3b42564d11084df746cf37824f437d1ed3e58311
EBUILD python-3.12.8_p1.ebuild 15673 BLAKE2B 8ac7372319b2614cf7f0e2601888ffce877f5b260f0b6de1f99556d1b531e2af6c3f36d709a6aad504a8d2b6e7b89163e0542d10de4838ea72886f2286899fb6 SHA512 4e1eaa2cb32f3c894a460fafdd16549eb0d0512c8bbd3ce6ce0276b00559de4423d4f4906bc1982876b5a3500d088ca780e5c2c4bbfc9a48960d432341217b83
EBUILD python-3.12.9.ebuild 15679 BLAKE2B df15f2df5a0321a0a1e74c345c9f9f56a504b86b9d78b34e1a5856bfb3ff3203a13eb22a03de61edff3a5df414eb1d819fd7c64f94c83b7c3d1d18430318d6ee SHA512 e16a63c1c0aa36ed203eb6282d6cdb3e13a03b14c55b9d5979fe34a74871d202da664188216b8b780ee67a6ffbf56ade7dcb1b3c859bec32af4354d16d270376
diff --git a/dev-lang/python/python-3.10.16_p2.ebuild b/dev-lang/python/python-3.10.16_p2.ebuild
new file mode 100644
index 000000000000..5e5ed7bb1904
--- /dev/null
+++ b/dev-lang/python/python-3.10.16_p2.ebuild
@@ -0,0 +1,595 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+WANT_LIBTOOL="none"
+
+inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
+inherit prefix 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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="
+ bluetooth build debug +ensurepip examples gdbm libedit
+ +ncurses pgo +readline +sqlite +ssl test tk valgrind
+"
+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-libs/expat-2.1:=
+ dev-libs/libffi:=
+ dev-libs/mpdecimal:=
+ dev-python/gentoo-common
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ ensurepip? ( dev-python/ensurepip-wheels )
+ gdbm? ( sys-libs/gdbm:=[berkdb] )
+ kernel_linux? ( sys-apps/util-linux:= )
+ 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
+ )
+"
+# bluetooth requires headers from bluez
+DEPEND="
+ ${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ valgrind? ( dev-debug/valgrind )
+ test? ( app-arch/xz-utils )
+"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ dev-build/autoconf-archive
+ app-alternatives/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=/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}
+# false positives -- functions specific to *BSD
+QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
+
+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
+}
+
+build_cbuild_python() {
+ # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
+ local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
+
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910 and bug #864911.
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # As minimal as possible for the mini CBUILD Python
+ # we build just for cross.
+ --without-lto
+ --disable-optimizations
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+ # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross.
+ PYTHON_DISABLE_MODULES+=" _ctypes _crypt" \
+ 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.
+ PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake
+ popd &> /dev/null || die
+}
+
+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"
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ append-flags -fwrapv
+ filter-flags -malign-double
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ # PKG_CONFIG needed for cross.
+ tc-export CXX PKG_CONFIG
+
+ local dbmliborder=
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ # Set baseline test skip flags.
+ COMMON_TEST_SKIPS=(
+ -x test_gdb
+ )
+
+ # Arch-specific skips. See #931888 for a collection of these.
+ case ${CHOST} in
+ alpha*)
+ COMMON_TEST_SKIPS+=(
+ -x test_builtin
+ -x test_capi
+ -x test_cmath
+ -x test_float
+ # timeout
+ -x test_free_threading
+ -x test_math
+ -x test_numeric_tower
+ -x test_random
+ -x test_statistics
+ # bug 653850
+ -x test_resource
+ -x test_strtod
+ )
+ ;;
+ mips*)
+ COMMON_TEST_SKIPS+=(
+ -x test_ctypes
+ -x test_external_inspection
+ -x test_statistics
+ )
+ ;;
+ powerpc64-*) # big endian
+ COMMON_TEST_SKIPS+=(
+ -x test_descr
+ )
+ ;;
+ riscv*)
+ COMMON_TEST_SKIPS+=(
+ -x test_urllib2
+ )
+ ;;
+ sparc*)
+ COMMON_TEST_SKIPS+=(
+ # bug 788022
+ -x test_multiprocessing_fork
+ -x test_multiprocessing_forkserver
+ -x test_multiprocessing_spawn
+
+ -x test_ctypes
+ -x test_descr
+ # bug 931908
+ -x test_exceptions
+ )
+ ;;
+ esac
+
+ # musl-specific skips
+ use elibc_musl && COMMON_TEST_SKIPS+=(
+ # various musl locale deficiencies
+ -x test__locale
+ -x test_c_locale_coercion
+ -x test_locale
+ -x test_re
+
+ # known issues with find_library on musl
+ # https://bugs.python.org/issue21622
+ -x test_ctypes
+
+ # fpathconf, ttyname errno values
+ -x test_os
+ )
+
+ if use pgo; then
+ local profile_task_flags=(
+ -m test
+ "-j$(makeopts_jobs)"
+ --pgo-extended
+ -u-network
+
+ # We use a timeout because of how often we've had hang issues
+ # here. It also matches the default upstream PROFILE_TASK.
+ --timeout 1200
+
+ "${COMMON_TEST_SKIPS[@]}"
+
+ -x test_dtrace
+
+ # 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_concurrent_futures
+ -x test_httpservers
+ -x test_logging
+ -x test_multiprocessing_fork
+ -x test_socket
+ -x test_xmlrpc
+
+ # Hangs (actually runs indefinitely executing itself w/ many cpython builds)
+ # bug #900429
+ -x test_tools
+ )
+
+ # Arch-specific skips. See #931888 for a collection of these.
+ case ${CHOST} in
+ alpha*)
+ profile_task_flags+=(
+ -x test_os
+ )
+ ;;
+ hppa*)
+ profile_task_flags+=(
+ -x test_descr
+ # bug 931908
+ -x test_exceptions
+ -x test_os
+ )
+ ;;
+ powerpc64-*) # big endian
+ profile_task_flags+=(
+ # bug 931908
+ -x test_exceptions
+ )
+ ;;
+ riscv*)
+ profile_task_flags+=(
+ -x test_statistics
+ )
+ ;;
+ esac
+
+ 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
+ --without-lto
+ --with-system-expat
+ --with-system-ffi
+ --with-system-libmpdec
+ --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
+
+ $(use_with debug assertions)
+ $(use_enable pgo optimizations)
+ $(use_with readline readline "$(usex libedit editline readline)")
+ $(use_with valgrind)
+ )
+
+ # disable implicit optimization/debugging flags
+ local -x OPT=
+
+ # https://bugs.gentoo.org/700012
+ if tc-is-lto; then
+ append-cflags $(test-flags-CC -ffat-lto-objects)
+ myeconfargs+=(
+ --with-lto
+ )
+ fi
+
+ if tc-is-cross-compiler ; then
+ build_cbuild_python
+ # Point the imminent CHOST build to the Python we just
+ # built for CBUILD.
+ export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
+ 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=
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ if use ncurses; then
+ append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+ fi
+
+ hprefixify setup.py
+ 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}
+
+ # Gentoo hack to disable accessing system site-packages
+ export GENTOO_CPYTHON_BUILD=1
+
+ if use pgo ; then
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x TMPDIR=/var/tmp
+ 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=(
+ --verbose3
+ -u-network
+ -j "$(makeopts_jobs)"
+ "${COMMON_TEST_SKIPS[@]}"
+ )
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x TMPDIR=/var/tmp
+
+ nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local ret=${?}
+
+ [[ ${ret} -eq 0 ]] || die "emake test failed"
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" TEST_MODULES=no 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} || die
+ fi
+
+ ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
+
+ 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.11_p2.ebuild b/dev-lang/python/python-3.11.11_p2.ebuild
new file mode 100644
index 000000000000..39fa51959502
--- /dev/null
+++ b/dev-lang/python/python-3.11.11_p2.ebuild
@@ -0,0 +1,629 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+WANT_LIBTOOL="none"
+
+inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
+inherit prefix 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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="
+ bluetooth build debug +ensurepip examples gdbm libedit
+ +ncurses pgo +readline +sqlite +ssl test tk valgrind
+"
+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:=
+ dev-libs/mpdecimal:=
+ dev-python/gentoo-common
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ ensurepip? ( dev-python/ensurepip-wheels )
+ gdbm? ( sys-libs/gdbm:=[berkdb] )
+ kernel_linux? ( sys-apps/util-linux:= )
+ 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
+ )
+"
+# bluetooth requires headers from bluez
+DEPEND="
+ ${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils )
+ valgrind? ( dev-debug/valgrind )
+"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ dev-build/autoconf-archive
+ app-alternatives/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=/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}
+# false positives -- functions specific to *BSD
+QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
+
+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
+}
+
+build_cbuild_python() {
+ # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
+ local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
+
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ #
+ # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
+ local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
+ local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+ local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
+ local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
+
+ # We need to build our own Python on CBUILD first, and feed it in.
+ # bug #847910
+ local myeconfargs_cbuild=(
+ "${myeconfargs[@]}"
+
+ --prefix="${BROOT}"/usr
+ --libdir="${cbuild_libdir:2}"
+
+ # Avoid needing to load the right libpython.so.
+ --disable-shared
+
+ # 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
+ )
+
+ mkdir "${WORKDIR}"/${P}-${CBUILD} || die
+ pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
+ # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
+ # libdir correctly for cross.
+ PYTHON_DISABLE_MODULES+=" _ctypes _crypt" \
+ 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.
+ PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake
+ popd &> /dev/null || die
+}
+
+src_configure() {
+ # 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
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ # PKG_CONFIG needed for cross.
+ tc-export CXX PKG_CONFIG
+
+ local dbmliborder=
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ # Set baseline test skip flags.
+ COMMON_TEST_SKIPS=(
+ # this is actually test_gdb.test_pretty_print
+ -x test_pretty_print
+ )
+
+ # Arch-specific skips. See #931888 for a collection of these.
+ case ${CHOST} in
+ alpha*)
+ COMMON_TEST_SKIPS+=(
+ -x test_builtin
+ -x test_capi
+ -x test_cmath
+ -x test_float
+ # timeout
+ -x test_free_threading
+ -x test_math
+ -x test_numeric_tower
+ -x test_random
+ -x test_statistics
+ # bug 653850
+ -x test_resource
+ -x test_strtod
+ )
+ ;;
+ mips*)
+ COMMON_TEST_SKIPS+=(
+ -x test_ctypes
+ -x test_external_inspection
+ -x test_statistics
+ )
+ ;;
+ powerpc64-*) # big endian
+ COMMON_TEST_SKIPS+=(
+ -x test_descr
+ -x test_gdb
+ )
+ ;;
+ riscv*)
+ COMMON_TEST_SKIPS+=(
+ -x test_urllib2
+ )
+ ;;
+ sparc*)
+ COMMON_TEST_SKIPS+=(
+ # bug 788022
+ -x test_multiprocessing_fork
+ -x test_multiprocessing_forkserver
+ -x test_multiprocessing_spawn
+
+ -x test_ctypes
+ -x test_descr
+ -x test_gdb
+ # bug 931908
+ -x test_exceptions
+ )
+ ;;
+ esac
+
+ # musl-specific skips
+ use elibc_musl && COMMON_TEST_SKIPS+=(
+ # various musl locale deficiencies
+ -x test__locale
+ -x test_c_locale_coercion
+ -x test_locale
+ -x test_re
+
+ # known issues with find_library on musl
+ # https://bugs.python.org/issue21622
+ -x test_ctypes
+
+ # fpathconf, ttyname errno values
+ -x test_os
+ )
+
+ if use pgo; then
+ local profile_task_flags=(
+ -m test
+ "-j$(makeopts_jobs)"
+ --pgo-extended
+ -u-network
+
+ # We use a timeout because of how often we've had hang issues
+ # here. It also matches the default upstream PROFILE_TASK.
+ --timeout 1200
+
+ "${COMMON_TEST_SKIPS[@]}"
+
+ -x test_dtrace
+
+ # 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_concurrent_futures
+ -x test_httpservers
+ -x test_logging
+ -x test_multiprocessing_fork
+ -x test_socket
+ -x test_xmlrpc
+
+ # Hangs (actually runs indefinitely executing itself w/ many cpython builds)
+ # bug #900429
+ -x test_tools
+ )
+
+ # Arch-specific skips. See #931888 for a collection of these.
+ case ${CHOST} in
+ alpha*)
+ profile_task_flags+=(
+ -x test_os
+ )
+ ;;
+ hppa*)
+ profile_task_flags+=(
+ -x test_descr
+ # bug 931908
+ -x test_exceptions
+ -x test_os
+ )
+ ;;
+ powerpc64-*) # big endian
+ profile_task_flags+=(
+ # bug 931908
+ -x test_exceptions
+ )
+ ;;
+ riscv*)
+ profile_task_flags+=(
+ -x test_statistics
+ )
+ ;;
+ esac
+
+ 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
+ --without-lto
+ --with-system-expat
+ --with-system-ffi
+ --with-system-libmpdec
+ --with-platlibdir=lib
+ --with-pkg-config=yes
+ --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
+
+ $(use_with debug assertions)
+ $(use_enable pgo optimizations)
+ $(use_with readline readline "$(usex libedit editline readline)")
+ $(use_with valgrind)
+ )
+
+ # disable implicit optimization/debugging flags
+ local -x OPT=
+
+ # https://bugs.gentoo.org/700012
+ if tc-is-lto; then
+ append-cflags $(test-flags-CC -ffat-lto-objects)
+ myeconfargs+=(
+ --with-lto
+ )
+ fi
+
+ if tc-is-cross-compiler ; then
+ build_cbuild_python
+ myeconfargs+=(
+ # Point the imminent CHOST build to the Python we just
+ # built for CBUILD.
+ --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
+ )
+ 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=
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ if use ncurses; then
+ append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+ fi
+
+ hprefixify setup.py
+ 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}
+
+ # Gentoo hack to disable accessing system site-packages
+ export GENTOO_CPYTHON_BUILD=1
+
+ if use pgo ; then
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x TMPDIR=/var/tmp
+ 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=(
+ --verbose3
+ -u-network
+ -j "$(makeopts_jobs)"
+ "${COMMON_TEST_SKIPS[@]}"
+ )
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ local -x TMPDIR=/var/tmp
+
+ nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local ret=${?}
+
+ [[ ${ret} -eq 0 ]] || die "emake test failed"
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ # -j1 hack for now for bug #843458
+ emake -j1 DESTDIR="${D}" TEST_MODULES=no 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} || die
+ fi
+
+ ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
+
+ 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
+}