summaryrefslogtreecommitdiff
path: root/dev-lang/python
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-06 04:27:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-06 04:27:04 +0100
commitd6106fb0c1ab8f79024ab6a9ac2062ddc85d4e07 (patch)
treef3a4ad4dcf443e9351fa5dec88afeeec86c9b642 /dev-lang/python
parentf3f72d0d5f1ae9ee74acaa63ccb7a247468e73bf (diff)
gentoo auto-resync : 06:10:2024 - 04:27:04
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest98
-rw-r--r--dev-lang/python/python-3.10.14_p1-r1.ebuild542
-rw-r--r--dev-lang/python/python-3.10.14_p2.ebuild542
-rw-r--r--dev-lang/python/python-3.10.14_p3-r1.ebuild542
-rw-r--r--dev-lang/python/python-3.10.14_p3.ebuild542
-rw-r--r--dev-lang/python/python-3.10.15.ebuild542
-rw-r--r--dev-lang/python/python-3.10.15_p1.ebuild2
-rw-r--r--dev-lang/python/python-3.11.10.ebuild573
-rw-r--r--dev-lang/python/python-3.11.10_p1.ebuild2
-rw-r--r--dev-lang/python/python-3.11.9-r1.ebuild573
-rw-r--r--dev-lang/python/python-3.11.9_p1.ebuild573
-rw-r--r--dev-lang/python/python-3.11.9_p2-r1.ebuild573
-rw-r--r--dev-lang/python/python-3.11.9_p2.ebuild573
-rw-r--r--dev-lang/python/python-3.12.3-r1.ebuild571
-rw-r--r--dev-lang/python/python-3.12.4_p3.ebuild558
-rw-r--r--dev-lang/python/python-3.12.5.ebuild558
-rw-r--r--dev-lang/python/python-3.12.5_p1-r1.ebuild558
-rw-r--r--dev-lang/python/python-3.12.5_p1.ebuild558
-rw-r--r--dev-lang/python/python-3.12.6.ebuild558
-rw-r--r--dev-lang/python/python-3.12.6_p2.ebuild2
-rw-r--r--dev-lang/python/python-3.12.6_p4.ebuild4
-rw-r--r--dev-lang/python/python-3.12.7.ebuild606
-rw-r--r--dev-lang/python/python-3.12.7_p1.ebuild2
-rw-r--r--dev-lang/python/python-3.13.0_rc1_p2.ebuild649
-rw-r--r--dev-lang/python/python-3.13.0_rc1_p3-r1.ebuild649
-rw-r--r--dev-lang/python/python-3.13.0_rc1_p3.ebuild649
-rw-r--r--dev-lang/python/python-3.13.0_rc2.ebuild643
-rw-r--r--dev-lang/python/python-3.13.0_rc2_p1.ebuild643
-rw-r--r--dev-lang/python/python-3.13.0_rc2_p2.ebuild640
-rw-r--r--dev-lang/python/python-3.13.0_rc3.ebuild39
-rw-r--r--dev-lang/python/python-3.8.19_p2.ebuild432
-rw-r--r--dev-lang/python/python-3.8.19_p3.ebuild432
-rw-r--r--dev-lang/python/python-3.8.19_p4.ebuild432
-rw-r--r--dev-lang/python/python-3.8.20.ebuild432
-rw-r--r--dev-lang/python/python-3.8.20_p2.ebuild2
-rw-r--r--dev-lang/python/python-3.9.19_p3.ebuild492
-rw-r--r--dev-lang/python/python-3.9.19_p4.ebuild492
-rw-r--r--dev-lang/python/python-3.9.19_p5.ebuild492
-rw-r--r--dev-lang/python/python-3.9.20.ebuild492
-rw-r--r--dev-lang/python/python-3.9.20_p1.ebuild2
40 files changed, 51 insertions, 17213 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index e1d22e80eb79..d6c2fe9a6648 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -2,112 +2,36 @@ AUX pydoc.conf 169 BLAKE2B ce40bb3d5f858bd7a8d9ef5bf215a8ab592568a724f0e08aea219
AUX pydoc.init 600 BLAKE2B fb8775a6663483e5112ec283627610b746020d88494e772b92bb718a9493a52606e565c6c2fa4917a5cb963f166283d09883bd26903f2f3ced6c240d4e292a7f SHA512 9e71ad53486b6882a8441b24225c602195ee33d29dd1b60df27febbc6b752e79929be356152a489f893dcfb11f9c066b999787bc27a8ac61062c86e67a69e87a
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
-DIST Python-3.10.14.tar.xz 19600188 BLAKE2B a9e65fff590d56848f55f2d93d8a1c631bb8135617112997fbaea9fc45db1d5e2ce39f00cb29c9428542e523fdf48064bdb9aea144acb7aa7cfe71990b8e949e SHA512 adee638aeca898743da4b8245c0fa1e9b94b516f22e716e60c99038f0bb3dcbf726317aa86656404be1719b5a7c58eb09533720ebc0badbb04bd9a534dd48fef
-DIST Python-3.10.14.tar.xz.asc 833 BLAKE2B 945ada655532d578beba9fdd882cc9cc247e24f7efd68ce172766a8adcb3c8d76bc1f229402405e607004ae0f9bb8e55e4b01867ca712700106d8ec42212cb2c SHA512 450f910a91dd0fb66f99245828983a9234c4a67ea7e653404efa06ce5da1c6667a46329a2d1e276c5a956d2c32d8ae6d8c497a1892102f4a360dae33b135c372
DIST Python-3.10.15.tar.xz 19596540 BLAKE2B fe62f7c7377136576e73a59b5f0b3c9729f9c958da5c8dd1771e88121fdd1928686166066351fc8ae98c9f97295a85feb7ec44c39317f93ae414244aed8a8f66 SHA512 3c0396b2dae1521315a9b5ce9ad4ab6ede385447922fceb00ea3df75bfd79cb547b9380e936d83c9c1b964e38e16d70e34aec39f4c292853a032407bb6a58063
DIST Python-3.10.15.tar.xz.asc 833 BLAKE2B 31858fe2d3c8d868417eea66de1cf0b2fc7880e73ea7770b50191b8088bbd1c78485c64d94f6f005d18cef559d7e8e0906cb2a30aa1472d90f5af4cca045970b SHA512 0cac9b78649330a2a35a835d45e4a8a111db45943cc0ae0d24f5d9e03a058b4b739fe43d6cd1aee481dcd415a57820bf875996fa60b81d4d5911588db5adad70
DIST Python-3.11.10.tar.xz 20067656 BLAKE2B aba211a09e4c083d71574c7537ba98474476ebf7092ddda815f8d355d01605456868a89f0bcc6a9e747f71f914fa0129547de2ae70d8b579c6458fdeeafd23f0 SHA512 6ce77cced1ce90bb5eea38504dfc1bc19c872149a5a63fdd8353ac8c772c54ab7a42176e141c7f6f898d31761bf93e1739b238920fbeefbedd6016ad033c1de0
DIST Python-3.11.10.tar.xz.asc 833 BLAKE2B a1cbe57e568367fbc5817c983696619f515263a9b37662ca536c4d1132ad336959285bbe3076a251778016966f030d1e259f48accdb0df67c116af0e335acb8f SHA512 3a9efe1dd39fd6883ae3fc8dd7f6e25af7e06c6e6049cf9a31a1a82e6d7c84f85ac838d2a71127977d93ce77233a8bbff86a10a80d24fcee85a4e70fcbd1db19
-DIST Python-3.11.9.tar.xz 20175816 BLAKE2B 4e7cd2c42ee39b5ef9624ebd1798320957e948cb4f23f17fd1530814c60126dbf988846928d4d7d4b9d2174029ab8d4dbaf19e6203da237da4c3212ddebd5803 SHA512 2b0a1d936b4ef8376f9655797aece8ffdff75031ad7bfa840f330cac2aed189aecc80c163edc12ea772851d7a011f3fc1960470a73d9d4290cf3ab8ad6ed7e6a
-DIST Python-3.11.9.tar.xz.asc 833 BLAKE2B fa29f632bae0bee7db946038ee3529bc3bfbe1b2e755b21394f67a3c80911ce8079aaab43a16d88e614a8bfc01fb5105ce3f61c59a5ca44470b0f59787c707b3 SHA512 b18b50e7168b2ca5376a1fa75e50e8baae2026d4f11d4cf613d758f3f17df4610fe4653fb2ac0c5c4ec0f6e630dc6490ad1ff32a2fd0ebd60f9f3bd136207ffc
-DIST Python-3.12.3.tar.xz 20625068 BLAKE2B fc4f57ae50183db4c8cb37d94c37a7e58da5d031e03866841a678b986f01bbb8afdefb38124ba82b0a4988445b647214be43338dea13b0f063d3c2bf81c48c0b SHA512 4a2213b108e7f1f1525baa8348e68b2a2336d925e60d0a59f0225fc470768a2c8031edafc0b8243f94dbae18afda335ee5adf2785328c2218fd64cbb439f13a4
-DIST Python-3.12.3.tar.xz.asc 963 BLAKE2B f9668dde210793f8da0e0bb026b8ec3e0b4bc3abc58e72732f8faf356b19ca88a59b9d89b4b10f77b3602d9a967f0f2f44a0f091d698bc28ba9bad8049e5e006 SHA512 c291ec5b5e4f8deba867cc517624dd9a174745f04061ef737e58f3d52b9b30318264aec350e339fe88ccb493809ca1a90a378e86d86b8ec4a4f578b1a5843624
-DIST Python-3.12.4.tar.xz 20659356 BLAKE2B 4255171ef8ee1777bab829be7bbaf28a9d5073985b3b1309a41694dda5f6b4ad599df4534a1ce83ec65b357d42416cc18722ca94b4227a45ebd90e2c1df90945 SHA512 750132ee6369196096130a924f4ddb78b9a55804133e5d136a70b9280928822974d1aa559d844486df02e89155fb0d8117871e1ac532abc18174309ca4b08369
-DIST Python-3.12.4.tar.xz.asc 963 BLAKE2B d4f62dca1de5f4e4b2581fc49ca55b1d87abe7c4ceb2c9087efe4b92d9e9b3bdd25949bbf82fd771b4b60bc3690be982c2f25b810d87592665f0728fbe08be9d SHA512 1102b17f395e0ec5de5368d04a4dceb8cc98dd408b68b53998071cf129eb9a6c259316a416128f1dfa37a739f86e599507502a98430348da2272442ce1b7059e
-DIST Python-3.12.5.tar.xz 20422396 BLAKE2B f127d1e12d12be84d5837282757787be8a0cf702adce29b93622f91f45ba2d8cc0f5db2e8277c86b098623951b302015febd28bdabaff66b30cb06a5ef2b4a24 SHA512 7a1c30d798434fe24697bc253f6010d75145e7650f66803328425c8525331b9fa6b63d12a652687582db205f8d4c8279c8f73c338168592481517b063351c921
-DIST Python-3.12.5.tar.xz.asc 963 BLAKE2B 238167f6b4012136bc4274eee0dd4d958c4ee02d2505f9f64e5bcad15e84a9e9e12a9fc907651083543f1fce93579b752d4ccdf60c8cc421cb43e9034877bf1c SHA512 65ce92272a38cc6bf8bf56fa2a99a830cf5b33b811b1788508e7b6f8b5d3e93e0b143412f829271be40cbb4e7c154f84499239b3e8ab63b2ccf0a5a22d2f84ee
DIST Python-3.12.6.tar.xz 20434028 BLAKE2B 527fafdbfd0c1784ff72a93cdeb3f49666bae7d9343b6d1e4ef773fc52bd397081b41bec3ee9ed5b7652f28f09f29a1b553424cef26aebfa6c2e13499870bf2b SHA512 e658b0d59b5cfdc591d626e8282b9945759f27ee6fbc8bcb8670737db32ffc11fb832dfed9b0e80188fb5f7f3f39fe6dd6191ab7736376453c9e248321e9b063
DIST Python-3.12.6.tar.xz.asc 963 BLAKE2B d5f9e4c5053610a1a53769278e69d8a25e2fb047afb2a55dfee67917d8d200ebc159e614327ac87f34a4a9718cb3436b55190322ee231116b26074a78bb72642 SHA512 91a15bb7e8dd26616a2cdabe69c3ee81668cc67cb55a88b2be20433d24c9f8ae41c8f93f67aff2fa5858cd5b94600409cd472bd437a2fd33153483734ecd863f
DIST Python-3.12.7.tar.xz 20444032 BLAKE2B eed8744261cab3b401963ec5187a8b814adb9a18f8d0a6a3d59c027a83cf8408524af9b20204b0a0861d173cc33c45ae37bb1542a1ace3344dc59c649087ff1f SHA512 4a363d3f852ad8f4fd1484aa4cec35494a3811be48ef67fadb2bdf2e2489ed07dc78fad6ab475257db503ddd64d39f9800f23a1c94b6bbd15b7f632cff0c90ae
DIST Python-3.12.7.tar.xz.asc 963 BLAKE2B 8c7db3d1971d93a10c611a2e6dd3679d0b331b48df87b5fe410b089061e48753d98af67084d4f051a31ae803fce3aa3c7af7cba9c692640f50068bd1e46f40e6 SHA512 4d0a7a0da2c81888e93d8ff89ca2ed4bb85a7b0bd00f0d54a14e2c201affac2677ef3984d2b5aea253e624f6465548d9032eefdd9033c1eb3864d82cfd8d3df0
-DIST Python-3.13.0rc1.tar.xz 20881016 BLAKE2B 3971a233e9c3c782973e0276740f00f8f2072eeda914663cdf7fa6c5de2437c60c441184344a64e25cab5c71a02c47cf4602dd08f127f310c885386cd887fec4 SHA512 fce7664f3298cfd191a7dc20b7b47acafdc50d058a2814312c94c30b65291395957d701e4661b9bb760417942acb5d27e5b8bb479bcda9a82cf29f53772a2daf
-DIST Python-3.13.0rc1.tar.xz.asc 963 BLAKE2B 1c292362cd133dbbb1df1e0cf440e8adde2bc8db9174e550d5b76a09e80d0dbc11a0250e6f041e54fe58f25dc05f071c7af1aa910ae56ece5eb430502a2ba67c SHA512 3613829d9631f46b1b1ce11bfe5bb7fbfa49d97b639bb883c86737ea6ae8d15c24c526083cafb916011bd6d0b3b5fab2b17afd367edbdce99b32e0b4b845fd22
-DIST Python-3.13.0rc2.tar.xz 21055084 BLAKE2B 017ac82c1938d1fea0a501efb9d1848115648f0472b7cbaa4eac65cf085c3c6410ea83aab2e935952ca1b415d603f4c5680fec7a15ce5b40794b2fdcef662666 SHA512 85e6e6e80970ca38119e4f95880fb12e2d1548e6d60235cfcd7f6aaf08588c483469e43dda0f004b95455c2fb88ca736c313b22ae37eb0d4e6460ef521855c8d
-DIST Python-3.13.0rc2.tar.xz.asc 963 BLAKE2B bb75db12c424b7a05c8c0082f79c1ab6e2ad04440a27d2c964edc073fbdc1c0ac442b0b2a0719a33f8058bc7bc9097eb22e031299f8de5b6d88b74e4e5ece8a8 SHA512 6d80d089b55910628744d21b0382b6441d0550c139dbee71d68a7cd9e494bff1c8235a2a894f3c7a52f9af312480a4001f333e04c9054f32db7eefd2a7d39263
DIST Python-3.13.0rc3.tar.xz 22527884 BLAKE2B 9c6423e9871b30af70ece10598e798da443b40b3e40cae86ec59d396184df005627a5edeedf34d31c7953f972850e41d1cc708edd8e39c1327d319b0f6973049 SHA512 152e5b6d64048c1779612e66d5999c424ca7c61c8a0f4973f7b3019629d6a7923b422aec0bee30e7bc2d589a807d87e15a19b8fb4446bcf082eb663885a49b36
DIST Python-3.13.0rc3.tar.xz.asc 963 BLAKE2B e03d902eee320939cb77094e1b64e0101d0172ebdcc502255da1c0fc84476f43fafe900321c78cd78248a751b3a3921572ba4f305ed77ed78f175184b21f667f SHA512 c8f80b12f5e3021a11fc3ef5ce84572db9de7165ce89a03206cb0727b54f90ca2e444a16df064e6423e15b7bf2364db088b0c9315967dd340e735eabf7b892ce
-DIST Python-3.8.19.tar.xz 18975156 BLAKE2B 57b241aeb8f99a8c30590dcb9402abbcf573f00d06e807846bc9135c0a8a4af896c4d772d34abc3c292339953f4974a203bff61a78641d91b1826770226cd7e9 SHA512 1d2a57fa15ccdaec8cdca508ba2ffb01e1ae053a3446ac709bc334480f8e913070899f01ed680cce6dc7ddfddcb27ef402fe206562249fa4c4e87be21ece0625
-DIST Python-3.8.19.tar.xz.asc 833 BLAKE2B a11705011e9ea2bd6cbabc2b4c896ba94675341188eb483b881c2cb25c932e9ff25f9f589f930605b0442ff93a1f54532608b111c8ace715a406ce10809af671 SHA512 efdaae5462badcf4b98625ce8ab0e34756acea9539416e6ec428725b04539f8c38c1978de346510d669e93bbeef3ae20b1534e4c6582f89c7dc56a04c7cae140
DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61
DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed
-DIST Python-3.9.19.tar.xz 19682840 BLAKE2B a12256663f0ff3b799c2193c5877aa89a434340dfa01e655f790abea70af0709b54577e1c2590add241308a8581fd6f45a22aed450bd5db2bf9fa35c4a9d619b SHA512 5577830c734e63a70bbc62cd33d263b9aa87c4381b49cb694c3559067c4c682a55506b65ec5514a8e0a5abf6294dc728e909385d449ae1c388e62f83cea9bb89
-DIST Python-3.9.19.tar.xz.asc 833 BLAKE2B b48b58b8ccf4d6ba8d0d7120f04bebf59f843ffecf5fde4c3989fd9c26e3d3d1ccf4e5688f7024ae94775c8731e9ffa56799fca8596289edf93e4aac5480aaad SHA512 f7f4946243dfc56de2c84f50276b088d347f17054f50e3331d1e312e2a8e2c6ed1b4b4a807202b51137fd2af3fc9218cafa42ed348a954ace896d9a432e2defd
DIST Python-3.9.20.tar.xz 19648968 BLAKE2B 80a337ff406130599b8320068d11bc275d23473cedd7c85fcb9e40134f0f2d533be6e712139e788a6423cdc74cea938f306aa37c2a5099e3051f3e390159279c SHA512 c828f33edf1704e3149499d6d34e89264cb5cdb2b09ff05561641b359716d7996f0fe928629e09f006b1fd7850fdaf937275919c7fdd83f5efc32707c64d814b
DIST Python-3.9.20.tar.xz.asc 833 BLAKE2B bcd5a612281bf8e057e19db9105b199cb7e44050441b19832843e8149088d277f4b625421099b09d4ed6fac5578505f46dbfea13b041d157d695eaf668c3a7de SHA512 f21c012f4f642542479ba329da9654589e5a7f7305c39fb1b6f136b578316bdb115cef9773c9a9fe4e195677af01cb80af05780613cca83f42fae131862a9584
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
-DIST python-gentoo-patches-3.10.14_p1.tar.xz 15836 BLAKE2B a850e4ad4f025fa9d38ccba937f1b3ee8443ed186c22ede58b4c7324a8541cf724590686671a9aa9194662303ce75bc80aac8ee6f9da34b793876817b6f593ff SHA512 5d969f5e5126ee675a062924a5f403de142fc5bfe4a931fd3576bcc6298a855419d305d4b1ffedacb429783a05324b36eef4c45c861c47bada0bdd840de2bca3
-DIST python-gentoo-patches-3.10.14_p2.tar.xz 19564 BLAKE2B 2ad1398e0679e73028a0614e8c4ef6bc76928f6c1d0e93c39c3bf2c23201904ee677377abb120444995154bda4251cb8f0aabafca5e6c82601a6270d0e62bf67 SHA512 6d4194b85a176a1a0f7acc3eab48829d504e66381f3008821a9a433e63f5188b444321192ad536d8219a1c3ca56dbdb5c39439401cbbb30f35a606e2b6617624
-DIST python-gentoo-patches-3.10.14_p3.tar.xz 22080 BLAKE2B f45ebe4df3dc39a842c93d741ef66fd0f9f7d1c6453d499d59b62eda41f01bc17e109205fedc506963d1f21eb3fbf9478564ff5e1a11c10336f855069a642ceb SHA512 db268f1482e5c46a71ce3aef2c2ab6d458cc5263aec360e61c6aff97f119f4f100becefbb575156b1b0239e591a496cb62a136597fadae8a5b630c7233c0040a
-DIST python-gentoo-patches-3.10.15.tar.xz 15896 BLAKE2B f908b409dbcedeb4e2fa7255d9dedfb8f86f39b9b12612d45662d2305012692753874befa5377e1bcb2e8fc04b54bf206948e12eb7bc357a764c1b1e496e5997 SHA512 a647882ede8d7b97e301e472e91f4573dce9f8bf4e408449444625fdf79859a54fd828daa60c7960721f34c3d6d82e2e45db2c55f2fc093097a0db42f7363b8c
DIST python-gentoo-patches-3.10.15_p1.tar.xz 24048 BLAKE2B 191c28ad9bc781d6f3077870e8d40ff98a47a64009ecfbbd10fe2b3c5330692181837fd3e9b336fd01f936a39160fc12761b2ef9bc00843248ab978cda2e2767 SHA512 4461e351c991694415e2812e558d6c3d3f79295358623dc955bc0839691a170d95a3efd31c0bf9f0d6191e4184d7b55fdb485b948d591782fef5b060d7660cce
-DIST python-gentoo-patches-3.11.10.tar.xz 8484 BLAKE2B 844aa7a855e3ab5a6307c6bfac9d58faad249ce550d21e8526125dc56b9665dc6fa00530a60efe8f851397d368057400851906e59fec10f6325bd83a51e39317 SHA512 bb602b80eed62ca8477b05665267ec3729fd9a85d9b709f844ad729f496d008a529d05d2ebfe8acb5db5ccb99005260bfe458f6ce0d9d358530670e0970e415e
DIST python-gentoo-patches-3.11.10_p1.tar.xz 10592 BLAKE2B 1cc02d22b55cb76beba133c37e6db3b9ba12b11cd8776acb064f14431842405cbc9efb5a06319cff1c73d9178ddbbe2e340829d4628c88a9589aa2fc1d308f80 SHA512 7ddb08e4d8a9173a26fa18de687a4c85c3d460e2bc595da6f4b15cfe3be264ccdc7d61d5fed1e7a82f256d21caf3ea7de87f774fde61a9d37bed15f86f546adb
-DIST python-gentoo-patches-3.11.9.tar.xz 8456 BLAKE2B 4e62837f17c1d056460df417b056a79ad78dbcdd3454761c7cda68ffe6faf8f4d4f04d5539e0ba94332fe19a751f7d5ff2c35ff969a6aa09a2c72d2ce5efbff1 SHA512 a288aa8d1d15e906e0f1762602a2122f9dc91bbd6b72123ac5d00ce55b3af324a4e8280b600fc0fb630e489e57ee1547d7595a4ede7a70e4b26d6686a8414997
-DIST python-gentoo-patches-3.11.9_p1.tar.xz 12348 BLAKE2B 885c18eb52d299c8da43fe48106a2464ce594822e8ed362150c98f749065447b7438741cacf82a71db102434a5b2a2e91778aca8609fd7ede7898f9e57a82d49 SHA512 2ed8a97692a8980e565038ad095dad8ed3daf1f8c5c5e042a0bc278c320e099962ad13b5ff919ae334674a4828c5e8f3b9c3af6b3c37e93a42374284f5ea2243
-DIST python-gentoo-patches-3.11.9_p2.tar.xz 14916 BLAKE2B a910eae412fc1ce3657272c3c2ea9ef95b8d5711ed4c85b93a35f4ab757b1134bff0f8c8a0071e8e06aac784d0b51e36cd9271f892098cba272da4a4e73317d1 SHA512 5c055186b3a8376f4f602ec5d1f8e7bf0f067bc67295c1cdaa68ce1fb6fb21cda75e22705b8a5a2a6525af67f3b36a82fde5ba6ae9b097a5914ab79a2f1a0fad
-DIST python-gentoo-patches-3.12.3.tar.xz 6028 BLAKE2B 7953a48a1d95a6a33bd88060fbcac463a5469371aa0c882c3945f1fea64a63c4d45fca8451f51f4eaeea00a04267ad2e54e4cc720c95e8bb5a3477e00263b80a SHA512 4779bab2b24e59e4a77987ce3e9611d99e87c9c4d016309758c26a65fe2e11ef04d48d5af628c02b1552dc1f31b768f87448f8e19e716b4fe372941e6dacac3f
-DIST python-gentoo-patches-3.12.4_p3.tar.xz 14796 BLAKE2B 68f5235ef434f9db16e7bc635ff51b6607cfb9be713fdc3c0ef624ec0f513345f6e02e27b8ebc2b3c8a5fcd4f4f5161024407ae364bdffd3b22a7a9d3a509b30 SHA512 8e337a7234b8ad64dd82435dcda0ef4e90c21214bd7b13a83fe9ba700d5b07ce11fb33b7d34d808132120b4a077fde26278b87116bb02ccef50470c046a66d2b
-DIST python-gentoo-patches-3.12.5.tar.xz 6056 BLAKE2B d9b85d98a75f6365c63ddabb8f25db3be11e7e4de22ec9426bb24160efcca25c75e3e19beec9fc2f8f8fe273c145f825c6f27ece2fca83d44cf2dbdfacae918d SHA512 72949ae8a1c796cb57e8b43d259037a723482b5a3849823c1cdc58acc012177a0ec836a4dd6ad656fe57ee1d84491c03ed9109667a953aa52bf5df7640de969f
-DIST python-gentoo-patches-3.12.5_p1.tar.xz 8632 BLAKE2B 13570bb465002cea3590b06d055b936ac0fcc68f6f258aca99a67f02f0b1cd28396424b686c5e080f593a74a744ff449e7220f51f167a858b2313be4c8b64b19 SHA512 eb9fb2d48236a9f7941fb8938310cc32d216eb01e19277175223b8b1fe1bfd606bde9a3c8bc66ad2e494fb87ce23b0d1acd359c375e4a11a5caae25450c11360
-DIST python-gentoo-patches-3.12.6.tar.xz 6048 BLAKE2B 577032d7aa4bab423781bffad8e64f56b492dc31fbd20acd91f3d28356bd697603dfd47a3a9051538dde2af942ae513727ecea415d82f5082a992bd22b8cb2dd SHA512 6f1037e97bb362a3d04c3ec080dc062c5de6e4b779cda0d88f684422d757acd6fc6f971c7004a3f50bbc0161dd28c3146672f74e0e598066f9a8ba4e0eb2627e
DIST python-gentoo-patches-3.12.6_p2.tar.xz 8144 BLAKE2B 2f36ce972e0b3e2884c9df629e3aeb1af05e4c77dffb866ff28e08a0a7df3c7cf36a9de250d148d909c07fd5bad483c95b3267818657c04e7d0d6fe512e21f9a SHA512 caa86c6cf693f9293b3aa8944452d117b78c1c3f8d6a6aa658cb5c2d2ffb0cecc6cf14b293872bd2101766ee7167ba88183904b2814090f8cbc64c1fa3b771be
-DIST python-gentoo-patches-3.12.6_p4.tar.xz 8764 BLAKE2B a75b9bc3768f1e07272f43d1a8f0fb6858eee7c786bc3141cd152382c287ee984b92ff1301e5894db7c24af994ee52ac7374a3edf692aa4255c1413b73209020 SHA512 237c9e8b50173a757204621d7019f68f230ea3e520ea1f078528acfb509fe7f44c0919a8ac0245e79b1a51c3e3545dd9ded51047451048ca782e35b1c4365363
-DIST python-gentoo-patches-3.12.7.tar.xz 8752 BLAKE2B 79fd69eba63bb6aafe05aaf95a3733a3b66d0e2b86eae8498a4f4b98bd492029f1c197a9f70738d4d17283653921b13fc7aba854223e498cb0093a93228f7f0b SHA512 513deafc50f2af13c88b01f2651899ce1bb5bd52a8035ca3edb469095c910e473b66d9dc120a61b78310a406147436feee1f77dcba32ce85db00979a01431e61
-DIST python-gentoo-patches-3.12.7_p1.tar.xz 10228 BLAKE2B 71cc6034201198d9483414fa362d68b550bfcbf75ca6f44dd8ab9d90b201098a05cbf4799b1db9359f4dc464acfcee9b0ce59045db27e8e9ce916b5aab010448 SHA512 22f9256c28b96723ad86878cbe44da155e280a8df08c6bcc568dc5296aca1a6fcc41ab823ee9e6d34ce5954bbedb76aea7dba2d9189e0558c536e8b2b9a3c8ce
-DIST python-gentoo-patches-3.13.0rc1_p2.tar.xz 12748 BLAKE2B 851d16e16d2a98fde62c38054d9bedf3538d88a59e19dcfd8ee7d86f3f67a3b66105664da9181dbfb9ad16aa0042815ccf469225348fb0ba8854337b0a736d33 SHA512 8264aa65bf71e97a4afe47a9fba58815163bc950ea70ff708c5f265722c5b4b8af19fbbe8a9c3673957a6de3af8307a9ba0ed9f4e42472ca24c5ed930682a038
-DIST python-gentoo-patches-3.13.0rc1_p3.tar.xz 15148 BLAKE2B 668060644372e8ddf2d9686796ec304ae7689f5c10ecbc6862f054f96504c418b0e4df28675e4fbb610889f9a665a7a54f23633036b0df35f19f40ef8e6bab32 SHA512 c0cbdf9e0fe2ad29175302e548ebfda1d2af42af0ffeb363eb8b0dc53e1059f5abd7dcd02fd8e9eb9ba7bef2b34b7693633f0a62dc1ab933f43077feacf00fbc
-DIST python-gentoo-patches-3.13.0rc2.tar.xz 5696 BLAKE2B 4e716d1d6225e811b598d029ef1dbdc413df614ef00ab8051ea697e633477a0114a3660cae037bdf4142f76c9f2efdefc25b604af11c31eb77d6d98d8f932cff SHA512 c20b53772bd7d305562657722aec70de78fffbf8ab7939f59d496e06c21b31fcd7b4a92573b1000d3bee4d90fd8b7422543f9cfdad15d60bc9a7ecf2a2259599
-DIST python-gentoo-patches-3.13.0rc2_p1.tar.xz 7360 BLAKE2B be41dfc96c333ca19a4a21f0931287503094676d1eba1e9e5ae86bf07be571fb7ddaf75eab87dc2ce9364ea1861ca5307ae1b8cdbe2c6f9a1a0e351f42f0fb97 SHA512 38b8b5f5ec21d3cf02a4db43929f4dd870200bde655b9b3acd0f398ed0468f9e43996821510cebb5e01b5633afc7e6fc254b0c80062bb577a044d85e25d28ff2
-DIST python-gentoo-patches-3.13.0rc2_p2.tar.xz 8004 BLAKE2B a6d13ad3e306dbe67d21e5242610b824f714ac76e347d5537e891fe9b07016261ec82cfdd849409e5ff0b16dbd52b52c6a586a506b22baddc94621bc7a2b30ac SHA512 78fc8ba72b6b4260f73df02130222d9369feff99846ed94f091ee34418bfd168870089f2b8c58e526a58acf0e59080e7a3c45a7fe5121eab09ca350cb5aa5761
-DIST python-gentoo-patches-3.13.0rc3.tar.xz 8004 BLAKE2B e1ec0d1b0d84fd5875111ed9916879bb78fcf764f6d6c12f570083df9215e0585ff4137636756bf3674f991f3bccdd859ec21d37c4b6a8dd738da03ecdedaa75 SHA512 1495f5f68d6ae10ad676b075cf4540dcdc38b254a9f4309d76097bdda427e06b65df173c99cd9c4f74646a4a29f10faa38a5a0342b1a40c1ebb6f92cf5a6f3b4
-DIST python-gentoo-patches-3.8.19_p2.tar.xz 35524 BLAKE2B a6b81e6ae907b60eea676cb65a9c693e62453dc44616baaadb294c5782a195c20eff6c2869b38ea110fe06e9e511468f4ab0c3d1811b16e0ab2833f9dc09b25b SHA512 9944c330b6062c2ac6e13fcfbc1c8835dfd078f6744cdfbc03ba787ae97c08bdae559cefadafe9dfe9be9c31f8c15ee895599b266d870f73c06a2f4b15c78dc3
-DIST python-gentoo-patches-3.8.19_p3.tar.xz 39392 BLAKE2B 451765c7546831c35f52e2772b8b43b6515f66cace2d13ed473228bf2d2b18f49b938a61d4cdf1be0fecbebfac1fc8d3d95f7597eb9d877c0b2ce495e8d419c1 SHA512 76e405ddfd3ee98dbd077f6ec83ae93d0506ddbc3b2b8884a0f38c6269ea982b635b0eb7820f6f9b2f81eb0ef514b93a5eb10437414cde4de2bfb7ea37764b3c
-DIST python-gentoo-patches-3.8.19_p4.tar.xz 41888 BLAKE2B 8f5fcf8b6d925c9f668a1f8ac22d4b8c2ff7b4d90103606afc37eef735d5ed0fe7288469fb18e08bc31165c16c9877977610e5a6af9e385518028baed34fde2f SHA512 4440725419af3bc5c4f1719dd39605df28e2bca625c3a822082e4541db9479dc6fcf8c2d6fc777292b75f70669ab7e010df105b2b580865a442df76c0f83ebbc
-DIST python-gentoo-patches-3.8.20.tar.xz 34380 BLAKE2B 1fea8e65f7db809a716376a3062a730321f68e711837c400fecffc27273754bb9aef3ed98651bce412596d35674f0b0813f7a722c1e2fe22954922c17846de37 SHA512 3070a0b3cb91129ffcada6052e50d779ea6b5480a3b4edc3e3f1c9d3b683ec1866168255db84b86f0a4dedb4a23949cda8f474d320db34d7511e9ede9a0342d9
+DIST python-gentoo-patches-3.12.6_p4-r1.tar.xz 9072 BLAKE2B 831f6c4284035832e0536ad3211d10c078e6c356e1fa593dd45984b29253deaf703bcb71e1b488508992dd37d5a140591c9193f1620bb966e39b048e4d5c6746 SHA512 9c61e0396c98fb45f3dccad9165e3f2b7bbeabd4a6fe88cc6e05a9d3012e39068571e63527dc831efaf24cb0e8fee75f60454481b2d1a0a44bedba69a7ed5c95
+DIST python-gentoo-patches-3.12.7_p1-r1.tar.xz 10552 BLAKE2B c71ffbbaa4dccd012fced7979c54f2b895ac207a892fd4b0118ab9ef678931c5449f6205855bf5fab9bc7fb5e5af0fc7c5b89bab608e5539855db571bb9d3aa4 SHA512 62207e2eb44e4eeb464ba4bdcefe15b3e03793793cbd033c153cdbf1c9a861779f3bb7259dc09e786c183450123ea283583d9870eca9d6c7b25e5f3dba6f89d6
+DIST python-gentoo-patches-3.13.0rc3-r1.tar.xz 8324 BLAKE2B 8a8124bf2c8bcb93113e7a17394dd83087c7f7d49e56e6878947029c496dcf8f6acb1da62124c73ee4121639fbaa6c3cbea13032c786c8b57bbbc379386394cf SHA512 cdfdd0f744f87438863432880791c611ae14f6169fdce08bfc22deb1e5b1f62aeb87044e6f7b15524b26bef8383ca1641d9b2861558bba597a74551e3ef478a7
DIST python-gentoo-patches-3.8.20_p2.tar.xz 42296 BLAKE2B c0f2c4d0adcb6c10eb68342b911016666cb68308717a5ca1369100a39229ce16c6e9dfdf9e1b4cffe0191d03ca5ee7d9568cd24885fd0f4f32f14e2e8c0a96a3 SHA512 cb9e98c0dd823b6e4f8a60e9095ab58e596cd9411b675678a0d4adefc92b37e14cecc7cecb82e287ac34a9ce1d4595f261b0736bcc9fc62c43c7d8c0b3be70e7
-DIST python-gentoo-patches-3.9.19_p3.tar.xz 28240 BLAKE2B 35c70b1f9a590abe9a74795f478ab788cd72c96e9d84f2756685e61324dc4203148e71b00a236bb4af8fb8315e3582ecec255b39749a653e0511d4a9f9fef725 SHA512 6b8f4dab4aa7d4d646ee4091b5cf76bbc8896d4299a3623660a2c5fec06c0cf56c0a50ac87604885cd155141bc85e0e80acdbedb7b34a813901aad021b9b8ab2
-DIST python-gentoo-patches-3.9.19_p4.tar.xz 32048 BLAKE2B 9595d508304baf36a2c8daa2ae15d3596fdfb5fed5c531fc379ee347d5b165885ade1842f094184fb7bd81a6385e45f9b77ba7bfa4334ea30292c0bc59b373e2 SHA512 5713c69ee3745246a570e0f05ac8f45baa8f9fa8a2154c930f1ddcf827a2a790cb5e308f5ff9452d3ffda5d60c167a02429af773eebf13dcb6463793cd448500
-DIST python-gentoo-patches-3.9.19_p5.tar.xz 34548 BLAKE2B 6ad49bba626932b3ba1b781fe5762882aa90b552bedc0f1b8fe0921c7e4ad1bd67ddbc2c11c969fae53fd2b6189dd1b1506da87c123c055ec3df023950bd1938 SHA512 d66a2d6012d98edde4a9eb52cd8a06f0338a25f44e299713abd970884c7b1d457c6a09a1e27035841eae3a4844bbec1b4d2a4b691bbf519867a6ed58f251e633
-DIST python-gentoo-patches-3.9.20.tar.xz 26992 BLAKE2B d77861cb99c5b0f76482c7250d45ab0726e9745929a2098724ba528034b7787e12be2505c3d2479f3b5e1760b8e4046d89ad6d5e4af200c4116c348c663792ba SHA512 132f1d731b671fbddf89a3af49c6887f3f8414f0f0df6769f243eab056e214ef3b2427075de10384cc4f6df2fd3140fb6321ad3e271539da9cb6846ba26e935e
DIST python-gentoo-patches-3.9.20_p1.tar.xz 34944 BLAKE2B 332454661adc03033c7e8a5fcc91081b7d405826e9bf89bb2c2e178a0795e4415c9e87ae923756470ee973441f242e194b397354964b8f43dadd4965d210a4f4 SHA512 19bf7227535526a733633723b75d49786dfd8738595c1115b4e05665bc13a1ea70cbf0cc62cb27e81c75f5db2aa56ab985eaa5abde6243697caccb2cb5288005
EBUILD python-2.7.18_p16-r2.ebuild 8597 BLAKE2B c472b0b3c49d4f848d910ac9d1d5fcffdbdf3f6f1454a4471807a1bc5129d7d6ff86c1af4515dec79056f3b079d1a0ea81e1693cfd49af2c2338462bb1f04cff SHA512 a7b48dff6e121915589a3ad746da6f52d29bef98d0d0a02578a5cc31cf9adcb1c32c82747cb768f355671e64825f75a8593d8424b7da36c09e8523a142b1ce1f
-EBUILD python-3.10.14_p1-r1.ebuild 14736 BLAKE2B db0857aaa9a71bc40870e8446ec35b193469c355fab4ad64f5c3e13ed46db00d859ef42ef629a0f7501b60f39adbc5407aa7a4097722d4e11747ba09a6ac3c1f SHA512 f843a2681278658b898a29853f8f1a9084fc7e55339e2c964d0bd89128ecbaa7b0c197370fb0d1fabd997f6243beede43d8399d7b831f819a0845729304e1ff6
-EBUILD python-3.10.14_p2.ebuild 14744 BLAKE2B 16a18e04e85835d384fe3c5ad0c06762daf3e1439a176561c471f8e1b44740b0f4cc37c0971bf2e55bb40c63c86b860f2cf1465ca17aaf0bd3403ed03744d3dc SHA512 ac6046a3c3617eca9324633a970365478df46ea0681b1bdcc8499e853c8c30ab5661315e0816227dafa98e5b7cc85997ba9e5ccbb1e0db72b24bb202ef503e20
-EBUILD python-3.10.14_p3-r1.ebuild 14726 BLAKE2B 2dea054b34bebc0e08d70be28eddc683c8d7939c08931ee087fc02ec226eb15a23a7ef653fbc462973ae54b536299cf1a020935b27ed1a86f20d1c4987107a8b SHA512 3eed06c65f76c3b31d0f91571cb89323754f035e4540257d06914eb3a826734e4031b3ef34dd0e445028ff051550b0c6c002141e15d8a7e1c0285a1411ca2195
-EBUILD python-3.10.14_p3.ebuild 14743 BLAKE2B 749324c8a0bebbd994e407df1d23eca119756059b03e7bbbb3ad8ffbeba066f3bbfce635007d65770afbb2ab440eb000c43a142eca701ac533b89c88771bd698 SHA512 d0e6dc09df3fd8e07c73f9462d83acfcd46827fe201416da10408db63193143b3210cb1b1755e208f717a77d32a5cf77909c538b89e5cfb8eeab5e5073452f7b
-EBUILD python-3.10.15.ebuild 14719 BLAKE2B dfce740248ca39f54aa7cb2bcfaad721cbed6f842e65a440748e7d85445dda66e4958e4ac5ff6358e44bda2d01a7d621558d4532fa29713c8bfdff93624bdaab SHA512 fce1bc5060e955a9ef584a81b27d19775393eecb9af4a17364fd1aac566d2fcba8de1549092b753ff71c64acc4b0af22a8720f9c105e1b3cea1c54a4f2bffc58
-EBUILD python-3.10.15_p1.ebuild 15446 BLAKE2B 27f873d960508c07077f61a32d8889607a49bbb5fc5aae68670d61da6ae301e13b0f3c72f60586766b4416a19c92ce2275549652ea34be4407129d008d4d012e SHA512 d8b22de443cec723d2c11aa72cd0e13512217abdd24dc00142b58c20b1735945ad01b94547ce7c6e3b57d6985eb85795152d52b0dcdb20e82815fab097c52c4c
-EBUILD python-3.11.10.ebuild 15851 BLAKE2B 434842641f5c9260ccb721824a8aaed518542ec8bddc22af909b47d5d51d80a610854013ee3e880489ba0921b4c86ad4822c066d118905d270fe3b95825abdca SHA512 6f9684173ef71e0783f2aa48c3aadbc05d8558edcab75ff6d068f813713756041c44d3b543c54e1397e2e3bf0c882befc92eec99e3eae6abfcab72d127763384
-EBUILD python-3.11.10_p1.ebuild 16636 BLAKE2B e8220b237f61fd691e766dacf03b5b8d8a9a62314e93c3d9cd77828dfa0f9ed68190926cba2711f56067b66f9153a44817cf70ea35acbfe40d9548836abf98f8 SHA512 ecd58d83608a924457300804dc86ced76ca595c5e8b97e4bd5d58a7186b998b7c1beaae9e6a9245c583ff203af07109d6089e11cc4705f240ea3e8a7381df174
-EBUILD python-3.11.9-r1.ebuild 15848 BLAKE2B a17afe7209aa2fd05c7aad36f5cfd11bda4a349be929ae4a1879af4ba6676388d41e3d92eb4b6f53f8c5f95a374cb23fe89d3137dbebd4851eee6c68270079aa SHA512 a7476c8d5dc7d6bfda19238eea5d4644cd3d81142cbc2bdab567a02a93440a5992236fa34ad73b42e0fada52899a302a346b251c0b46e209e872a65a556be074
-EBUILD python-3.11.9_p1.ebuild 15853 BLAKE2B b37f3657420c2f93674011dc4a74107050bd27fd725f239043814f229039b54a905c128129718531e2d4671f405aa4aed78b9a9109695f1cc3c724cee72974c3 SHA512 2e021a5738c89f51f0fc229360c8628a7ef377dbb675cf3e4c529eb321dfe37b1382470298eaaa1d36afbbcc0d5f605cf4acb22e7208325e42f8ad9f3b436054
-EBUILD python-3.11.9_p2-r1.ebuild 15858 BLAKE2B 470c644ee662ed97b2595bd44284d9ac9419f7d7ce05400d901d8e901445cfb3121d5e40b0dd847b6abc0928e751bd2c519e99a4961d4630ba3f77325d7f104d SHA512 95fe2fa0834beff8fefb5cf88ad256039f7dd0d0f6061b307c7311afe9f1fc55156f538d3c49c754889c637aea569f7a4c98ec3e39d454dab973d1175aac212d
-EBUILD python-3.11.9_p2.ebuild 15852 BLAKE2B 6312b4789af8cc8a47a14b0cd2b49d577b987316a63f04ee3a8b53f21a422cbe16b0d30d888544254e288b009350dc1d2f0d2c984af27564cf45dc6bc3f40de1 SHA512 8cb332b71f803ff25c584aca2e9f27f93cea7205ae2d1863247e08459984a54ce642bb79b25f21a3ee42d6404624d4ffb21560156dcb85702beacd8d7b86688b
-EBUILD python-3.12.3-r1.ebuild 15409 BLAKE2B 2db2f83147a027085d1e5830e2ea62e426582f2e5acb31dcfafa0b471f070ad16e5039b175290ee1eb2575ced3576fc303ce6cfbe83d21eaa228753df716d8ac SHA512 241aa0623b78a583b480bf895b0fc71ea0704ba34d52717c663f12d3022700714ebb5b7771d13be5c86396f487a68d74862118074d683a9a7b943059f456f6a0
-EBUILD python-3.12.4_p3.ebuild 14875 BLAKE2B 21f5691501313ae31e05981f587ceda596fea5dfded0110dceda3837ec138ccfc35d91713fd2591b96a9e6a34c8c4c0768a4f6c02c0c213f9ef5cdda495336e9 SHA512 e6dc3f6e4c9e57696acf665df515c2a7e5ecb1dd8cec548387fb1cb94e29c7a88dd9134aa54d5afc3565f2f91b42af400b522152222479222c5993d566a982e2
-EBUILD python-3.12.5.ebuild 14878 BLAKE2B 2ab1461560d196434f1aa62e688aa01c0e246eea83157db9afc024e68d9a6267ad2fee0617654f2c88718ad4a7302ad598944b5d89b67d0e30053d20b28c0cf0 SHA512 2ea5be6facfc050c6a762921f12b2a3cc7e291eb57e655b58a2c9f434d52c215fdf06cbb84fba28bd03140d728d448741127d7609e3ce27d0779116aba486147
-EBUILD python-3.12.5_p1-r1.ebuild 14880 BLAKE2B 52201071c16273b8aad667804cb15b683afaea415d68971c824f5420ec0182b787740f573b105510576dcd29a0d1c7b287a1ee93007b0c4cd760ab5d5fedc412 SHA512 0d55b1fe990e0e8343647c964143b1336ed809f430e75ddd8ed4462c32ac49779d1fb2252eba8ace0a9966b6dae4966fdb148e45ed873a1924fe56966349ffc3
-EBUILD python-3.12.5_p1.ebuild 14875 BLAKE2B 8c6a5ebbd2958e5450720616ab44e80df0456c204009f68566a1ef9979ac5543ca5b8ab798e3468126c41d26ad59cc73b83a7cbaff39644bea6a7a66b39cbc15 SHA512 2accb42531649876c32df1f25ba021d2de255cf7c8ae15e0738ffd55f9bfa752db1105236c6a83f1042f875fe06634cd17dc043800366d5017b386babaeb9027
-EBUILD python-3.12.6.ebuild 14874 BLAKE2B ec6cfd8d1ac7af5a7e90e40c48ac0929b41dda1f00cb28c9923619f421a42a5ca8b832e8dce70b651f0d16b320d69d99f00b70aba8b61e052d90d9767d0d15fd SHA512 70a304a0a5639130ee4d3cee5fd28126eb29c7b57b3cfa05aa5ba7f4d094cfcda1f19053489dcaeb90e8a319b8c632863c7298d900fe2b11f40ae2e0393a667c
-EBUILD python-3.12.6_p2.ebuild 15658 BLAKE2B 82c1cf6ebc34be46805d58a70a5e9fe7829d42e2bb13bc5180d4a4943bc2a48e2761d47ea95138b3a721e2d567a750e12a4622cf257e5ed376b27b4d8b0db2fc SHA512 974713fd76ee07a4baa8c399ff4753924392a64563cf8894c6cca1233ca350cb2b338f12c02617bc6aa8efc815e6fe4fc5957096b0390e26aa46747911f8a788
-EBUILD python-3.12.6_p4.ebuild 15596 BLAKE2B bdc8da8694982b262a9b4f5f8ad7ee2ad1f5f9c83f27f9081d80a7d4bc0e74c40e7640357556998d96d4dba5bbf5bafc70edad152a5fe56b44636b523fdd28ff SHA512 549ca4647cf73ed9398da44381efe3923ad15e7bdc4ac4659efa32938aedb6c3ae8d324c6db3d08e2428ab60402c501a51210dbb7adb3d83aaad4a35f5700ecd
-EBUILD python-3.12.7.ebuild 15596 BLAKE2B bdc8da8694982b262a9b4f5f8ad7ee2ad1f5f9c83f27f9081d80a7d4bc0e74c40e7640357556998d96d4dba5bbf5bafc70edad152a5fe56b44636b523fdd28ff SHA512 549ca4647cf73ed9398da44381efe3923ad15e7bdc4ac4659efa32938aedb6c3ae8d324c6db3d08e2428ab60402c501a51210dbb7adb3d83aaad4a35f5700ecd
-EBUILD python-3.12.7_p1.ebuild 15596 BLAKE2B bdc8da8694982b262a9b4f5f8ad7ee2ad1f5f9c83f27f9081d80a7d4bc0e74c40e7640357556998d96d4dba5bbf5bafc70edad152a5fe56b44636b523fdd28ff SHA512 549ca4647cf73ed9398da44381efe3923ad15e7bdc4ac4659efa32938aedb6c3ae8d324c6db3d08e2428ab60402c501a51210dbb7adb3d83aaad4a35f5700ecd
-EBUILD python-3.13.0_rc1_p2.ebuild 16995 BLAKE2B d090d335537d051dbfc2769bc8f2dc0637e3d19c1e1162b09df0dbf4f35bac77b9ee00e0fa1bec3e53b65326f272d443683e3311bce3362a7c1fbbfcab36c2a0 SHA512 cfb85ba067e0a252b98bc9dcaaa276a61fc43b2b127666373275a855bb9f7cf27a02a15d481899815146f279134e55dbc582c00d030cfa2f8942495d0580ced3
-EBUILD python-3.13.0_rc1_p3-r1.ebuild 16997 BLAKE2B dcf872868d9e61a2e0408dd1b953ac0ec373c67766bea1cb59f7c0831bf8b856eaf918773ee249737a4041b55ff9674e625107d600966192d3144ded561c8842 SHA512 00a91d9ac3d62f4d5db0faaf3d90b89c0d35d05dd6c47b694b1f8920e86a0dd1fcb23e1d04ed3886987395138e44a00feb394261da790a2b1cdfb41820ff2e77
-EBUILD python-3.13.0_rc1_p3.ebuild 16995 BLAKE2B d090d335537d051dbfc2769bc8f2dc0637e3d19c1e1162b09df0dbf4f35bac77b9ee00e0fa1bec3e53b65326f272d443683e3311bce3362a7c1fbbfcab36c2a0 SHA512 cfb85ba067e0a252b98bc9dcaaa276a61fc43b2b127666373275a855bb9f7cf27a02a15d481899815146f279134e55dbc582c00d030cfa2f8942495d0580ced3
-EBUILD python-3.13.0_rc2.ebuild 16818 BLAKE2B b7b22b6440f98e48d2c07e84f3af220d557b8b76e7e3e8be797368a1ede4da1d7051aaa9ed888ec697ae4cfe637fbd6a7c56a69368ef41fdb3385143a061165f SHA512 df5ee5283246bf499a895da2e9c39e93eab4d5f22d6de5e0bf32f211cce2051b7375451736565e8e952dd6bc86e4ff8157cffca896ae2cd2732607bb5e5ac964
-EBUILD python-3.13.0_rc2_p1.ebuild 16818 BLAKE2B b7b22b6440f98e48d2c07e84f3af220d557b8b76e7e3e8be797368a1ede4da1d7051aaa9ed888ec697ae4cfe637fbd6a7c56a69368ef41fdb3385143a061165f SHA512 df5ee5283246bf499a895da2e9c39e93eab4d5f22d6de5e0bf32f211cce2051b7375451736565e8e952dd6bc86e4ff8157cffca896ae2cd2732607bb5e5ac964
-EBUILD python-3.13.0_rc2_p2.ebuild 16751 BLAKE2B c9bd1031b3b06e991448007316633aaa3920c54a685ea9ea2a034fafc3bc367d0a5b304e510c5a28cd46548f6592f0d1f53da1e56465e72ea418bb057722f99c SHA512 e710ff961389b8950d53c9a4647bf8fda006f5fc3b4e627c45f9bb234ec8e6676ab7ff5dccdad9cf4d38163a528512ff0bf49036e74ffcb4ba19fc03b4b8719c
-EBUILD python-3.13.0_rc3.ebuild 16751 BLAKE2B c9bd1031b3b06e991448007316633aaa3920c54a685ea9ea2a034fafc3bc367d0a5b304e510c5a28cd46548f6592f0d1f53da1e56465e72ea418bb057722f99c SHA512 e710ff961389b8950d53c9a4647bf8fda006f5fc3b4e627c45f9bb234ec8e6676ab7ff5dccdad9cf4d38163a528512ff0bf49036e74ffcb4ba19fc03b4b8719c
-EBUILD python-3.8.19_p2.ebuild 12211 BLAKE2B 0143d7f12ef4084a2cf576d479bb3cd9c268ee66a5da1c0ca9551d579cb6c8b4a400df4576fc73e29ad116e2b5ba9a5dae89de7dec904da86c890ecdbda12a6b SHA512 124d91e27f15b3e865ed741b79a4b5be5baafe98f37d35a07ddc2f25b219dec92b9607721f819e38ce226fefdc84867877b3228e5dc21ebd83f7d133a0aff1e0
-EBUILD python-3.8.19_p3.ebuild 12218 BLAKE2B 7f4b59744358247d158b3e027a3280514d4ecf35b3c09c28887b0a35ea81c0b319092539444cf555ccb7345047f6e9124805879ad436ee0aceec40a4d0197805 SHA512 0bb53088d770e371894082da42b820527b1d0c80d73890a84ba860932cd7a269dd81ae6e87e45d8cdac314ee5afd5f3d22d670effafcf9cd2a218e5d1fb5a142
-EBUILD python-3.8.19_p4.ebuild 12218 BLAKE2B 7b44073976142ab9451a3368f46191f7d2795f03887ed036f00a1a6a865639e4fda5532f6bea26faac07561c070d079ec450b3f9af52793d235aed0dcfbc7a98 SHA512 e56d6f1645dca3fa8f7b7065314e79a87161a64b561487a0e051b0b2de9085c60a58134caa6b7e30c01f2cf892acc6e2f7769f75c95adafd112cd40cd2af0a4a
-EBUILD python-3.8.20.ebuild 12212 BLAKE2B b5dd72c9e483591a96abfa95ac494df92d421bbfd242cda2ba49ab8e9e6c1547e1c1076bba74072ac1f249820e533aca017d8dba25d28e131ca0e1149741a209 SHA512 d26b73159c9bd98e424c1dc8aa3dd866248d1d00e3d06e8a1eefff009ed810131f4954b38e3d10ae5a124b33e5325bfaf5256a024982ef76be13eeaefeef7ba3
-EBUILD python-3.8.20_p2.ebuild 13271 BLAKE2B e0f5f3b3fb7e6109e315eecedff38038cf642d9bad5e083ec7ea53b28ebb9d16b9e07841c3f76fafe453ad7dfc7b2a33bdc257e5d1238d97694379ca517ca67e SHA512 b680ca615d96d83e1693fd5b08b741319f03818f96e4631601b7443cb57e5bc91b8b442df04040998ad1d95c9ef37d5be580a404bbfba8973cdcd965011fbb24
-EBUILD python-3.9.19_p3.ebuild 13661 BLAKE2B e241c29e4352e1525da78f73dc5a1068639b5c168bd42633ed766e32a491671513c8319d0c6216a7cc51e63cd048b6d5b1f89d65a40a54e98b4d5fc10f6a26f7 SHA512 24e58b8a52cf2d042a7651192a5c157742e05e08268f5ccada763f3b42bdd0c357b9ab9d5815faa1a13a989cff3cd37d273c1b92bea926dd8b63113b4a161da6
-EBUILD python-3.9.19_p4.ebuild 13668 BLAKE2B baa7b029187e2fcebf635e1db6c674977ab9df798da54b9b81bc8198b467db6df761a8ecdbe8b6bab1ae785bc784b1db5d453a7bdf6dba895a01d5c0342321c6 SHA512 1831bcadcd8384f54dbb9079f0c5770fea49ba8a4e9a6b072afa1aa71c3e429eb48c0a6f9f6b454cd826a8e411d967e61d668ed40468a1b6294817d3e67b9096
-EBUILD python-3.9.19_p5.ebuild 13668 BLAKE2B c4c57e815671edc2851c166b1b33e76a03bfdf3b2d0f12957785c79d64b94f88461133afe43b134ad5c09e5f06001a398457786fb4736797fb3a153eb930984e SHA512 c6924a61265572b908f7cefa018b9976b33fa5e7f73a96e570813cbea7108500caab79953e2b7f565d7161d3132d87885c80cc35eb5be6d2198a1ce4e7843972
-EBUILD python-3.9.20.ebuild 13665 BLAKE2B 2c3fe49b45510544fa3aa72baf1740686dad9a3a177b3cdc051b0770827c99154441b7dca8d0a6f87a622eaa12b43e8191599796d736ddab6c98416d4f9094a8 SHA512 32f938cb0ec14e54d3b88163fb1ac712bcccf78c026c4be4f68fab6b2189d33bad6cbbe636877b00775b04339aca7de59a511730eadaa11d15ede4d18e2f9a67
-EBUILD python-3.9.20_p1.ebuild 15297 BLAKE2B 3ebe1ce2ddfbbcfefa60293a59576961cfaafe6ce30b5faf2c97b3301a5444fefb0144eddedb12fda5b45763dde194970e7ff0fac6fb1d1907f41e1013ec3621 SHA512 9831900de1734a647c8a22d8514843dd259e11a7334b3374358ce89d409de9ab5e61d5320239ef5c1376f86313f2610bda673f29a710e63a3c400f0abe1acbbe
+EBUILD python-3.10.15_p1.ebuild 15444 BLAKE2B 47c50a4ea77261d039591e099fa3f9956ca1bb0605e17baf48e1312ddae3744bf19eb5b077bf845ddd00d44c559fe10f6a3811810baeb55c80002659cb8550ec SHA512 5d3902f44ae6f80b8db6179052027ea418510bb9f3f99fc71bcb1f22b293d820c27e7a5f2943301ec6682bb8a4b86bff772c288c4782512bf573fa5bfed5b629
+EBUILD python-3.11.10_p1.ebuild 16633 BLAKE2B 9341f71a960b419b368c9c3caec0623f376e5f461c94a52b16a4b2c3c9e746bed70d8084c7304cab1def555f484091730672434208ed2c0029d2fb65a5b070b9 SHA512 9e9b661e70647c58ede7e6b4c53faf5678068dece756568c24f07a8cf69e5b1506138d6f24f9af76a680f52c5fe058ae4ec29d04d4730674330771c8e00c8cff
+EBUILD python-3.12.6_p2.ebuild 15655 BLAKE2B 9ceebbb512c0bf287463638291ef71da965cbcc8e57064fc9b05fb0b8e220c96a27b3af336909c72a430c20e4e5b34f7b4467b41b18ceac67938f8eb08631efd SHA512 f4a9ae7f3a2d7c8e4050a291145d32b8e76847d8f73886d9fbedca63061fdf7bd8f8b6337831bca14c5f49eb48a128c8642b8f0c19e34c08ff385d3f8a9b2f27
+EBUILD python-3.12.6_p4.ebuild 15593 BLAKE2B 5f2b268119ba1a8c92929e94b58b3586bf5237e826e52c093bbdd1c05b2f7d48ceb394d3048c9db84f579b8151ccbba77f400f0fcc57fade2f4d043f8415a882 SHA512 e6bfe1e8a6138b87ee79ec6adcd4e77617f5cbca846d658ffe469dd6fac3fc0bc28d3adde812332fa79f18f68b6fb4bdf97ffa0f00d72cbd7d7903a23b555806
+EBUILD python-3.12.7_p1.ebuild 15599 BLAKE2B 7cb1e514a919f133e531973903e6f4045c78c1f16a243e8bd4b994bad2178f215605cbcc86187c1b65b543baeda5b4f1f1a063f7bbff5e86db442604157e89ab SHA512 04aa7ffd26bbf691f4536e6cb243643670e30060c302bd002b5af87000156a235987268b07ed70fcc603c1f6330d015d08e1dfee8db884a05252c99c7ff39d99
+EBUILD python-3.13.0_rc3.ebuild 17350 BLAKE2B 8c53e451c1853629548d1310773efd71230c63c6efa2a2edecbb883aa34e704477a814b71ec78cd8cc99b02c464faef727665cf3b37e7d0ba4c46fa829e6608b SHA512 70f3e4c984d610df1aebec81758ffda502315666e40f7339cda878943c231741a7d9302ec251f54daca1147c54f15a64dbd5d6a0ace7460252032349ee0c579f
+EBUILD python-3.8.20_p2.ebuild 13269 BLAKE2B faa45db39b14c07e619a746dfc65ac8369390b67e763357b9dd1806af89d880a5007cdc9c8a13c6979cce2d59bd2b3be725c440ee4c2b83e7fd166ba26645695 SHA512 e64f3ea4d4f867c6a8cd7c1cf6f60e791c0c20ca98cda97dce06a73fc83de54e9f6572f5005822c3b82f2d56630678864b8896d485080a220bf7121fc2e83eaa
+EBUILD python-3.9.20_p1.ebuild 15295 BLAKE2B bf70dacfc1078c4a29a243cbb33aea78bb51580e3a706a34a6b50aadb0d40530e28872b2155c0b87d6e283c3832c2c49491e06c045442acb32fb12a17619448d SHA512 e23bb214a15d8353c47bb305893bb2f86109f648bcd0fff60bf29e4047d527cb6a873168c73203661c803bd1ff53e8ed88527a4e4d7de8a13d399bc4a290879d
MISC metadata.xml 1562 BLAKE2B d89ba32e0a261cfa3f185881f83a8bd9434aba2029aca437419d625ed3d025fc3226d4440dfdc34c1c64c42448bb00f903b88d80ac06f2bddf8dd58a7aa66673 SHA512 3fb20f7648db7a5d7080bb9e439b39f90cd0f56bfa24d0b97b9d7966c1062951b9d9d1cea9ec557d7db065cbd53c8a394503616d807b2ea4c5a3ea2c806c0ff2
diff --git a/dev-lang/python/python-3.10.14_p1-r1.ebuild b/dev-lang/python/python-3.10.14_p1-r1.ebuild
deleted file mode 100644
index 2271609fb5ef..000000000000
--- a/dev-lang/python/python-3.10.14_p1-r1.ebuild
+++ /dev/null
@@ -1,542 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.10.14_p2.ebuild b/dev-lang/python/python-3.10.14_p2.ebuild
deleted file mode 100644
index aeb4a5a25796..000000000000
--- a/dev-lang/python/python-3.10.14_p2.ebuild
+++ /dev/null
@@ -1,542 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.10.14_p3-r1.ebuild b/dev-lang/python/python-3.10.14_p3-r1.ebuild
deleted file mode 100644
index 5798604c8b10..000000000000
--- a/dev-lang/python/python-3.10.14_p3-r1.ebuild
+++ /dev/null
@@ -1,542 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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.10.14_p3.ebuild b/dev-lang/python/python-3.10.14_p3.ebuild
deleted file mode 100644
index 8e0941d197cc..000000000000
--- a/dev-lang/python/python-3.10.14_p3.ebuild
+++ /dev/null
@@ -1,542 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.10.15.ebuild b/dev-lang/python/python-3.10.15.ebuild
deleted file mode 100644
index f28d75ee7d81..000000000000
--- a/dev-lang/python/python-3.10.15.ebuild
+++ /dev/null
@@ -1,542 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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.10.15_p1.ebuild b/dev-lang/python/python-3.10.15_p1.ebuild
index 48034f500fed..d17f9d379036 100644
--- a/dev-lang/python/python-3.10.15_p1.ebuild
+++ b/dev-lang/python/python-3.10.15_p1.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+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
diff --git a/dev-lang/python/python-3.11.10.ebuild b/dev-lang/python/python-3.11.10.ebuild
deleted file mode 100644
index f4c941e9ba8f..000000000000
--- a/dev-lang/python/python-3.11.10.ebuild
+++ /dev/null
@@ -1,573 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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
-}
diff --git a/dev-lang/python/python-3.11.10_p1.ebuild b/dev-lang/python/python-3.11.10_p1.ebuild
index ace1289b35fb..7e4af08d8e21 100644
--- a/dev-lang/python/python-3.11.10_p1.ebuild
+++ b/dev-lang/python/python-3.11.10_p1.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86"
+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
diff --git a/dev-lang/python/python-3.11.9-r1.ebuild b/dev-lang/python/python-3.11.9-r1.ebuild
deleted file mode 100644
index 0a940dbae580..000000000000
--- a/dev-lang/python/python-3.11.9-r1.ebuild
+++ /dev/null
@@ -1,573 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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}" 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
-
- 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
-}
diff --git a/dev-lang/python/python-3.11.9_p1.ebuild b/dev-lang/python/python-3.11.9_p1.ebuild
deleted file mode 100644
index c86e59be624c..000000000000
--- a/dev-lang/python/python-3.11.9_p1.ebuild
+++ /dev/null
@@ -1,573 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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}" 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
-
- 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
-}
diff --git a/dev-lang/python/python-3.11.9_p2-r1.ebuild b/dev-lang/python/python-3.11.9_p2-r1.ebuild
deleted file mode 100644
index 948adca1f201..000000000000
--- a/dev-lang/python/python-3.11.9_p2-r1.ebuild
+++ /dev/null
@@ -1,573 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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
-}
diff --git a/dev-lang/python/python-3.11.9_p2.ebuild b/dev-lang/python/python-3.11.9_p2.ebuild
deleted file mode 100644
index d36974cc3ecf..000000000000
--- a/dev-lang/python/python-3.11.9_p2.ebuild
+++ /dev/null
@@ -1,573 +0,0 @@
-# Copyright 1999-2024 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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}" 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
-
- 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
-}
diff --git a/dev-lang/python/python-3.12.3-r1.ebuild b/dev-lang/python/python-3.12.3-r1.ebuild
deleted file mode 100644
index 675a18717773..000000000000
--- a/dev-lang/python/python-3.12.3-r1.ebuild
+++ /dev/null
@@ -1,571 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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
-
- 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
-}
diff --git a/dev-lang/python/python-3.12.4_p3.ebuild b/dev-lang/python/python-3.12.4_p3.ebuild
deleted file mode 100644
index da4b6d5cd004..000000000000
--- a/dev-lang/python/python-3.12.4_p3.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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
-
- 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.12.5.ebuild b/dev-lang/python/python-3.12.5.ebuild
deleted file mode 100644
index e259ddc1be8f..000000000000
--- a/dev-lang/python/python-3.12.5.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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
-
- 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.12.5_p1-r1.ebuild b/dev-lang/python/python-3.12.5_p1-r1.ebuild
deleted file mode 100644
index 1b6cd347e511..000000000000
--- a/dev-lang/python/python-3.12.5_p1-r1.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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
-}
diff --git a/dev-lang/python/python-3.12.5_p1.ebuild b/dev-lang/python/python-3.12.5_p1.ebuild
deleted file mode 100644
index 263ee2d5a07d..000000000000
--- a/dev-lang/python/python-3.12.5_p1.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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
-
- 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.12.6.ebuild b/dev-lang/python/python-3.12.6.ebuild
deleted file mode 100644
index d01771d8b52d..000000000000
--- a/dev-lang/python/python-3.12.6.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
-
- 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
-
- -x test_gdb
- -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
- )
-
- # musl-specific skips
- use elibc_musl && profile_task_flags+=(
- # 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 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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # musl-specific skips
- use elibc_musl && test_opts+=(
- # 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
- )
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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
-}
diff --git a/dev-lang/python/python-3.12.6_p2.ebuild b/dev-lang/python/python-3.12.6_p2.ebuild
index e28b7813f95d..b348f707d265 100644
--- a/dev-lang/python/python-3.12.6_p2.ebuild
+++ b/dev-lang/python/python-3.12.6_p2.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
+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
diff --git a/dev-lang/python/python-3.12.6_p4.ebuild b/dev-lang/python/python-3.12.6_p4.ebuild
index 6a78029784d4..ad09b6d91c11 100644
--- a/dev-lang/python/python-3.12.6_p4.ebuild
+++ b/dev-lang/python/python-3.12.6_p4.ebuild
@@ -10,7 +10,7 @@ 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}"
+PATCHSET="python-gentoo-patches-${MY_PV}-r1"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+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
diff --git a/dev-lang/python/python-3.12.7.ebuild b/dev-lang/python/python-3.12.7.ebuild
deleted file mode 100644
index 6a78029784d4..000000000000
--- a/dev-lang/python/python-3.12.7.ebuild
+++ /dev/null
@@ -1,606 +0,0 @@
-# Copyright 1999-2024 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 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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- 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-20221025 )
-"
-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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
- )
- ;;
- riscv*)
- COMMON_TEST_SKIPS+=(
- -x test_urllib2
- )
- ;;
- sparc*)
- COMMON_TEST_SKIPS+=(
- # bug 788022
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
-
- -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-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)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -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 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.12.7_p1.ebuild b/dev-lang/python/python-3.12.7_p1.ebuild
index 6a78029784d4..16691eb29cef 100644
--- a/dev-lang/python/python-3.12.7_p1.ebuild
+++ b/dev-lang/python/python-3.12.7_p1.ebuild
@@ -10,7 +10,7 @@ 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}"
+PATCHSET="python-gentoo-patches-${MY_PV}-r1"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
diff --git a/dev-lang/python/python-3.13.0_rc1_p2.ebuild b/dev-lang/python/python-3.13.0_rc1_p2.ebuild
deleted file mode 100644
index c6436649ac99..000000000000
--- a/dev-lang/python/python-3.13.0_rc1_p2.ebuild
+++ /dev/null
@@ -1,649 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-LLVM_COMPAT=( 18 )
-LLVM_OPTIONAL=1
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_}
-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 +gil jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
-"
-REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
-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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- valgrind? ( dev-debug/valgrind )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- dev-build/autoconf-archive
- app-alternatives/awk
- virtual/pkgconfig
- jit? (
- $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ')
- )
- verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
-"
-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
-
- if ! use gil || use jit; then
- ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
- ewarn "them could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead,"
- ewarn "please consider reporting freethreading / JIT problems upstream."
- fi
-}
-
-pkg_setup() {
- use jit && llvm-r1_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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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=(
- # failures
- -x test_concurrent_futures
- -x test_gdb
- # flaky: https://github.com/python/cpython/issues/121973
- -x test_pyrepl
- # flaky: https://github.com/python/cpython/issues/122136 (bug #936314)
- -x test_asyncio
- )
-
- # 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_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
- --verbose3
- -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_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
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- )
-
- # 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-libmpdec
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable gil)
- $(use_enable jit experimental-jit)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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}" 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
-
- 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
- # pydoc
- 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.13.0_beta2; then
- ewarn "Python 3.13.0b2 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.13 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.13/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_rc1_p3-r1.ebuild b/dev-lang/python/python-3.13.0_rc1_p3-r1.ebuild
deleted file mode 100644
index a08c2b73c8f8..000000000000
--- a/dev-lang/python/python-3.13.0_rc1_p3-r1.ebuild
+++ /dev/null
@@ -1,649 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-LLVM_COMPAT=( 18 )
-LLVM_OPTIONAL=1
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_}
-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 +gil jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
-"
-REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
-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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- valgrind? ( dev-debug/valgrind )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- dev-build/autoconf-archive
- app-alternatives/awk
- virtual/pkgconfig
- jit? (
- $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ')
- )
- verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
-"
-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
-
- if ! use gil || use jit; then
- ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
- ewarn "them could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead,"
- ewarn "please consider reporting freethreading / JIT problems upstream."
- fi
-}
-
-pkg_setup() {
- use jit && llvm-r1_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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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=(
- # failures
- -x test_concurrent_futures
- -x test_gdb
- # flaky: https://github.com/python/cpython/issues/121973
- -x test_pyrepl
- # flaky: https://github.com/python/cpython/issues/122136 (bug #936314)
- -x test_asyncio
- )
-
- # 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_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
- --verbose3
- -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_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
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- )
-
- # 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-libmpdec
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable gil)
- $(use_enable jit experimental-jit)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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
- # pydoc
- 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.13.0_beta2; then
- ewarn "Python 3.13.0b2 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.13 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.13/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_rc1_p3.ebuild b/dev-lang/python/python-3.13.0_rc1_p3.ebuild
deleted file mode 100644
index c6436649ac99..000000000000
--- a/dev-lang/python/python-3.13.0_rc1_p3.ebuild
+++ /dev/null
@@ -1,649 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-LLVM_COMPAT=( 18 )
-LLVM_OPTIONAL=1
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_}
-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 +gil jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
-"
-REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
-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-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- valgrind? ( dev-debug/valgrind )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- dev-build/autoconf-archive
- app-alternatives/awk
- virtual/pkgconfig
- jit? (
- $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ')
- )
- verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
-"
-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
-
- if ! use gil || use jit; then
- ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
- ewarn "them could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead,"
- ewarn "please consider reporting freethreading / JIT problems upstream."
- fi
-}
-
-pkg_setup() {
- use jit && llvm-r1_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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes _crypt
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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=(
- # failures
- -x test_concurrent_futures
- -x test_gdb
- # flaky: https://github.com/python/cpython/issues/121973
- -x test_pyrepl
- # flaky: https://github.com/python/cpython/issues/122136 (bug #936314)
- -x test_asyncio
- )
-
- # 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_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
- --verbose3
- -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_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
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- )
-
- # 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-libmpdec
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable gil)
- $(use_enable jit experimental-jit)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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}" 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
-
- 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
- # pydoc
- 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.13.0_beta2; then
- ewarn "Python 3.13.0b2 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.13 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.13/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_rc2.ebuild b/dev-lang/python/python-3.13.0_rc2.ebuild
deleted file mode 100644
index 7e681c4cc38e..000000000000
--- a/dev-lang/python/python-3.13.0_rc2.ebuild
+++ /dev/null
@@ -1,643 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-LLVM_COMPAT=( 18 )
-LLVM_OPTIONAL=1
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_}
-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 +gil jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
-"
-REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
-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/libintl
- ensurepip? ( dev-python/ensurepip-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- valgrind? ( dev-debug/valgrind )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- dev-build/autoconf-archive
- app-alternatives/awk
- virtual/pkgconfig
- jit? (
- $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ')
- )
- verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
-"
-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
-
- if ! use gil || use jit; then
- ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
- ewarn "them could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead,"
- ewarn "please consider reporting freethreading / JIT problems upstream."
- fi
-}
-
-pkg_setup() {
- use jit && llvm-r1_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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
- )
- ;;
- riscv*)
- COMMON_TEST_SKIPS+=(
- -x test_urllib2
- )
- ;;
- sparc*)
- COMMON_TEST_SKIPS+=(
- # bug 788022
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
-
- -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
- --verbose3
- -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_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
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- )
-
- # 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-libmpdec
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable gil)
- $(use_enable jit experimental-jit)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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
- # pydoc
- 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.13.0_beta2; then
- ewarn "Python 3.13.0b2 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.13 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.13/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_rc2_p1.ebuild b/dev-lang/python/python-3.13.0_rc2_p1.ebuild
deleted file mode 100644
index 7e681c4cc38e..000000000000
--- a/dev-lang/python/python-3.13.0_rc2_p1.ebuild
+++ /dev/null
@@ -1,643 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-LLVM_COMPAT=( 18 )
-LLVM_OPTIONAL=1
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_}
-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 +gil jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
-"
-REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
-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/libintl
- ensurepip? ( dev-python/ensurepip-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- valgrind? ( dev-debug/valgrind )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- dev-build/autoconf-archive
- app-alternatives/awk
- virtual/pkgconfig
- jit? (
- $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ')
- )
- verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
-"
-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
-
- if ! use gil || use jit; then
- ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
- ewarn "them could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead,"
- ewarn "please consider reporting freethreading / JIT problems upstream."
- fi
-}
-
-pkg_setup() {
- use jit && llvm-r1_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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
- )
- ;;
- riscv*)
- COMMON_TEST_SKIPS+=(
- -x test_urllib2
- )
- ;;
- sparc*)
- COMMON_TEST_SKIPS+=(
- # bug 788022
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
-
- -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
- --verbose3
- -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_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
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- )
-
- # 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-libmpdec
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable gil)
- $(use_enable jit experimental-jit)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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
- # pydoc
- 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.13.0_beta2; then
- ewarn "Python 3.13.0b2 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.13 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.13/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_rc2_p2.ebuild b/dev-lang/python/python-3.13.0_rc2_p2.ebuild
deleted file mode 100644
index 8b819955af0f..000000000000
--- a/dev-lang/python/python-3.13.0_rc2_p2.ebuild
+++ /dev/null
@@ -1,640 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-LLVM_COMPAT=( 18 )
-LLVM_OPTIONAL=1
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_}
-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 +gil jit
- libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind
-"
-REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
-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/libintl
- ensurepip? ( dev-python/ensurepip-pip )
- 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
- dev-python/ensurepip-pip
- dev-python/ensurepip-setuptools
- dev-python/ensurepip-wheel
- )
- valgrind? ( dev-debug/valgrind )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- dev-build/autoconf-archive
- app-alternatives/awk
- virtual/pkgconfig
- jit? (
- $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ')
- )
- verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
-"
-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
-
- if ! use gil || use jit; then
- ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
- ewarn "them could lead to unexpected breakage, including race conditions"
- ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
- ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead,"
- ewarn "please consider reporting freethreading / JIT problems upstream."
- fi
-}
-
-pkg_setup() {
- use jit && llvm-r1_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.
- # TODO: Makefile has annoying deps on expat headers
- #rm -r Modules/expat || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
-
- # breaks tests when using --with-wheel-pkg-dir
- rm -r Lib/test/wheeldata || 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
-
- # Avoid as many dependencies as possible for the cross build.
- mkdir Modules || die
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- _dbm _gdbm
- _sqlite3
- _hashlib _ssl
- _curses _curses_panel
- readline
- _tkinter
- pyexpat
- zlib
- # We disabled these for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross. This should be rechecked for the pure Makefile approach,
- # and uncommented if needed.
- #_ctypes
- EOF
-
- ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
-
- # 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
-}
-
-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
- )
- ;;
- riscv*)
- COMMON_TEST_SKIPS+=(
- -x test_urllib2
- )
- ;;
- sparc*)
- COMMON_TEST_SKIPS+=(
- # bug 788022
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
-
- -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
- --verbose3
- -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_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
-
- # Fails in profiling run, passes in src_test().
- -x test_capi
- )
-
- # 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-libmpdec
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable gil)
- $(use_enable jit experimental-jit)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
-
- # https://bugs.gentoo.org/700012
- if tc-is-lto; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- myeconfargs+=(
- --with-lto
- )
- fi
-
- # Force-disable modules we don't want built.
- # See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
- cat > Modules/Setup.local <<-EOF || die
- *disabled*
- nis
- $(usev !gdbm '_gdbm _dbm')
- $(usev !sqlite '_sqlite3')
- $(usev !ssl '_hashlib _ssl')
- $(usev !ncurses '_curses _curses_panel')
- $(usev !readline 'readline')
- $(usev !tk '_tkinter')
- EOF
-
- # disable implicit optimization/debugging flags
- local -x OPT=
-
- 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
-
- 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
- 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=
- 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=
-
- 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 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
- # pydoc
- 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.13.0_beta2; then
- ewarn "Python 3.13.0b2 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.13 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.13/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_rc3.ebuild b/dev-lang/python/python-3.13.0_rc3.ebuild
index 8b819955af0f..c71af7471360 100644
--- a/dev-lang/python/python-3.13.0_rc3.ebuild
+++ b/dev-lang/python/python-3.13.0_rc3.ebuild
@@ -7,13 +7,14 @@ LLVM_COMPAT=( 18 )
LLVM_OPTIONAL=1
WANT_LIBTOOL="none"
-inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing
-inherit pax-utils python-utils-r1 toolchain-funcs verify-sig
+inherit autotools check-reqs flag-o-matic linux-info llvm-r1
+inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
+inherit verify-sig
MY_PV=${PV/_}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
+PATCHSET="python-gentoo-patches-${MY_PV}-r1"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
@@ -76,7 +77,6 @@ DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
- app-arch/xz-utils
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
dev-python/ensurepip-wheel
@@ -114,8 +114,15 @@ QA_PKGCONFIG_VERSION=${PYVER}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
+declare -rA PYTHON_KERNEL_CHECKS=(
+ ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
+ ["DNOTIFY"]="test_fcntl" # bug 938662
+)
+
pkg_pretend() {
- use test && check-reqs_pkg_pretend
+ if use pgo || use test; then
+ check-reqs_pkg_pretend
+ fi
if ! use gil || use jit; then
ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using"
@@ -127,8 +134,18 @@ pkg_pretend() {
}
pkg_setup() {
- use jit && llvm-r1_pkg_setup
- use test && check-reqs_pkg_setup
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ use jit && llvm-r1_pkg_setup
+ if use test || use pgo; then
+ check-reqs_pkg_setup
+
+ local CONFIG_CHECK
+ for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
+ CONFIG_CHECK+="~${f} "
+ done
+ linux-info_pkg_setup
+ fi
+ fi
}
src_unpack() {
@@ -297,6 +314,14 @@ src_configure() {
;;
esac
+ # Kernel-config specific skips
+ for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
+ if ! linux_config_exists || ! linux_chkconfig_present "${option}"
+ then
+ COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
+ fi
+ done
+
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
diff --git a/dev-lang/python/python-3.8.19_p2.ebuild b/dev-lang/python/python-3.8.19_p2.ebuild
deleted file mode 100644
index 36cdf5e73475..000000000000
--- a/dev-lang/python/python-3.8.19_p2.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-WANT_LIBTOOL="none"
-
-inherit autotools 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-QA_PKGCONFIG_VERSION=${PYVER}
-# false positives -- functions specific to *BSD
-QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
-
-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
-
- rm Lib/distutils/command/wininst*.exe || 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"
- 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
-
- 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
- --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_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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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
-
- # 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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.8.19_p3.ebuild b/dev-lang/python/python-3.8.19_p3.ebuild
deleted file mode 100644
index afc95ee15c07..000000000000
--- a/dev-lang/python/python-3.8.19_p3.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-WANT_LIBTOOL="none"
-
-inherit autotools 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-QA_PKGCONFIG_VERSION=${PYVER}
-# false positives -- functions specific to *BSD
-QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
-
-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
-
- rm Lib/distutils/command/wininst*.exe || 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"
- 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
-
- 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
- --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_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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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
-
- # 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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.8.19_p4.ebuild b/dev-lang/python/python-3.8.19_p4.ebuild
deleted file mode 100644
index 288c72fdff42..000000000000
--- a/dev-lang/python/python-3.8.19_p4.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-WANT_LIBTOOL="none"
-
-inherit autotools 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-QA_PKGCONFIG_VERSION=${PYVER}
-# false positives -- functions specific to *BSD
-QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
-
-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
-
- rm Lib/distutils/command/wininst*.exe || 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"
- 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
-
- 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
- --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_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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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
-
- # 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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.8.20.ebuild b/dev-lang/python/python-3.8.20.ebuild
deleted file mode 100644
index ee794ad3c95c..000000000000
--- a/dev-lang/python/python-3.8.20.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-WANT_LIBTOOL="none"
-
-inherit autotools 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
-
-QA_PKGCONFIG_VERSION=${PYVER}
-# false positives -- functions specific to *BSD
-QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
-
-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
-
- rm Lib/distutils/command/wininst*.exe || 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"
- 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
-
- 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
- --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_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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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
-
- # 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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.8.20_p2.ebuild b/dev-lang/python/python-3.8.20_p2.ebuild
index 1ea5c2ddc9ac..3d8191354d82 100644
--- a/dev-lang/python/python-3.8.20_p2.ebuild
+++ b/dev-lang/python/python-3.8.20_p2.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
bluetooth build debug +ensurepip examples gdbm +ncurses pgo
+readline +sqlite +ssl test tk valgrind
diff --git a/dev-lang/python/python-3.9.19_p3.ebuild b/dev-lang/python/python-3.9.19_p3.ebuild
deleted file mode 100644
index a9aa37ab89f7..000000000000
--- a/dev-lang/python/python-3.9.19_p3.ebuild
+++ /dev/null
@@ -1,492 +0,0 @@
-# Copyright 1999-2024 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-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
-}
-
-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
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -x test_dtrace
- -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_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
- )
-
- 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
- --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 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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.9.19_p4.ebuild b/dev-lang/python/python-3.9.19_p4.ebuild
deleted file mode 100644
index 655f7719d8be..000000000000
--- a/dev-lang/python/python-3.9.19_p4.ebuild
+++ /dev/null
@@ -1,492 +0,0 @@
-# Copyright 1999-2024 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-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
-}
-
-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
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -x test_dtrace
- -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_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
- )
-
- 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
- --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 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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.9.19_p5.ebuild b/dev-lang/python/python-3.9.19_p5.ebuild
deleted file mode 100644
index 75f1df5001cf..000000000000
--- a/dev-lang/python/python-3.9.19_p5.ebuild
+++ /dev/null
@@ -1,492 +0,0 @@
-# Copyright 1999-2024 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-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
-}
-
-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
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -x test_dtrace
- -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_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
- )
-
- 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
- --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 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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.9.20.ebuild b/dev-lang/python/python-3.9.20.ebuild
deleted file mode 100644
index 7bc136ed813d..000000000000
--- a/dev-lang/python/python-3.9.20.ebuild
+++ /dev/null
@@ -1,492 +0,0 @@
-# Copyright 1999-2024 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 +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? ( >=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
- )
-"
-# 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 )
-"
-
-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
-}
-
-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
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -x test_dtrace
- -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_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
- )
-
- 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
- --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 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
- # 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[@]}"
-
- --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
- )
-
- # 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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- PYTHON_DISABLE_MODULES="${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="${PYTHON_DISABLE_MODULES} _ctypes _crypt" 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=
-
- # 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/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_concurrent_futures
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || 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
-
- 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.9.20_p1.ebuild b/dev-lang/python/python-3.9.20_p1.ebuild
index 4e44ec0d7ac0..8ef53f8d24dd 100644
--- a/dev-lang/python/python-3.9.20_p1.ebuild
+++ b/dev-lang/python/python-3.9.20_p1.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
bluetooth build debug +ensurepip examples gdbm +ncurses pgo
+readline +sqlite +ssl test tk valgrind