From 4cbcc855382a06088e2f016f62cafdbcb7e40665 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 Mar 2022 00:40:44 +0000 Subject: gentoo resync : 20.03.2022 --- dev-lang/python/Manifest | 38 ++- dev-lang/python/python-2.7.18_p13.ebuild | 346 ----------------------- dev-lang/python/python-2.7.18_p14.ebuild | 346 +++++++++++++++++++++++ dev-lang/python/python-2.7.18_p15.ebuild | 346 +++++++++++++++++++++++ dev-lang/python/python-3.10.2_p1.ebuild | 392 ++++++++++++++++++++++++++ dev-lang/python/python-3.10.3.ebuild | 408 ++++++++++++++++++++++++++++ dev-lang/python/python-3.11.0_alpha4.ebuild | 389 -------------------------- dev-lang/python/python-3.11.0_alpha6.ebuild | 403 +++++++++++++++++++++++++++ dev-lang/python/python-3.7.12_p2.ebuild | 341 +++++++++++++++++++++++ dev-lang/python/python-3.7.13.ebuild | 349 ++++++++++++++++++++++++ dev-lang/python/python-3.8.12_p2.ebuild | 351 ++++++++++++++++++++++++ dev-lang/python/python-3.8.13.ebuild | 359 ++++++++++++++++++++++++ dev-lang/python/python-3.9.10_p1.ebuild | 386 ++++++++++++++++++++++++++ dev-lang/python/python-3.9.11.ebuild | 394 +++++++++++++++++++++++++++ 14 files changed, 4107 insertions(+), 741 deletions(-) delete mode 100644 dev-lang/python/python-2.7.18_p13.ebuild create mode 100644 dev-lang/python/python-2.7.18_p14.ebuild create mode 100644 dev-lang/python/python-2.7.18_p15.ebuild create mode 100644 dev-lang/python/python-3.10.2_p1.ebuild create mode 100644 dev-lang/python/python-3.10.3.ebuild delete mode 100644 dev-lang/python/python-3.11.0_alpha4.ebuild create mode 100644 dev-lang/python/python-3.11.0_alpha6.ebuild create mode 100644 dev-lang/python/python-3.7.12_p2.ebuild create mode 100644 dev-lang/python/python-3.7.13.ebuild create mode 100644 dev-lang/python/python-3.8.12_p2.ebuild create mode 100644 dev-lang/python/python-3.8.13.ebuild create mode 100644 dev-lang/python/python-3.9.10_p1.ebuild create mode 100644 dev-lang/python/python-3.9.11.ebuild (limited to 'dev-lang/python') diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 580e76ebaaee..fec2486708c6 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -8,41 +8,67 @@ DIST Python-3.10.1.tar.xz 18775460 BLAKE2B d2dbf875ef5f9cee6dfd66e2d2489b884813c DIST Python-3.10.1.tar.xz.asc 833 BLAKE2B a5678c522b486a246993616ee36ddb3f74a093fb5729d8d2da3cfc4de5c3e1fcf3f4f55504b7bbf929050204d22a89ff3c7750b599034a3d5c941666f54fcad4 SHA512 645d5f40e6e80a590923a48763f20dea7da3f3eea5825bb79e08618d81d1b8eee0ddee2b57503321a584280536e0671e4913e5ad450568fbbb44509c01d3907d DIST Python-3.10.2.tar.xz 18780936 BLAKE2B ce202f7b45858b88ffdefe8217422fa9dccccc58000c6f3d40c9791d28ab58f67fa033b5102cacaf0ccec5524510becec9870c9bf5238b78203a0a354e8f526c SHA512 215a7159face84788fe547c1e2689b8d0ae510275157cf01636bef2902d0ff465f844eb0328c9f39fd1cd03a1d1736d4cf258992f2788e492a801a372032c08b DIST Python-3.10.2.tar.xz.asc 833 BLAKE2B ff3b1f8c1c62e75a00ac70bbe3a2e87406f0f44fba8bfa1ea5c0d8b8175a8720af62c57664bf50fa5f7ec7caeeb2669c17917e457daf43755f1583e92eb410ba SHA512 086aeaa999d3005cc1f9057d90230c7a9e65d80f436febf16b0e8ba6f49645870ef21170ca1af50c8e2f51e6f46338cfad73a2d91320ad4a3315a2ae87eb70b4 -DIST Python-3.11.0a4.tar.xz 18805548 BLAKE2B 3315ee4392c3a7312273c705779415f5456e3d19d5e7b4008a67b4ea68a9d8aac2ecb06524b856a3522723f628ff687b01f2a5a48a04c24b4883ba357c30d685 SHA512 721ed64f3fde360e9eae6d8f8a046091c7c08f14c860572ac868132dffa4ae0a46f3f57a3872fcc096551a66e4fa3b1c87f77baa52d8524da026bbdaa74837ec -DIST Python-3.11.0a4.tar.xz.asc 833 BLAKE2B fd12a6381eb137ef99ed508f8a704b4794d554d8e62a3febd8f87f226ad86efb1f5e5607d088fdba33ee2215118bb05e2357bad5ceba5159a76821fc74b079db SHA512 21e56475186c3e6a029a51799cf8c86ac74d3810b5aa76e4b4bc063bacb2624b21b6ec3450dd9f91722162e57390617efb521351b11d262d6583655081277611 +DIST Python-3.10.3.tar.xz 19343528 BLAKE2B 5234f14d3dbc1b7c43da65fbc242218c1f94601d13ca84419cd9b29eab22ab411b7cd043ebaabc2b2aa1856e5e91c3ecc42eaaf333f92b8e133844e09d515bdf SHA512 5020407798ebaae6002b8de29475c1064a32f1527a0e4ec6fe7fcf076b4ea3ef0ab4b4a7864a6081cc8dd01dd545123198b11cc8dd1259c670394b7d81f35a86 +DIST Python-3.10.3.tar.xz.asc 833 BLAKE2B 03117464582146b78748ba129a10b7481607dd9dc7cdd38ced9f20e96c8c01722852941b6b7b58f34fd42b3709fc8bd31b7ba97d89235ce61d8f0ac89106d69b SHA512 ddbe55225fcdd5d36f6be4bb802ea8fb9c5e8cf1b573b76501cc0999bcbfb2355f5bf7bbe10bf7cb209e54f37ed0789b4b936920b208b2afc18597bab33f2f51 +DIST Python-3.11.0a6.tar.xz 18754036 BLAKE2B af19b9f548891fa9c89899f83ea05579a0fd30d030575dfbc33f28d26ec7c97081d978462760bbf3a160ff2ff4b04127983c7b6a62062587e630eca7bafe6981 SHA512 867f7aabe10977ccf31bcfd6968fd8bb880cf5c3671bb70364a9b37296dae7ab017624446c64c12f7753b59c1ebda9e494bed5f946c5586b54fd86b0289d04ea +DIST Python-3.11.0a6.tar.xz.asc 833 BLAKE2B 30b26fcc60d77f189c8b6c7e87306f752de88366700a899f9a6a90e2a74c5a5259592a350eb812a338fd823994c066d0354285ba54a9e9421f400c9cf1c41b33 SHA512 c29bef3fa59ef304f420a18657fe3448211e4f742cc119937335aaad36b9898d965d84fc6ea8a2f9f27865e237cc929b9843663292c44dd7b3ae329aa3fab1e9 DIST Python-3.6.15.tar.xz 17223796 BLAKE2B c139c6f93ea70ad898d5626dfa964280a14de9676f0d9d55668ad91618b1ba330874cbba8d6526a87e53b585ff34e3bf242613ca3fb17ee60f362a9676306c7d SHA512 f1894d704c91669d94ec83b5631288bf1e0c73ddcf33cea0977575f262eb672caebc8ac00e34e9b99c321c19cc9a71d6081fa957bb8e23cf5bfba50f345145ef DIST Python-3.6.15.tar.xz.asc 833 BLAKE2B c910f2367ed947ff6b33380bf8fee318c65d6e5fb0c4a847fd8f2761bbae81dec07b729b31eca060916264b6a0ccf5c52ca72181b3db79751df7697a426a8939 SHA512 cdc93e5d8fb2b5b48a1560a55bba4680adea10e35c8c38b4c51cfd2f6ba54ab2a5d4e5f71b78b889f98cf8ad9d598e0f4e019d50cc16f7db57f9d292a860fcfd DIST Python-3.7.12.tar.xz 17401916 BLAKE2B f01b5cc54cd0ffe2e8756767c624dda8d2fbf24e90f22a16b5a406dad995ef218613db10f0b3fb2da0ece50ccb02c8a8e007ceb0842ce9e93ee9df7348ef1528 SHA512 e1a5942908c1d1469c0ab129fb4287d4ba6eb2a030e88fd71c043fe187a1bc86c00878dab29147199617a361a0c60d9e720fe3bc58bc7bc4cc8ec4bb50c7ea2a DIST Python-3.7.12.tar.xz.asc 833 BLAKE2B 587fcf019f4b07b811834d7279b9861eb709731a431be9cbe8f5b868ac72b6d9a4de8b24e3fefd6b339813299514a0ac12b5f627acd04c185ff8dea22a044723 SHA512 a47003dd5c784eca4e3c34dc8705d1171043e060f3a97e4dd63ce4aec2bceac56d7e808924d63b2a38f9a020bf799cf29e5055fb444b9b2c3f03976d47122355 +DIST Python-3.7.13.tar.xz 18027980 BLAKE2B e5ea14e3b080e7a126a4faeaad9287a7b5cb6be138a0423b4dbfd1c3b07e452ed99aeb818380ab02e9967673b0855a4a81cec1fa5b9b919f8a4e45da70e9df3a SHA512 e95366b68c1bc1dc1cfb2d956f1f49c5d0f620b4780d03002b3c321d2788108eb4e51d224cfa6bcecf7d780e9024ab0ef88b422d6d25e983dbc56b2a89b7dce9 +DIST Python-3.7.13.tar.xz.asc 833 BLAKE2B 1e09a904c07951ae10fc039935c3974dbe2d0a51fed40c6830f321e42f7ddab32a17afe1b35319982160e0fed47b1ff7663d0f18d0b4ae8e81a34298394462a9 SHA512 35c35bd386841fde4f7d614de84cdc05d8ba1377b224bbcd4d6de18a1c87969b23e1583ca9f4e673e0340350c7f59c80986f8ccf41ef573b6585320c90fde19b DIST Python-3.8.12.tar.xz 18443568 BLAKE2B 73413aee7a31347ac4342718a54d23d4036220262c4cd41cd50b06c3b1698d52d11cf7ac2c781b919f2cdb0dcb6397d623c463dcdcd1edca99abbbce239a3c6e SHA512 2f93fe5ff83f470c7b6a1b7f29f499a2a010fabd649e9fe65ad3fbfa21b6e1966e77c9b7ac012d978159bc3fe63fec2d64bc6982fc2ee1714d3fa0e47631f279 DIST Python-3.8.12.tar.xz.asc 833 BLAKE2B 33f59aa667555832ee510d2a7295079f34a3983dfa84beab20b33ec691ea3eecfcc4a62591fe233fc30622d0236ee69a3d41b8922ee2f4c632df3523d565c3ec SHA512 ef552b716a721f410abb14387594c8b0ddc65ce4b8a6ae6bf920c1db2ea9ddf6bbf547e93d3716495ae31848eb1049aae4257016e888393681bbfb6f6529bc12 +DIST Python-3.8.13.tar.xz 19023016 BLAKE2B d3cb8624496e56d93d34f2aa5082746869a99210197529bc19e6a9d265f4ce246e0e83a3528a7602a28aac8855bf84e6bf6495b85e9202fcf04ef90600cb5e43 SHA512 5c732b5d21b189b99a0e9ccd3ae59466bed60a930d5d3f437a262d38f0797b776cecbf12a1852eaebcfb638a6f2e28e471cc2ebf94237cc728144be21842cb81 +DIST Python-3.8.13.tar.xz.asc 833 BLAKE2B 918894777e1a783f2a7c7958a808610631cb7a6039df84675158e8d2fd66782f29921d44ab9b4625c4ca3821852e0d0e0005163b086c7d0c3d617e3a76cb7033 SHA512 6683c4ae6cf20a97a29165f96b9f5dd09d618892583650d803aa677240695968dfe344294fc33db68fd4669c82021afcc29a1f6afe49915be51fae281eeeedbe DIST Python-3.9.10.tar.xz 19154136 BLAKE2B 4acd2dc26506592c776f9ed9fac22e5a8741ab700ec11aca93566425ab2a957392e6284f0818198e20088463c047502a07d3f5dadc8ed8689c316f823fb2d444 SHA512 09cb942f84bf362df88999ffa6faf89b4ad12302e67cda4a11547828ebe410c7c93a3dc96cd66fd9c5c7d9a1abe5b8e259e7ec47c10273b42d212270aca5ecba DIST Python-3.9.10.tar.xz.asc 833 BLAKE2B ab6a514bc4ac5032f5209344d234491063bc3dc1ef9c3e4b66951deaff042e25bc830a301cff2a1b674ef4025526001f6e73c37b65d9d102da247660a419e2f7 SHA512 d9fed5b39100b81835085d712453516d309b0dddc1524d578cb63c95cd1e2392882702111dd3cb0ebf58c98b94ec04838c89c57f4a7a649c585f7ba5eef70e5e +DIST Python-3.9.11.tar.xz 19724780 BLAKE2B 25b017e36b22235790633eb1a88f52092225252f39963fc365c1ea863f5b5d98a796bceb01e5e34c02d9690f2a664959766b214b8c13350d6e22839218d0c097 SHA512 804e6e6b31922378f07f290023f6efc870c6fd3010204c499c2b375880f6e6ec0f72ce96a8fff81956f6fa3bea2123df2138ef0fda23a3d5d3cf757174a930c3 +DIST Python-3.9.11.tar.xz.asc 833 BLAKE2B c60c291f3dad39c842d16717239006f3ee703eaa586d95ea02ba4486d20a1e82065bbaf7af6f7cf6a04799229359791a72834096b6ce5f5d2b583ba5962d441b SHA512 a84bbfa68ec1c0e45bbd64af4481be7d68885021287731c69346a3cb25c9bf607be84dd72af2d3a6fbeabbde64975f37c4bb4f61274e72b92b4277fa48543e52 DIST Python-3.9.9.tar.xz 19144372 BLAKE2B 3a144ca5e4b11b2fd09d05a4a40ddf3f622c077338602c519b21ea827c96e0f14ab97563c0a9d306ae4a5c3f44753573a07474dc084fb364d24b2128bb378ddd SHA512 0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6 DIST Python-3.9.9.tar.xz.asc 833 BLAKE2B 41d05ee1ec256f0cab4e9d3540877783745f0f30e3f1177d01096b352341a90893c5c9523926bed8176bd304cbb1fd6619be3b4e375103874eac5e5ebc113135 SHA512 84fb739c60216ab9a7a487a0ec4039a7e85c7684ef1f71d8b3bc415ff2ae284f79474103ae05385502bc2510401f8cfb33d84dccf5d0ea9a0dd62528519d935f -DIST python-gentoo-patches-2.7.18_p13.tar.xz 33296 BLAKE2B 91b711458aff4f6337ee1b34aff58d7edda6725644a64c9320076a1e04c816729ed163d82333cfe4dfef379a9ad5ef50ba00abdbbfed4503b0f92c8f0b7ca683 SHA512 97f3657a4a95e8492aa710801b974a56e6dd4636e475aea45cbbe76e7ae32d00f07b05769887f05e49cb0df8584ac9499a7ce842bad77f837a7c869f9b769b07 +DIST python-gentoo-patches-2.7.18_p14.tar.xz 34292 BLAKE2B 654cefb34e3ff61b2a212b83ec1344ebace160aa3971a4a61212b637b83083864e1bdad2b78b166ba0b2302d145f3051b71b3e6b581b064f7f09353acdb4e4b1 SHA512 d6551a045ade16ef523a29451cc07499c29aca92548e46c21bcd6b3a3549f5a0f1f7e420ac326e7ac2e0158fb5490429a9d28994cbfd6c8b5b652788612bac26 +DIST python-gentoo-patches-2.7.18_p15.tar.xz 34956 BLAKE2B d173f276dd9c0ce31004dcc55a0d18e9ce25a47683c2df3c4dd62e967dfbbb35be59a2f08cf20f30a19475a8a2344dd95b17400eafa88b5fdbe9270a12ccbf32 SHA512 d9386808265f978808e5c0ffd384cefe54fb0e05aeccfd394167d5227d9cd66e25c8e93c54914762b2cfc3c2dd851b26a7a84d62634c6aa8a0798aacbb7ac25f DIST python-gentoo-patches-3.10.0_p1.tar.xz 10068 BLAKE2B 1c9817b449831559f0a0b722c02a5f55d94b3dfde98e5882c1403fe24a4addf7074ab39c09b91cff6fd7ace2e4b6e8ed899d9a0b9ffd6612ce315c4c192bd309 SHA512 39aa41dbf17b6dc5255491c75031a3dae6962b44125e426dbfdce365a6533c5dae9856b1fff8016a189124b7cff72d2665ce99da344c2f9dff005ba685e8c2c4 DIST python-gentoo-patches-3.10.1.tar.xz 8580 BLAKE2B 58d165c6c21a6736787d77d5bbeb770adff7f3729a47f62d0b7c4f0982c15c6a50b326be33638f3fca5574936cbce35d26e9ce0868faa3b5a3412b30586b066a SHA512 f86adf4e5195b1eb13cedbf24c1956964ce56745f0524a62b1e7c6baf74c6f1802e05cf4c08519b147579945c0526ff0a0ffc01cfb4372c0ec4f403b25e81012 DIST python-gentoo-patches-3.10.2.tar.xz 8584 BLAKE2B 4328b21d7b8b0e39d0d6761c3a52cb5369aff7dfa890a1496fe5c01720bd9d8ef38d915188ad6079158104f8acf5847e220d58c092a9682615aa366dce9f20d2 SHA512 063c53022525cea988a9a27643bf0b2b5e674259de487826ee3b3cbca50c369857908d53cee9be59adf09db7ac0dcaed65639c40204ff4519b812b215de588a6 -DIST python-gentoo-patches-3.11.0a4.tar.xz 3652 BLAKE2B 19beab7c85e93414f392f2fda89a5ec0fc0a8339bf3804cb88c349cbb57b2c2cd6338d59307a950abe387958cbe7d3b958a73004b5fc51788235660aed3dea6a SHA512 97745cc7dd9c0849f1e5cc577322878f831e7af0b45ef6d23e0cee1b02879386bbf22d84ff73b8a5f70f2b193788f3dff003ddc248bd8ea19779c371fe706bdc +DIST python-gentoo-patches-3.10.2_p1.tar.xz 9860 BLAKE2B 6343b9fa1af2763501fc67674f0ebcec9bffa340edd741c97f54b290e91056141230264221b8746447da553ced7081156d83517330b7bb3ac027d9f72fa0d62a SHA512 7c8666bf47cda7647d330fff6070b9d0410dc21dc7114ff232bdbb5e5f993c02b9fc373919bae73391a2d28a8bbe096efc071f8273f2338758876a5f50b28d30 +DIST python-gentoo-patches-3.10.3.tar.xz 8584 BLAKE2B 4287b33e696a1c350fef2ef34843353a2f4ad20feed2e9d7e05d727ec4f18105f57c21e7ab73941e14cc2ace27e8ac7f5e96ce2893b626c8e75cac52760f0935 SHA512 515025b13063eaee71738b8e1f071cd9930cf516e90c1c652adc6f8bee356598d152cb3337a6633500cda4228a5ddc2819f1db0cdb2524a479a0bca69ca557cb +DIST python-gentoo-patches-3.11.0a6.tar.xz 3676 BLAKE2B 6fa21569fc8249f76d0eb8d4c3347e87aca70a77e2fc4887de7c51ac9866734bb29cc6b82a17f55ada74ccd03f9918ee89ef273b8a7fbbe86c5987eb8b1754fd SHA512 c61d6accef58722efe6c7f4266bda48a74417a68e27ba75b27fe7eb406aeec7a0e0f7c0f5a2bff9879f807a2ef11608aeaff796e62d907441596455c756d14a7 DIST python-gentoo-patches-3.6.15.tar.xz 15300 BLAKE2B f49fd96f6ad1a1c94fea6b83acd229a81754b86061e243044ead4b9a9d5122a2e43b270b68722c359c084c05a566a3ad70aa46588ab7a005ee560ee118b92b8b SHA512 cc33491a33f3f1d990cf494d53b91b74db761142e8aebe1bd4b128ef10a268ff945e5ba08daad39cee095612a8e52265d6988873ecf9c073377cbbc10735aa39 DIST python-gentoo-patches-3.7.12_p1.tar.xz 19112 BLAKE2B e9964244af3db544dd6e96d85ca4bc24d7131b48eda85df5bafa3fb36474a024cecbbf4b27324e1f35f76ae6a1aed31dd7896e831b79b574b45a4371afcc7e5b SHA512 9ec996c2904f99bd6651ed1b700eabd91f2b82b1e9e0f3d9572243886a9c7139bf8ac2af04169485d3ca6339e1a87044cba203f6f0aee9609d2a1d53c812548d +DIST python-gentoo-patches-3.7.12_p2.tar.xz 19604 BLAKE2B bd3b88d7ad5b73219d83fb1cd35190186a0c3e451a2d0764cfbfcffbb7323a1f01376d94e5fa01a48b9fae35bd5c9e3b61052020a8190816fcbb26bde0f4df94 SHA512 3c906ccabfcedf51c115706349389b7d5a3a0325713b27ceca638fb0f13558fad6cd1f9a3e2ad83c0d82586b30399124aefffc959ae66616a7cf8b30dba8b599 +DIST python-gentoo-patches-3.7.13.tar.xz 18344 BLAKE2B 038db3d4e08f7af41811af0073b9c970171a26ffdf8ca116646f285101cc2299372f264e89183f136b3a56c4f756f39518ef6083c3c13baf409034706212fd22 SHA512 7f0d95e0a558aa4171589b887121e09c74679fc99089274e38c35188cd77e7fd6c53231d052455d752fab0c7dcef86a0efc4b8875a9e2a6c295907c271c6e822 DIST python-gentoo-patches-3.8.12_p1.tar.xz 16632 BLAKE2B cce7a41d020af1ffc55a01ef67b20bcb16c68adbccc1e44ef166d1707e817ed6c3bae70f84c56553f27bca449015e273014c0be73bc2f9b4e25844ddce385486 SHA512 4621727c2e9cc1c5519e021210e16a97e7167ea831445dfdd07f5b0ed642b5919834244111708a971ce098b10b439797e1c76827eccab803f801052c671f1ae6 +DIST python-gentoo-patches-3.8.12_p2.tar.xz 17224 BLAKE2B 1287a7fe2e55a5a24872cc9849d2339fbc453ed9a02a276afef9aecb451f97104cbc926d10dc99fdf423dbe49987b7a56c548120e204088b59e5ca710c146a66 SHA512 c2ebea7a74fe2d2d9af5b3902a0cd8542247f2e3a310b1e91be3ed7f5bd1d51a77f013f7c3047aef8c2762b740cb9daeb30fd4680dc3bbe1b61dc095ebb1a6ac +DIST python-gentoo-patches-3.8.13.tar.xz 16004 BLAKE2B 5c0c6c9263570a467391e60c324d1dbc1e50ffda9cad1e204df124441b593146f18e5f1529eb7d385b35c5f4b9e597807971b6b66f7f8eef156ad87c9ad32743 SHA512 4ceb831e2d62bd73909b53a3b553b2cd73d08bcf2a1c92b47eaeb1221d40daabcaed14977265bcb265df00b6bf363dbebbd61a62dca4bf6ef40c6b911e980597 DIST python-gentoo-patches-3.9.10.tar.xz 12844 BLAKE2B f342fbdd1a580787e2d699ded9dc5307f5b610303c6869aa8d0fa4d9e60acd997dc12ae96c6de07cdf9ce0a8bfb6e13291d611d4a6a193844049882b5d01d1e5 SHA512 50111552ff82019672d82e5a328e6e9d8ec2a61a957b63a7a49c5de1f1b77be296272f4273c78154667d5a88d82646360d9a411bb8cf451408837413b06d4b23 +DIST python-gentoo-patches-3.9.10_p1.tar.xz 14080 BLAKE2B 7cc21ffc439b82661e151ce7f85e217ce7cbe674296e7f7fc7f9b9215486d2845e8314130d1d378e24a0c2c9a6340055b1e4345426b136c113b7e833c564e903 SHA512 1be7ccf4dbb29d4b19985000baf98e54d77f493069f44381b5a3629b1e5b275755ef5a4736a7490d0bec037ab4be88ca1856d615bca9c759b0995b066dd2dbed +DIST python-gentoo-patches-3.9.11.tar.xz 12844 BLAKE2B de7ffa39e96127949d2b894fe15c8c1345180842791743af14a3728a7c950e877ab7c74f3e72da5518b16ecb2f3ff13e6132740bb067fe43a8359c673befbaf5 SHA512 0507792188587e66d63a70dde17c6aea1c9aab9e40ace3aeb585adbd2c62acf828782312ba7523f7a4ea49ab1125a30c7b091d10fe02874b018f2733fb8e141d DIST python-gentoo-patches-3.9.9.tar.xz 13200 BLAKE2B 672e3b79094cbc791988639a5dde4c9e5622e91bef4310d26838716c65763ca69a12c6afef2f19487f4389974af009896e452c19783b0a491072d13f893af7e9 SHA512 3cd4ddd070ab48d9978e1136d237fc24030fd3ce6704371ce99815702a45d839ee26c7e9552b004661827759edd30222434e4166f9ee16f873ad4783c83f723f -EBUILD python-2.7.18_p13.ebuild 9899 BLAKE2B 89bd80ccd09e15edb4b8be45b620d17f7d220551e25f373cea50e9aa593cf2e42660a54a65f56f46783964a23076e182afd4fe36d709c22cee0e5745be75142d SHA512 4e8916ec74ed0e2921c50a9d7f27e62922fd0c0f52d87b870c3ae36161ac303c0a146ba3a61d0e2ce5b6c2d2f6d5798f696fc750642594a5cad6b396caa626fd +EBUILD python-2.7.18_p14.ebuild 9899 BLAKE2B 89bd80ccd09e15edb4b8be45b620d17f7d220551e25f373cea50e9aa593cf2e42660a54a65f56f46783964a23076e182afd4fe36d709c22cee0e5745be75142d SHA512 4e8916ec74ed0e2921c50a9d7f27e62922fd0c0f52d87b870c3ae36161ac303c0a146ba3a61d0e2ce5b6c2d2f6d5798f696fc750642594a5cad6b396caa626fd +EBUILD python-2.7.18_p15.ebuild 9907 BLAKE2B 948149c8dbd5490907c00e8c9ff617b1d002e5f7694f4274cf4b6c74c7c584da0bda349d2663adb03987c503c33de546d7cbb1bb34254744b702bb846e4cfb77 SHA512 d82b89d3149cc8a3124f6abbe7049d495dfd2eab0fec44d92302c8adddae06b2b0155f3a2e80c07b1ddf4d736c31b0df4f3aafb33e7557b889e4f9f1924951ed EBUILD python-3.10.0_p1-r1.ebuild 10649 BLAKE2B f6c02daec9145c17967964b3c2c5f12fe3549eebd11b939509bb1ebef5e480c121839005ea018e9d06b524f029834e8feaffb6c1b2e5c78aff023bf0a7fa422e SHA512 ed8f377ff9cfe136817c4e71e22e63e290023d9318a1cc85aac4db8fe273a82863a4fb1dce9c954d03aa3314edbc8f44454a187976bb9ff0759fc0642f94c3de EBUILD python-3.10.1-r3.ebuild 11101 BLAKE2B 79eef63d0ae92af7002a860b4c7c1e95e3f6c3d07b15a37222895e8f2008b7d76b86200e4c69b2faa8d684d8dfa81f76880a1ad5c2932a0fadde8c69ebb3a6ce SHA512 647da8d99768c94c290cd7bb5f11505865cd7273c57804e6c90d8a2a1aa321b498966905655c171ecb8c64b975ccb8fa07e3d0926e83249baaa2c18a75708f92 EBUILD python-3.10.2-r1.ebuild 11354 BLAKE2B b007f5139432b40f652de4cdf292b42fc27a8f080c819e248339037e95350ffdccfd99b1b5c0b37c5b2b7f2cf0e5a65f7fd6dd93ee2b86202726b16e7baa157e SHA512 f4a7ee1791ce593432cb5a4b4c8d437bab6458c2a9bf337081c6a51b3ae47c356e61bfd0b14d4522355941a731f65aaff170aeaef8a8f401b450994e78a32b25 EBUILD python-3.10.2.ebuild 11144 BLAKE2B 849484ac56fc4b32e73b17f7343954a897d9d358b7c63362f105afc4497b086cb0d225a0d44cf0b05b71f4e07d471472c47353eb65aef82a06ce483aebf8d804 SHA512 a93edee8c6efd70a9d7057959311f5c8bec32f4aa169d66edbb42674f8ec6aa88accb682fc30968b7775a957326536a2b909fd24612cd2f507f88c7717f179dc -EBUILD python-3.11.0_alpha4.ebuild 11294 BLAKE2B 2fbf2494cfe24cccdeed5e31991209c63454cf9db4948da68c451a15f6bb3c6a7ab8bfccdd70398fe0ff4c24561dd1260c77914f8f29028c33e07335f541d929 SHA512 6060ccd59b8a368ee07bb16eac54a81a11da9c3f490b802285efc302c141466aed35ba415820f592a96505686a18f3bac3a47aa51c3164b9c98490e59fd07f2e +EBUILD python-3.10.2_p1.ebuild 11477 BLAKE2B 46df80f0b47e9d1c2b84128ed840e40ab8b205a8f01500a806f6e90d32d8d765993ec81228db4067d5406fb5fdadb6e6284cd783ddeaab510d7165b7c72b4ce1 SHA512 5136990577beee1b5dd791eaf7ce124baf0a3437a9bb8addc7b8419bc9dfcbeb3c44c88fa84b55e5e0023aef63e32bd110d41843171b23037718b2fac8a259a6 +EBUILD python-3.10.3.ebuild 11778 BLAKE2B ec8bfbcb1d18872a48bed48699d5eb92e796d143bb1a4f0aa31673d507e8e09978b2d2705d8efe11554705bafe08f32683fb65319d9c3420a727d8f3928d898e SHA512 62f6e6f72ce50274f8bb3a4980d5605d65b94524875be16402097e9494a6a6ea2e579c1112df11a8db3d4ac88b6c778f17acbb01cd5089102b11084cffcb3d91 +EBUILD python-3.11.0_alpha6.ebuild 11710 BLAKE2B 770d65ad0b6e6ea2a1dead8d70d3ef0c72ca0f06c713f29e68f618c2038916630ec2e6f5be6d0e3ccfbbfd97099bda01541effa2c851420d568c1cf85194bb1b SHA512 1a6c17321063bfba0d7b7cda8b665e38bfa6ed7e0287727ac8b4fcd21b0eb9da1918f61d69c1abef71686393700bc9fc29375e4967df8c08fe5e241580e9c9c0 EBUILD python-3.6.15-r1.ebuild 9932 BLAKE2B 595a14f19b3f37f473f4d22b0533a4b565f7eda28e493596947957f979748a8b17417949e8b73e395dc78203930a9fdbf669e5ec840537e277e03066488b6373 SHA512 757dc6f2097654a35541ea0e1f434c43b34e3809651ca3a62745261845f3e4e2b940d75154a8e94b73eda482c5f85c3c3bb6b84fc2c1d35b9822545e7c006b23 EBUILD python-3.6.15.ebuild 9714 BLAKE2B ca1cb4650ccf1e564686da9390ff985b92715a3cb3bd628d9fb53bc5a69985bf9d7dd506cef94fc7d4e36c8c9f8d98b8ceffec27c90b15c85bb886e1caf58078 SHA512 386be71366010a967f6ecc145ef3eb72672a5bace83a619a6e04e57f630816d12a151796a0e06ac397954af1e6ee99b546912b202070a9b032c53937a8e89bc6 EBUILD python-3.7.12_p1-r1.ebuild 9827 BLAKE2B 1f156176b78cb8e6a35d94ff05de3e72c82688c1b7b6d298e34c91827f108e0a857f0bca164b69df946ab4f2b06b2da867f9a4d82f90ddca9999ed6f6239a2cf SHA512 e1cd10a819ac96edab70483a5b818a0f5cf94daed74aaffcc726d049338a228ae1dcc795becd2a6f25560e92d07bf1efc5b64428a625168fe19017effacebff1 EBUILD python-3.7.12_p1.ebuild 9609 BLAKE2B d2598e603fe9c2401f96b1c5aaa37bf77ee8905a8c70b4ae7eade2d1bde9e119840cd87de27b9d80319b0a84a1aaafd3536adda705cdc2b6bc65c53697e91872 SHA512 e4592afe10027dee719a026d51b6d3ab9cf6ec21049313c4c43cccdc935affbf1931bd7fd72747b47d0a392b292142371ef7a4699d6f98657bec9318d052c190 +EBUILD python-3.7.12_p2.ebuild 9955 BLAKE2B a71f0975d87d9e04083cf4296c4fc7107b052ca4ed8dee9d568a5f08a4e7fdbfa041c8e7d31dc3ec9799c9f8ff2790dbdb90e329d53db6277f70c9ba8f906e50 SHA512 6329b4e80149a276f023eb103fa6f48db44b4c6dba143f270f731e5096bc98dfe705f4358ec2d15eb363e2ab8ab61fd8420b288209f4505a1ba19ce75ebf5796 +EBUILD python-3.7.13.ebuild 9970 BLAKE2B 9be84de40254fd5a6b673f9a624c3fa2d182f75941c786f41953acd4234d0e0afca2440880543880a2bff1fdef7236ced1ea5e043d2a3638bb5de468b63b09c4 SHA512 9b4c8ecbb334d97fbcd9d91c2b2d4b2c8519eeab2c46eeae632a810ff689cb6567e14dc49b59fbe4344270483a6bd88b3704a8b079aeb06bb47049962fa5352f EBUILD python-3.8.12_p1-r1.ebuild 9938 BLAKE2B af641dd352b65814ec8b54d3d205f89174ac4d1ca11d8c6138c2d00bb1918ef982bbb82a0e15dedbb9ba43a2f9f3b63d853cc49cd0cb399a469b5ca1a6825ec7 SHA512 5c6b45639b13d5cc5fd97aebad52f1ee5832d646857510dc5909e0f0afd7cd0dc848dbf78a7e12838d072c3b036ef93cfe11bee528d42bda43afddad0b1e03db EBUILD python-3.8.12_p1-r2.ebuild 10156 BLAKE2B f7db2d6df56ff646ea8099a6ff2ae5eaf7f87f825b02fd2b3b842f136c9edfe4db3a93e5fdc871060e34ae9bae15cef0120008f0d7e84e49a81f5b65d7bf0f97 SHA512 06277b76d88cfa9cdd071dc8404270faf75a9f5df5c65cc10925d39cbe968ca4406a47d566f5d9dabfdffae56b44d8010dfa97af49b71e78000dd16bd83c92cd +EBUILD python-3.8.12_p2.ebuild 10283 BLAKE2B bf3b58b58d13813cd048b6dbc4373aafa6548a0ea7ecced2d347b3261ca22c52e9011f7245a75c8fa7b2d12d4ec61c7b77979199490f3775345e51fed738f65d SHA512 47fbae10be2fcac1519638b1acc25c41e5ffc774b9b8f14cd93c4132ef24cabaf1b90c9bde21f0d5b0d8ddd1bd27028d3a1875f804ad8c39899e2de675a4aaf4 +EBUILD python-3.8.13.ebuild 10298 BLAKE2B c0a05ec50fa0a8b553185448fa4350deb13f71ae958daeee71da4057a082f9aa705ad41c5276e76bb1c27e304bf6a2a5df462101269a7ec7c2632465ea147f93 SHA512 dc8204fb02f639559dc2b7e0e2801386a04988d1e4068cf99c9bbc79174b0084aca4538382e459ca66b14151017b8f1d48ce05afed85da17591c321313d159d7 EBUILD python-3.9.10-r1.ebuild 11114 BLAKE2B a38807323109748a38c69356c20e43382578dfc3bc2e2bf254e633d44dcdb068b88980f28804e692c6d360b5ff8a9d8f3e800223971bd7591bb414c17b25cf61 SHA512 3596fd5d935ce8408ddb4e5ca05035380aa32d9ea5ff7292f9e579a77df1790cb5f8415871241d0ff5d4aa7676ebf2583954a224f5236fb068507b16a06ea807 EBUILD python-3.9.10.ebuild 10904 BLAKE2B 6bb39991fb2b61f960fcf762bbdf2cf2948976d30b9837bc9d5cd6b9c4a934bca144f18898b2e7975ceeed659da8158d4e2735ccc56479ec1bfeb4b783300a9b SHA512 012a4cfd6f6ca69008b89ed9fcdf91624bf34102fda4f4ef02c81dc82a5fbafc8e6d4ded7138223c61f1042c168afaf91fdd61a2bca0e9a55cf43c0cd3bb3738 +EBUILD python-3.9.10_p1.ebuild 11237 BLAKE2B 91db981028b86adbbc2f1464ef1e766cc8a7e15e18e9ec6bc0eb69c16ce96ed823ca4ad8e9fc5ab8342771c0e0965bb67b750abcdb2da9be4ecf8a977f8be448 SHA512 eb3c167fb95c6f201581317f593a2af17a744ee27a0e9aa1eeb9738441893929e078f5e254d191d16b8991a32ff3d523a2a267b3a97c4e6cffea3fc9931add1c +EBUILD python-3.9.11.ebuild 11529 BLAKE2B 8b88b92673ffe5bdbabadda61ff6711e4ca8d9624047bdd35c6b5c770298b596a4c6542c3bb2ed598dffaa86991b9342aaece65adb004fcef048a2f1052e7531 SHA512 1aa7e01407674d627ebc2a0a3838fdab818372d5a67265b0ea415b46431430093fab39eb1fdd01223219600aca6cce8c6cf32f5af9bbf41617eed2933fa3d693 EBUILD python-3.9.9-r1.ebuild 10896 BLAKE2B fcbda5d3be808babce2fd7bc00e7fbad40c83afee571bcbccf3c2b51e5b5eea355228ad99f849647e76482a083150d22e00d968e9432fd10952f5b7324e9e917 SHA512 e4dbf2b45a93046369bb276d4033e3aad77257843990a567dee7a03e67e9cdbfc2b15a7ab6e9125623b62cd799eacc7722d7e3ee547bdb3c1a6c676e251ad8ad MISC metadata.xml 740 BLAKE2B 31abd8d03440517adf39f29f36e87f821dbf029602f40d4b252b1ec8e6a52955ad9325fe66a9a3bd2e9c4436e6c6865853f75c3169016c7a44327a06b07694df SHA512 b601a773d5fe4e29d43e9ce5d857bb525b706b95745056a74a2476a37f182075363cb44814f9d6f73b8be08a63d75ec322b608463796c6eef7aa8d636a2350b8 diff --git a/dev-lang/python/python-2.7.18_p13.ebuild b/dev-lang/python/python-2.7.18_p13.ebuild deleted file mode 100644 index da93a624d8f9..000000000000 --- a/dev-lang/python/python-2.7.18_p13.ebuild +++ /dev/null @@ -1,346 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="berkdb bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl tk wininst +xml" - -# 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:= - dev-libs/libffi:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:4.8 - ) ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez )" -BDEPEND=" - virtual/awk - virtual/pkgconfig - verify-sig? ( sec-keys/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" - !build? ( app-misc/mime-types ) - !<=dev-lang/python-exec-2.4.6-r1" - -VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc - -pkg_setup() { - if use berkdb; then - ewarn "'bsddb' module is out-of-date and no longer maintained inside" - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" - ewarn "is provided by dev-python/bsddb3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - # Force some tests that try to poke fs paths. - export ac_cv_file__dev_ptc=no - export ac_cv_file__dev_ptmx=yes - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - local myeconfargs=( - # The check is broken on clang, and gives false positive: - # https://bugs.gentoo.org/596798 - # (upstream dropped this flag in 3.2a4 anyway) - ac_cv_opt_olimit_ok=no - # 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 - - --with-fpectl - --enable-shared - --enable-ipv6 - --with-threads - --enable-unicode=ucs4 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --with-system-expat - --with-system-ffi - --without-ensurepip - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - emake - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="distutils gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - # Daylight saving time problem - # https://bugs.python.org/issue22067 - # https://bugs.gentoo.org/610628 - local -x TZ=UTC - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die - - # Fix collisions between different slots of Python. - mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die - mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die - mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die - rm "${ED}/usr/bin/smtpd.py" || die - - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die - - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python - ln -s "../../../bin/python${PYVER}" \ - "${scriptdir}/python" || die - # python-config - ln -s "../../../bin/python${PYVER}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - 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 - - # python2* is no longer wrapped, so just symlink it - local pymajor=${PYVER%.*} - dosym "python${PYVER}" "/usr/bin/python${pymajor}" - dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config" -} diff --git a/dev-lang/python/python-2.7.18_p14.ebuild b/dev-lang/python/python-2.7.18_p14.ebuild new file mode 100644 index 000000000000..da93a624d8f9 --- /dev/null +++ b/dev-lang/python/python-2.7.18_p14.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic pax-utils \ + python-utils-r1 toolchain-funcs verify-sig + +MY_P="Python-${PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="berkdb bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl tk wininst +xml" + +# 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:= + dev-libs/libffi:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + berkdb? ( || ( + sys-libs/db:5.3 + sys-libs/db:4.8 + ) ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( dev-libs/openssl:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez )" +BDEPEND=" + virtual/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" + !build? ( app-misc/mime-types ) + !<=dev-lang/python-exec-2.4.6-r1" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +pkg_setup() { + if use berkdb; then + ewarn "'bsddb' module is out-of-date and no longer maintained inside" + ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" + ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" + ewarn "is provided by dev-python/bsddb3." + else + if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then + ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" + ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." + ewarn "You might need to migrate your databases." + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + Lib/distutils/command/install.py \ + Lib/distutils/sysconfig.py \ + Lib/site.py \ + Lib/sysconfig.py \ + Lib/test/test_site.py \ + Makefile.pre.in \ + Modules/Setup.dist \ + Modules/getpath.c \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + eautoreconf +} + +src_configure() { + # dbm module can be linked against berkdb or gdbm. + # Defaults to gdbm when both are enabled, #204343. + local disable + use berkdb || use gdbm || disable+=" dbm" + use berkdb || disable+=" _bsddb" + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + if tc-is-cross-compiler; then + # Force some tests that try to poke fs paths. + export ac_cv_file__dev_ptc=no + export ac_cv_file__dev_ptmx=yes + fi + + # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. + tc-export CXX + # The configure script fails to use pkg-config correctly. + # http://bugs.python.org/issue15506 + export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + if use berkdb; then + dbmliborder+="${dbmliborder:+:}bdb" + fi + + local myeconfargs=( + # The check is broken on clang, and gives false positive: + # https://bugs.gentoo.org/596798 + # (upstream dropped this flag in 3.2a4 anyway) + ac_cv_opt_olimit_ok=no + # 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 + + --with-fpectl + --enable-shared + --enable-ipv6 + --with-threads + --enable-unicode=ucs4 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --with-system-expat + --with-system-ffi + --without-ensurepip + ) + + OPT="" econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + + # Avoid invoking pgen for cross-compiles. + touch Include/graminit.h Python/graminit.c + + emake + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="distutils gdb" + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + + # Daylight saving time problem + # https://bugs.python.org/issue22067 + # https://bugs.gentoo.org/610628 + local -x TZ=UTC + + # Rerun failed tests in verbose mode (regrtest -w). + emake test EXTRATESTOPTS="-w" < /dev/tty + local result="$?" + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/$(get_libdir)/python${PYVER} + + emake DESTDIR="${D}" altinstall + + sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die + + # Fix collisions between different slots of Python. + mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die + mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die + mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die + rm "${ED}/usr/bin/smtpd.py" || die + + use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python + ln -s "../../../bin/python${PYVER}" \ + "${scriptdir}/python" || die + # python-config + ln -s "../../../bin/python${PYVER}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc, pyvenv + 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 + + # python2* is no longer wrapped, so just symlink it + local pymajor=${PYVER%.*} + dosym "python${PYVER}" "/usr/bin/python${pymajor}" + dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config" +} diff --git a/dev-lang/python/python-2.7.18_p15.ebuild b/dev-lang/python/python-2.7.18_p15.ebuild new file mode 100644 index 000000000000..96d62e2e78ee --- /dev/null +++ b/dev-lang/python/python-2.7.18_p15.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic pax-utils \ + python-utils-r1 toolchain-funcs verify-sig + +MY_P="Python-${PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="berkdb bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl tk wininst +xml" + +# 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:= + dev-libs/libffi:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + berkdb? ( || ( + sys-libs/db:5.3 + sys-libs/db:4.8 + ) ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( dev-libs/openssl:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez )" +BDEPEND=" + virtual/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" + !build? ( app-misc/mime-types ) + !<=dev-lang/python-exec-2.4.6-r1" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +pkg_setup() { + if use berkdb; then + ewarn "'bsddb' module is out-of-date and no longer maintained inside" + ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" + ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" + ewarn "is provided by dev-python/bsddb3." + else + if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then + ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" + ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." + ewarn "You might need to migrate your databases." + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + Lib/distutils/command/install.py \ + Lib/distutils/sysconfig.py \ + Lib/site.py \ + Lib/sysconfig.py \ + Lib/test/test_site.py \ + Makefile.pre.in \ + Modules/Setup.dist \ + Modules/getpath.c \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + eautoreconf +} + +src_configure() { + # dbm module can be linked against berkdb or gdbm. + # Defaults to gdbm when both are enabled, #204343. + local disable + use berkdb || use gdbm || disable+=" dbm" + use berkdb || disable+=" _bsddb" + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + if tc-is-cross-compiler; then + # Force some tests that try to poke fs paths. + export ac_cv_file__dev_ptc=no + export ac_cv_file__dev_ptmx=yes + fi + + # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. + tc-export CXX + # The configure script fails to use pkg-config correctly. + # http://bugs.python.org/issue15506 + export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + if use berkdb; then + dbmliborder+="${dbmliborder:+:}bdb" + fi + + local myeconfargs=( + # The check is broken on clang, and gives false positive: + # https://bugs.gentoo.org/596798 + # (upstream dropped this flag in 3.2a4 anyway) + ac_cv_opt_olimit_ok=no + # 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 + + --with-fpectl + --enable-shared + --enable-ipv6 + --with-threads + --enable-unicode=ucs4 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --with-system-expat + --with-system-ffi + --without-ensurepip + ) + + OPT="" econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + + # Avoid invoking pgen for cross-compiles. + touch Include/graminit.h Python/graminit.c + + emake + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="distutils gdb" + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + + # Daylight saving time problem + # https://bugs.python.org/issue22067 + # https://bugs.gentoo.org/610628 + local -x TZ=UTC + + # Rerun failed tests in verbose mode (regrtest -w). + emake test EXTRATESTOPTS="-w" < /dev/tty + local result="$?" + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/$(get_libdir)/python${PYVER} + + emake DESTDIR="${D}" altinstall + + sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die + + # Fix collisions between different slots of Python. + mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die + mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die + mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die + rm "${ED}/usr/bin/smtpd.py" || die + + use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python + ln -s "../../../bin/python${PYVER}" \ + "${scriptdir}/python" || die + # python-config + ln -s "../../../bin/python${PYVER}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc, pyvenv + 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 + + # python2* is no longer wrapped, so just symlink it + local pymajor=${PYVER%.*} + dosym "python${PYVER}" "/usr/bin/python${pymajor}" + dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config" +} diff --git a/dev-lang/python/python-3.10.2_p1.ebuild b/dev-lang/python/python-3.10.2_p1.ebuild new file mode 100644 index 000000000000..06421fd372bc --- /dev/null +++ b/dev-lang/python/python-3.10.2_p1.ebuild @@ -0,0 +1,392 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ + 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/" +SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-lang/python-exec[python_targets_python3_10(-)] + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= ) + !!/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.10.3.ebuild b/dev-lang/python/python-3.10.3.ebuild new file mode 100644 index 000000000000..8378f90040c5 --- /dev/null +++ b/dev-lang/python/python-3.10.3.ebuild @@ -0,0 +1,408 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ + 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/" +SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + dev-lang/python-exec[python_targets_python3_10(-)] + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= ) + !!/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.11.0_alpha4.ebuild b/dev-lang/python/python-3.11.0_alpha4.ebuild deleted file mode 100644 index 1ee098aec00d..000000000000 --- a/dev-lang/python/python-3.11.0_alpha4.ebuild +++ /dev/null @@ -1,389 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_alpha/a} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst" -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:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !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 - ) - !!> Makefile || 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 - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict /usr/lib/python3.11/site-packages - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # Expects to find skipped tests and fails - mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite /usr/lib/python3.11/site-packages - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"sqlite3 || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.11.0_alpha6.ebuild b/dev-lang/python/python-3.11.0_alpha6.ebuild new file mode 100644 index 000000000000..ee3604d253a3 --- /dev/null +++ b/dev-lang/python/python-3.11.0_alpha6.ebuild @@ -0,0 +1,403 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ + python-utils-r1 toolchain-funcs verify-sig + +MY_PV=${PV/_alpha/a} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst" +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:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !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 + ) + !!> Makefile || die +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + # Prevent using distutils bundled by setuptools. + # https://bugs.gentoo.org/823728 + export SETUPTOOLS_USE_DISTUTILS=stdlib + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict /usr/lib/python3.11/site-packages + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # Expects to find skipped tests and fails + mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite /usr/lib/python3.11/site-packages + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + use sqlite || rm -r "${libdir}/"sqlite3 || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.7.12_p2.ebuild b/dev-lang/python/python-3.7.12_p2.ebuild new file mode 100644 index 000000000000..515e6791cf8b --- /dev/null +++ b/dev-lang/python/python-3.7.12_p2.ebuild @@ -0,0 +1,341 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic multiprocessing pax-utils \ + python-utils-r1 toolchain-funcs verify-sig + +MY_P="Python-${PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}/${PYVER}m" +KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] )" +BDEPEND=" + virtual/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" !build? ( app-misc/mime-types )" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # force correct number of jobs + # https://bugs.gentoo.org/737660 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + ) + + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + + # 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 + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # 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 + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + ln -s "../../../bin/pyvenv-${PYVER}" \ + "${scriptdir}/pyvenv" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.7.13.ebuild b/dev-lang/python/python-3.7.13.ebuild new file mode 100644 index 000000000000..4e5692c20ff7 --- /dev/null +++ b/dev-lang/python/python-3.7.13.ebuild @@ -0,0 +1,349 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic multiprocessing pax-utils \ + python-utils-r1 toolchain-funcs verify-sig + +MY_P="Python-${PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}/${PYVER}m" +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] ) +" +BDEPEND=" + virtual/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)] +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # force correct number of jobs + # https://bugs.gentoo.org/737660 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + ) + + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + + # 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 + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # 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 + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + ln -s "../../../bin/pyvenv-${PYVER}" \ + "${scriptdir}/pyvenv" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.8.12_p2.ebuild b/dev-lang/python/python-3.8.12_p2.ebuild new file mode 100644 index 000000000000..9e9b0fbc6bfc --- /dev/null +++ b/dev-lang/python/python-3.8.12_p2.ebuild @@ -0,0 +1,351 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic multiprocessing pax-utils \ + 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/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-lang/python-exec[python_targets_python3_8(-)] + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] )" +BDEPEND=" + virtual/awk + virtual/pkgconfig + sys-devel/autoconf-archive + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" !build? ( app-misc/mime-types )" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # force correct number of jobs + # https://bugs.gentoo.org/737660 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # https://bugs.gentoo.org/700012 + if is-flagq -flto || is-flagq '-flto=*'; then + append-cflags $(test-flags-CC -ffat-lto-objects) + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + ) + + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + # 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 + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # 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 + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.8.13.ebuild b/dev-lang/python/python-3.8.13.ebuild new file mode 100644 index 000000000000..60c81f821576 --- /dev/null +++ b/dev-lang/python/python-3.8.13.ebuild @@ -0,0 +1,359 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic multiprocessing pax-utils \ + 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/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + dev-lang/python-exec[python_targets_python3_8(-)] + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] ) +" +BDEPEND=" + sys-devel/autoconf-archive + virtual/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)] +" +RDEPEND+=" + build? ( app-misc/mime-types ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # force correct number of jobs + # https://bugs.gentoo.org/737660 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # https://bugs.gentoo.org/700012 + if is-flagq -flto || is-flagq '-flto=*'; then + append-cflags $(test-flags-CC -ffat-lto-objects) + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + ) + + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + # 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 + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # 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 + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.9.10_p1.ebuild b/dev-lang/python/python-3.9.10_p1.ebuild new file mode 100644 index 000000000000..37b968005f06 --- /dev/null +++ b/dev-lang/python/python-3.9.10_p1.ebuild @@ -0,0 +1,386 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ + 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/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="bluetooth build examples gdbm hardened lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-lang/python-exec[python_targets_python3_9(-)] + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] )" +BDEPEND=" + virtual/awk + virtual/pkgconfig + sys-devel/autoconf-archive + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" !build? ( app-misc/mime-types )" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +pkg_pretend() { + use test && check-reqs_pkg_pretend +} + +pkg_setup() { + use test && check-reqs_pkg_setup +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # force correct number of jobs + # https://bugs.gentoo.org/737660 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # https://bugs.gentoo.org/700012 + if is-flagq -flto || is-flagq '-flto=*'; then + append-cflags $(test-flags-CC -ffat-lto-objects) + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + if use pgo; then + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network" + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc" + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + PROFILE_TASK+=" -x test_distutils" + fi + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + + $(use_with lto) + $(use_enable pgo optimizations) + ) + + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + # Prevent using distutils bundled by setuptools. + # https://bugs.gentoo.org/823728 + export SETUPTOOLS_USE_DISTUTILS=stdlib + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict /usr/lib/python3.9/site-packages + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # 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 + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} diff --git a/dev-lang/python/python-3.9.11.ebuild b/dev-lang/python/python-3.9.11.ebuild new file mode 100644 index 000000000000..418a21b762a8 --- /dev/null +++ b/dev-lang/python/python-3.9.11.ebuild @@ -0,0 +1,394 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ + 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/" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc + )" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="bluetooth build examples gdbm hardened lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-lang/python-exec[python_targets_python3_9(-)] + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( >=dev-libs/openssl-1.1.1:= ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] )" +BDEPEND=" + virtual/awk + virtual/pkgconfig + sys-devel/autoconf-archive + verify-sig? ( sec-keys/openpgp-keys-python ) + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" !build? ( app-misc/mime-types )" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +pkg_pretend() { + use test && check-reqs_pkg_pretend +} + +pkg_setup() { + use test && check-reqs_pkg_setup +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + # force correct number of jobs + # https://bugs.gentoo.org/737660 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die + sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # https://bugs.gentoo.org/700012 + if is-flagq -flto || is-flagq '-flto=*'; then + append-cflags $(test-flags-CC -ffat-lto-objects) + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + if use pgo; then + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network" + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc" + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + PROFILE_TASK+=" -x test_distutils" + fi + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + + $(use_with lto) + $(use_enable pgo optimizations) + ) + + # disable implicit optimization/debugging flags + local -x OPT= + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + local -x CFLAGS_NODIST=${CFLAGS} + local -x LDFLAGS_NODIST=${LDFLAGS} + local -x CFLAGS= LDFLAGS= + + econf "${myeconfargs[@]}" + + if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + # Prevent using distutils bundled by setuptools. + # https://bugs.gentoo.org/823728 + export SETUPTOOLS_USE_DISTUTILS=stdlib + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict /usr/lib/python3.9/site-packages + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="gdb" + + if use sparc ; then + # bug #788022 + skipped_tests+=" multiprocessing_fork" + skipped_tests+=" multiprocessing_forkserver" + fi + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") + + emake test EXTRATESTOPTS="-u-network -j${jobs}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # 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 + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + local -x EPYTHON=python${PYVER} + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${scriptdir}/idle" || die + fi +} -- cgit v1.2.3