summaryrefslogtreecommitdiff
path: root/dev-lang/python
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-30 19:43:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-30 19:43:03 +0100
commit162945d2a91899b637bbb9e163b406350de12906 (patch)
tree49cc2cc66f724a7c6f033f93aaba4ae3be1f2259 /dev-lang/python
parentf660c6de84558324d784218831d8f0782ee41e2e (diff)
gentoo resync : 30.10.2021
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest18
-rw-r--r--[-rwxr-xr-x]dev-lang/python/files/pydoc.init0
-rw-r--r--dev-lang/python/python-2.7.18_p13.ebuild1
-rw-r--r--dev-lang/python/python-3.10.0_p1.ebuild1
-rw-r--r--dev-lang/python/python-3.11.0_alpha1.ebuild347
-rw-r--r--dev-lang/python/python-3.6.14_p1.ebuild1
-rw-r--r--dev-lang/python/python-3.6.15.ebuild3
-rw-r--r--dev-lang/python/python-3.7.12_p1.ebuild1
-rw-r--r--dev-lang/python/python-3.8.12_p1.ebuild1
-rw-r--r--dev-lang/python/python-3.9.7_p1.ebuild1
10 files changed, 366 insertions, 8 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index e4ad4fb5868a..c979440b3295 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -4,6 +4,8 @@ DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
DIST Python-3.10.0.tar.xz 18726176 BLAKE2B 77143edf733cadf7e52327a58782f0617b1dd0d132cf58e0f26d37a454bb97f82e7931118a6a71f22779d9b6ec4efca974c43c19a6338b4b24a9fd616b60cc89 SHA512 82b2729afc7d72a80882f199970667dce7d971a2e5ecfe6cf84f7b68612ab2caf6ed6d7a8cb81f24ea85cb0816464bb2e8b2e6884eda62fa40742edc674193bd
DIST Python-3.10.0.tar.xz.asc 833 BLAKE2B 295df19932ea076bb1a50acb38782055ff34fb235df0380fa361727eedb3ca68aeca2a31419de5b05ce128c2e21ad04605c226e7a61d508a17607f615e46e570 SHA512 67236e02bc49da1423717cb54216b745f613ba2fc4b372a4aa15a36ab15fe69d9b9087070382957d480df7576d13056caedcd979fb56531799a1190b822f673d
+DIST Python-3.11.0a1.tar.xz 18678136 BLAKE2B 1a28fdc2bbbb60896240b4a7bc361f060205dae51fa2d0e4f981752d81c14f1a28ebef09960ea82d5158e874d0e335ee45f69d968f7433ce4c0d02978ad39c95 SHA512 3705fa3d05fccd491fba981c9495d5b36793f284a39b267a5ff7b25c7f08de84bbd5afe200296cedd1cc55f495fd3efc55d7b34910e1be1a785ce5772b857d7a
+DIST Python-3.11.0a1.tar.xz.asc 833 BLAKE2B f5c6064e8b9de17bc22d60b0ae52a9aa887823a9a52fc8fff1e9d29e05c4c1392841a7c492fe69b426be4ee945f0cbfed7ec0d31604e488458d6c61583a051dd SHA512 b9d1542f215b5633835d21de0311d324c62e53b7afc525c00d26c863740fd01cc8c18a6ecb0a8ce8d38bf543cebdb64f0930f9201a8968dbbedf58fe9ad4c05c
DIST Python-3.6.14.tar.xz 17218148 BLAKE2B efe655cb907ffa678ca135f88ba9d867e523969ad82dbc09ffb6d8d383824a4b43c525e156a3c35484a526b4b3ea755109e5ef15d17852d44e3351c307fc5e91 SHA512 15b82b7285db97cb27a6fcd57ce9e258fdf8dbdb2f00e22e4331161b8557c8244342546c4143e84c72730759e0276770396b6ca5bb7cf87310cca8e175423006
DIST Python-3.6.14.tar.xz.asc 833 BLAKE2B 81c79dca5728b21b8c2badcaa1242836f1cf13984bb755463cfe9e4fd96a02ebf31f1a9239759a937c6d6a04c18bfc682a82cb0ab2e5a473de153423a7248c9c SHA512 600bf504f2c0d3ce7d1e8e953b4f27a7a7c996b7b9cd70efb876178fa5424130bff5414d5ac7deb8b45103ed417fd40d830613db39750d35a0c967c8fdfea50d
DIST Python-3.6.15.tar.xz 17223796 BLAKE2B c139c6f93ea70ad898d5626dfa964280a14de9676f0d9d55668ad91618b1ba330874cbba8d6526a87e53b585ff34e3bf242613ca3fb17ee60f362a9676306c7d SHA512 f1894d704c91669d94ec83b5631288bf1e0c73ddcf33cea0977575f262eb672caebc8ac00e34e9b99c321c19cc9a71d6081fa957bb8e23cf5bfba50f345145ef
@@ -16,16 +18,18 @@ DIST Python-3.9.7.tar.xz 19123232 BLAKE2B 69dfba6974c8c74de1b71977d28cad4d7c2661
DIST Python-3.9.7.tar.xz.asc 833 BLAKE2B 2d9c47e47d9a625e393a8b456dd5b10dd485fc13ca7c236b5fd304c373879bea8ab3c67ff99c3a81350443f6ccba20718466a221a05faada6b82cfe92943fdbf SHA512 7ff9f845f520efab3b4a0e95da3ffe055ee5777a4173a5b2cc1fd2419dc2b4faf30d1e711e372df36e34bc971ecfcde88a7cd815cfe2d8080ccb575a1ae8e101
DIST python-gentoo-patches-2.7.18_p13.tar.xz 33296 BLAKE2B 91b711458aff4f6337ee1b34aff58d7edda6725644a64c9320076a1e04c816729ed163d82333cfe4dfef379a9ad5ef50ba00abdbbfed4503b0f92c8f0b7ca683 SHA512 97f3657a4a95e8492aa710801b974a56e6dd4636e475aea45cbbe76e7ae32d00f07b05769887f05e49cb0df8584ac9499a7ce842bad77f837a7c869f9b769b07
DIST python-gentoo-patches-3.10.0_p1.tar.xz 10068 BLAKE2B 1c9817b449831559f0a0b722c02a5f55d94b3dfde98e5882c1403fe24a4addf7074ab39c09b91cff6fd7ace2e4b6e8ed899d9a0b9ffd6612ce315c4c192bd309 SHA512 39aa41dbf17b6dc5255491c75031a3dae6962b44125e426dbfdce365a6533c5dae9856b1fff8016a189124b7cff72d2665ce99da344c2f9dff005ba685e8c2c4
+DIST python-gentoo-patches-3.11.0a1.tar.xz 9468 BLAKE2B 9bbc0c41d366752d2481c19070d71c27f88fd605e35e62f6b86498cb537051e92972f3c3f7b234485fd07e2a6ac4e4d6701e03e7893897531da58fbaaa609e76 SHA512 a06274c8c1d772121ac9570125eea12a4e53bcac030b8f4f3c5c76d68fc475df3f073a4dffe55614ced9cf031c7581e428b1cee67078c63d4f41e0a51e372e41
DIST python-gentoo-patches-3.6.14_p1.tar.xz 16576 BLAKE2B 902a9073e6d3e40cfba105680d9947b64a4bfa1632381bc71afbd2691350dccb36f498bf17ac7dfc8ce331dfc3fb7e3cdd539cea3f5e9db1c49210ad4d124182 SHA512 4aa354f1ca8d9bb3c30b666ef61cac8380741342102aeb9ea77cc06ae62179f595acc1c2e6321e9c2395abbc3fbc649ecc93b80443d139859924524989539992
DIST python-gentoo-patches-3.6.15.tar.xz 15300 BLAKE2B f49fd96f6ad1a1c94fea6b83acd229a81754b86061e243044ead4b9a9d5122a2e43b270b68722c359c084c05a566a3ad70aa46588ab7a005ee560ee118b92b8b SHA512 cc33491a33f3f1d990cf494d53b91b74db761142e8aebe1bd4b128ef10a268ff945e5ba08daad39cee095612a8e52265d6988873ecf9c073377cbbc10735aa39
DIST python-gentoo-patches-3.7.12_p1.tar.xz 19112 BLAKE2B e9964244af3db544dd6e96d85ca4bc24d7131b48eda85df5bafa3fb36474a024cecbbf4b27324e1f35f76ae6a1aed31dd7896e831b79b574b45a4371afcc7e5b SHA512 9ec996c2904f99bd6651ed1b700eabd91f2b82b1e9e0f3d9572243886a9c7139bf8ac2af04169485d3ca6339e1a87044cba203f6f0aee9609d2a1d53c812548d
DIST python-gentoo-patches-3.8.12_p1.tar.xz 16632 BLAKE2B cce7a41d020af1ffc55a01ef67b20bcb16c68adbccc1e44ef166d1707e817ed6c3bae70f84c56553f27bca449015e273014c0be73bc2f9b4e25844ddce385486 SHA512 4621727c2e9cc1c5519e021210e16a97e7167ea831445dfdd07f5b0ed642b5919834244111708a971ce098b10b439797e1c76827eccab803f801052c671f1ae6
DIST python-gentoo-patches-3.9.7_p1.tar.xz 14444 BLAKE2B c976beb1205b0b777ff3375f538758bf28443bcf4c953fe161545791763da043e32582c398ec8151478afc40e53f963e080d29420066305c12963c953887e4b8 SHA512 283c8975885f9306e46a0047219f3a70e1000f3401affb0b55cde976be6fb6df2f1c13f4e05a479e72e0731d683fef9b22413f7cd320298295a31b19c8915b3d
-EBUILD python-2.7.18_p13.ebuild 10084 BLAKE2B 1dad5dbeec00ae05accd7a05614991812facf0fce7b6d3afb978019ac2facd204156d44d9df76190de9c2075b5c8d0dcbceead7ac445361fcab97309e8dd67f3 SHA512 84d49306ba25875b3542b3a825aaa613516501a348746e3d7f3f74fb44d7e14a393ac0d7180b33ff43e9d879392a9a086c78894b1f2644c9e21ec5a68e1e7c22
-EBUILD python-3.10.0_p1.ebuild 10009 BLAKE2B be9e178279612086f3cefd33683b1c91fb019c7a6f159753f59305648b94daf31812a04c463d9c3c5fdc797ff8b9b50fd9ab3d7fbc70d565b6af04bd9ea2a8fe SHA512 67af2b30c1c98fc370b1ca77e2fb76e1285d6a180bd46d4e71cde3c92abbbe37bb9110d0f56ed5f4cb093129201b2d1697c36414dedcce3110ddb3be1d8b43ae
-EBUILD python-3.6.14_p1.ebuild 9702 BLAKE2B 5b247e39c0d753420adba7b83f952cdf75805815585d221642499223f894fd6a0365385806cf9edb2ce0b79956efdb6e5fc7b64020382a6216159d449c2a49f7 SHA512 f6b1f0ad1f82b68eae9f2a8691daa85bbc75fa0ccc3c24036174d9c38c8bd5d8bb93b79b587c2815dc56eeb1db24e288043629fea0bdbd13ca2b98a687eafeee
-EBUILD python-3.6.15.ebuild 9705 BLAKE2B 0442b71528390e92747b40d678813f5ea35fff60dd952e07e3b20e2f0438985b9e025e9817972aeb2fa381981ae9b03b5b774e61f3182abc11704b5a9179c449 SHA512 69f9fd71c46a8b9bc71708701d6e189a1b8461b8fe5308b05b4fc8283ff0c942199ed5af693d408f3b2529d69510f9dcc656647ccce4ed65e5921727aabd55a0
-EBUILD python-3.7.12_p1.ebuild 9597 BLAKE2B 6047255b5cc230884bcd6168e8495013aafe781a8885c0b190cc8dc4b80d7d05242d214e055c215827968a94d2193ce95fe727dd9c6961ace1eba3be1309ea07 SHA512 fb59c050dd42f615881a52198b894653c69c5fab267453c5c04a367ddb7610ea8d27d1ea2d192be94c9ed2515b8ef56465ec7679c015def5f5d9c00c9c9a0c76
-EBUILD python-3.8.12_p1.ebuild 9751 BLAKE2B 7324e10e05dc1aad568af0e4a6c57ae27918dc973259981be548649e3af65da46592d53d43f1733efe8f878aecdbc07809a2745bda44a50d948a49f6f44cc7bb SHA512 f8d0998e6d00ef3d6e877cef57ae69976cdd0c946c9927a7edb6ed4dd02f0a74f2a5cbc75c9d27ce152df6a66e708fdf86acbce82707e30b412d3c4dd9606f21
-EBUILD python-3.9.7_p1.ebuild 9890 BLAKE2B 5dbea7e2ba4db850b2ed67ea27781613ec71a0fa23d040dcdfcb4d1919d5cfbeff541b0e7a0763381508b8597d392fc157a88d52edf0ec00cb1417af62059061 SHA512 a6438dce5e69e520f160aab01e10b1523eb56b700a4bdc7d694f3060103aaa9d637defc3340ec27677d83532e35b0c124d7b284c7287c30165ff6b0affbf9d4a
+EBUILD python-2.7.18_p13.ebuild 10097 BLAKE2B 9aaf952b8a091ffd388aa0f4608a360111e112db3b2eebfacb8c9461e52500aed285b640b89fdaed4045b75190b4158e99f3c30259de490baf410e10320b3bf3 SHA512 6e493bca69c83840996c68308db8517cd3409c46f232a775165ced5dc77499d57ead5624a2bb6da27f19d950566964526584bc22f6ad6613137360036bcec143
+EBUILD python-3.10.0_p1.ebuild 10022 BLAKE2B 247d8f34cf439188b4f82c787a1608195cfc2fc74ac7fc2d23d9fe79010dbaceacdae01f698f0b289e17e5d099716b35879c1c65e5ad21b0592761bbe7b99a21 SHA512 cec9d46d8936b2bb25413f6398826dc09a7a4cfcaacbce6bc814940d6c0524441336cc0e3ab5531446f1d1261a5c9f68bc0f6a8344ed4b8b98ab93c535906866
+EBUILD python-3.11.0_alpha1.ebuild 10028 BLAKE2B f6e015032ff09bef3c9c1c20308f527593e578780383f3cd8eb9d5f0a69618111357bbaac7150bc00f49e71f74a6d3a5dcbabbe3190d06503b021e2456c432c4 SHA512 0ce865b5f26b85345152e5b272880791c7f7038e57743613ba2fbf06a250cb7d58f25281566ddb12d60b44a1461861d21aac82239ec6b2003c5521fc4bb33768
+EBUILD python-3.6.14_p1.ebuild 9715 BLAKE2B f8b40b38aa5cd5e84f262fa28a127f36d3225f957b41fc80444f1e485ab3f160f8bcf50f18423cdc1789b1ce932544f26ab835b487d7be789b4dcb5b910d3cd2 SHA512 e82bd697f90d53de1ff6ce6d64426b9d9d110bad5cb8c5f466284396f70a2f9149dd91da67cb515d16dd56349d4089b2eb3ce06356c04f7ac350a8335f4329de
+EBUILD python-3.6.15.ebuild 9717 BLAKE2B d3a49cee14953bd7f80605386f735a463c4eb430308ddea5b371b0cef518fccc68a0ea0500fc473c6b93c7cb7b4890678d88e6aa9fcfae16e0bde4813d8a3389 SHA512 09f5b7584966919e376093ece83b9d4239385af1698630a7f3fcf3a1e8a846ae616011a1ecc9f3f44771fe548848cc995681eca611f73fadbb130c75bfd3832d
+EBUILD python-3.7.12_p1.ebuild 9610 BLAKE2B 6822b251e66691a26d20956b8d081c51ed1ec4924b8aea05a4b96e45edf8b32fdda008caea6412fee8a2ae0dc864da208912b0a240f1eff5434f6a4a34ffc94b SHA512 a51b4d926660ecbfa117ae26d20e123f92d4fb87cea786f58265a03a3978fff735a579cd0f0e821e716898a396cda03d5a1c2ce4b0e4e3345176f1beaced72c2
+EBUILD python-3.8.12_p1.ebuild 9764 BLAKE2B bcfb9efe679342b4a0adef3dda6dbee8d1fb0fd8141db4daf35edc5810669d7ec04fd5a4f9ea26092c590ba9db187e5fa9bdd8dc6143d2727ea6d025d9074ed7 SHA512 3f1c5a05a80929a60a5bbc5c8cf54dafecdaa250165d3b8a778ba26795affbc49cb11a8c0856bb6991ce656dc291b9ea71ca89f575582ffe2325da63d16c3e31
+EBUILD python-3.9.7_p1.ebuild 9903 BLAKE2B 0539bebbc9dc6696ec83898af96c3e38877c1574dadaa2dbfff87d64f8008d8f663fa4a1597593361c3521576d672619d4fe9beba8d9fe2820380c1d77992e61 SHA512 67f4381d231fa6b913608e0a2e23cf296b4b5b7986316d31fb16c5dd169c73595415e1cb957b3487a95ebb96ac6ab8968fd4ef21a3207db1f0ad3af1efe2ac65
MISC metadata.xml 447 BLAKE2B 0f4f1f1af9e1d7e00f984eae6e555d57ebd41f36ace2c24781ec0fdb08d2d3fc96de80e83a2da89ce3f06b209781a674dfcfd1ced5204f3c5d3cada8f58ea417 SHA512 b309e96985959bf70da42d43604e7acd9eacd62d321f5efdb68b77ebcc496e56104da0c5b3b65b6e74e4d0acce8e66aa572baf49277546044ecc8d0f61c6148c
diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init
index f8e05636da4e..f8e05636da4e 100755..100644
--- a/dev-lang/python/files/pydoc.init
+++ b/dev-lang/python/files/pydoc.init
diff --git a/dev-lang/python/python-2.7.18_p13.ebuild b/dev-lang/python/python-2.7.18_p13.ebuild
index e12891f6d48a..5d9f0065645b 100644
--- a/dev-lang/python/python-2.7.18_p13.ebuild
+++ b/dev-lang/python/python-2.7.18_p13.ebuild
@@ -62,6 +62,7 @@ RDEPEND="app-arch/bzip2:=
DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )"
BDEPEND="
+ virtual/awk
virtual/pkgconfig
verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
diff --git a/dev-lang/python/python-3.10.0_p1.ebuild b/dev-lang/python/python-3.10.0_p1.ebuild
index 33025d94f31f..150a33f5b6b6 100644
--- a/dev-lang/python/python-3.10.0_p1.ebuild
+++ b/dev-lang/python/python-3.10.0_p1.ebuild
@@ -59,6 +59,7 @@ DEPEND="${RDEPEND}
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
+ virtual/awk
virtual/pkgconfig
verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
diff --git a/dev-lang/python/python-3.11.0_alpha1.ebuild b/dev-lang/python/python-3.11.0_alpha1.ebuild
new file mode 100644
index 000000000000..c69b8cd0966f
--- /dev/null
+++ b/dev-lang/python/python-3.11.0_alpha1.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2021 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 \
+ python-utils-r1 toolchain-funcs verify-sig
+
+MY_PV=${PV/_alpha/a}
+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/"
+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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened +ncurses +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-libs/libffi:=
+ sys-apps/util-linux:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ 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:= )
+ !!<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? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+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
+
+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, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ 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
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # 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.
+ tc-export CXX
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+ 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
+ --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
+ )
+
+ OPT="" 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
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ 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
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ # workaround https://bugs.gentoo.org/775416
+ addwrite /usr/lib/python3.10/site-packages
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || 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 "${S}"/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"
+
+ local -x EPYTHON=python${PYVER}
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ else
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${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.6.14_p1.ebuild b/dev-lang/python/python-3.6.14_p1.ebuild
index 6f6ec7f4e536..c6bd3292a583 100644
--- a/dev-lang/python/python-3.6.14_p1.ebuild
+++ b/dev-lang/python/python-3.6.14_p1.ebuild
@@ -54,6 +54,7 @@ DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )"
BDEPEND="
+ virtual/awk
virtual/pkgconfig
verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
diff --git a/dev-lang/python/python-3.6.15.ebuild b/dev-lang/python/python-3.6.15.ebuild
index a65e997bcb90..194e8369b5ea 100644
--- a/dev-lang/python/python-3.6.15.ebuild
+++ b/dev-lang/python/python-3.6.15.ebuild
@@ -22,7 +22,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}/${PYVER}m"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml"
RESTRICT="!test? ( test )"
@@ -54,6 +54,7 @@ DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )"
BDEPEND="
+ virtual/awk
virtual/pkgconfig
verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
diff --git a/dev-lang/python/python-3.7.12_p1.ebuild b/dev-lang/python/python-3.7.12_p1.ebuild
index d01c389e0cfc..04461babee6d 100644
--- a/dev-lang/python/python-3.7.12_p1.ebuild
+++ b/dev-lang/python/python-3.7.12_p1.ebuild
@@ -55,6 +55,7 @@ DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )"
BDEPEND="
+ virtual/awk
virtual/pkgconfig
verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
diff --git a/dev-lang/python/python-3.8.12_p1.ebuild b/dev-lang/python/python-3.8.12_p1.ebuild
index 8463533c8cbb..a95b30f11b9d 100644
--- a/dev-lang/python/python-3.8.12_p1.ebuild
+++ b/dev-lang/python/python-3.8.12_p1.ebuild
@@ -56,6 +56,7 @@ DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )"
BDEPEND="
+ virtual/awk
virtual/pkgconfig
sys-devel/autoconf-archive
verify-sig? ( app-crypt/openpgp-keys-python )
diff --git a/dev-lang/python/python-3.9.7_p1.ebuild b/dev-lang/python/python-3.9.7_p1.ebuild
index 0bd5616552c6..3af399c076aa 100644
--- a/dev-lang/python/python-3.9.7_p1.ebuild
+++ b/dev-lang/python/python-3.9.7_p1.ebuild
@@ -56,6 +56,7 @@ DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )"
BDEPEND="
+ virtual/awk
virtual/pkgconfig
sys-devel/autoconf-archive
verify-sig? ( app-crypt/openpgp-keys-python )