diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
commit | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch) | |
tree | e1810a4b135afce04b34862ef0fab2bfaeb8aeca /dev-lang/python | |
parent | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff) |
gentoo resync : 15.01.2020
Diffstat (limited to 'dev-lang/python')
24 files changed, 338 insertions, 3193 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 9dbf96def09e..cca53c6ffd10 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -1,55 +1,31 @@ -AUX 3.6-disable-nis.patch 864 BLAKE2B a960b2f44ff1358677ebb0cf82bcff1ddc7812ed511d0f492fdac07c848f0de8dbd0e8a9200b276709532b5524eed9e779b33d6c4ee34c1f9d23e4eb1f862d99 SHA512 a86a17c90743e8a3712ceaf14ea1a88b96bd5504a4feaadc0168f3211c2afbc130fad8147a40d7ac65268ff1d6293b0c3f98ad36845efebeacfc628149ef13f3 -AUX 3.6.5-disable-nis.patch 297 BLAKE2B 86ca3e6b9aa1bcd9af55ea5f1ad835b60154d23339bf9d02404a5c50b774c556f482138f35d005c9a96b95b6fd9be94ac634164d0b8d173c15fbf841163cabba SHA512 e0a31d256c70159dcbd362ff35b7561c94087851514637bd2b26b6a1b3199309f81eb82305adec7f8d01118dd0856c5228863319ced1e275fbf6f4932034e855 AUX pydoc.conf 169 BLAKE2B ce40bb3d5f858bd7a8d9ef5bf215a8ab592568a724f0e08aea219da014dac12fdfcbcf5fb168bb9aa57be110f74d656aed46179ffe11e3c992d84a647e442b7b SHA512 30d0776a4004cd641e6f283658c3c24915a21ea15fe40e506ff2c3a5f95936aa00c9490b04ab25f29e9b7ac65cd88fd54ca0b08e000e73820b13c7c57c0bf5b2 AUX pydoc.init 600 BLAKE2B fb8775a6663483e5112ec283627610b746020d88494e772b92bb718a9493a52606e565c6c2fa4917a5cb963f166283d09883bd26903f2f3ced6c240d4e292a7f SHA512 9e71ad53486b6882a8441b24225c602195ee33d29dd1b60df27febbc6b752e79929be356152a489f893dcfb11f9c066b999787bc27a8ac61062c86e67a69e87a AUX python-2.7.10-cross-compile-warn-test.patch 775 BLAKE2B 617938353c7e19a9b931544ff1fdcd60cf46e3a68f3ff63bc6ac16432220aad13df4d2b405a968505fb64d31da51a478c46499944ab58e9bbfa5a5b44d392f00 SHA512 652941239541f6139ee3580ec0ea5240baf07ae1afb786f76a69b1d748de1f4dda2740a95c28866e9b0b59023410f8a1e86507642595991c0d90d187519cb758 AUX python-2.7.10-system-libffi.patch 1232 BLAKE2B 3483385cbbf7ef2304cf109d05b5e1d58ec2b9015b614c996c66a9917ab10703865b40c775d7ff89a6fa80e9c8c9600292d8d916e9753027e9e0b23b0548ccff SHA512 3c888638180edc81b98a869478085de63741668ea62bdb919a60708fd64cb394e60f44a3730e2ccf3e41d1d61b72b469242fe2ccd20dc61bc2064b3e759c52bd AUX python-2.7.5-nonfatal-compileall.patch 750 BLAKE2B a7999a6c5a706fbab213cd8a01c6df9b130537556d59bf50b1f5ca223bb9dcd24ccfef48e70e5d3a8afe2b9c6236e1ada87d5899052a2b39f05c4644697953e2 SHA512 d2e93e2a6fcd55d516df0ddaca31af97faed677ea6b4be282eb99e7864f8a7399b5ca11139844a4b3c264832183483b0f4c8c9865c05de0e8520e6d2c8f1dbc6 AUX python-2.7.9-ncurses-pkg-config.patch 305 BLAKE2B 92962397a1e74d9dca8bc232400e84673e0989239e6952c2ba9f25db6f9da343334e0ad325e8932fcec3f9a50e62d4e9b81a8d7a776cdbfc2d0399601591f534 SHA512 2c18b5041a7a2f306dd4d0d6695bd851ca14c9107b2e3e856ec094bc53c7cc407b49e1f4813ee9e753b3ad2d4f6edda943a66bb1e6c895ab956a5f84d30646c6 -AUX python-3.4.3-ncurses-pkg-config.patch 302 BLAKE2B b12910200cfe075362f8ea21320ccfa57a276918ee8601805b0d541556fd62251a81b3875b2bd3fe9634fce9e30d04b0cfb1f740e6fe816464af03e04f4011e1 SHA512 9e2bc2af0077d6282d9512b172d80ee294c47a6d41855474eed641afa8139ce4667a64c4676f5b2e40a90278b780a46e998d1096422ed0fe1d83b973dc455dc2 -AUX python-3.5-distutils-OO-build.patch 3667 BLAKE2B 2010889d44f2dc8c6c16a25a83a3a8f36f08b0ac857a429f7ed536a87bb64c3e2d1f5f70f42c2b56fedd3fdb81eb269801233bd2e821fc9edec547a0d3d8255e SHA512 5e25d46a7d11b16a7183aaecf82f914506fae552aaaa3d69aca6445c131dff39d4cf13588fa109ce16d41e43355539bee8390a2c454f3696df5a06edb6a5ca77 -AUX python-3.5.5-hash-unaligned.patch 1451 BLAKE2B 30a0225118e17bf7f9177d423f50ec557c015f29f20ed48368fdaef482ecb4f572390bc3c551757ff633cdadfd2da73b1b6e9d88e8504c31c31d12d4858b9a1d SHA512 8a0f7acefc4e28c10df6d9d9ff4022cddc05167ce3c49caae32b58d221deee45741dd6c4930e83a653b5f088cf021d408ad88c3bb407440c8f1be2b8079d757a -AUX python-3.5.5-libressl-compatibility.patch 2158 BLAKE2B e171337d466b00720ea960a167abb26a3795ad1c516a770f3c2622753139bf4a166e43e3c479b87eeb62b9e325c3d5de71642e7be4b4d36c3919e0743c226ca6 SHA512 cbb7d9cd8bd8d39ec2a9b39ff494d1d93f4d91190f5f1dcbe293871427b1ad459729dd5ce4cb8efe22e5847b477c24fd5f076bd79c94b3e7d14d159be3313f75 -AUX python-3.6.5-hash-unaligned.patch 1293 BLAKE2B d1e22b4f4c55d308b129801464e3464defa3bfba4c63c12bbcd0650f1391e3e30058f07aa3b5ec3a24df8ab5fba4f467343f44a7693f8afe798dbf245db0366a SHA512 2039104f7aac4f8edbacd5f678551aef62c068182104dbb6dcf9ac835c68d0fefa2cc9df97b8f09bb06e1b29f19c5c324f9c3d5f1161fadd223487d503de8e0d -AUX python-3.6.5-libressl-compatibility.patch 3852 BLAKE2B 8e6860903f51bd1e783e1547d3eed76059eeea317ce0f2f98bd44df55c9be8a62973f687a029a972cac6cce63687763f824ad878d0548ec8ed71bf4c42d4b45b SHA512 4ae0e189f232d52303645391962c8390b00ae62fec45a03ddbad1b34a3eee5ef24c4d17c8a58709e452618ee0b570c2af7c01e456d285f02f5048fbbd2695ddc AUX python-3.7.5-hashlib.patch 805 BLAKE2B e4c9c9446e5054f26b55f272c6d0174c0763edecf10e51da1328553a423ca9c444064b789837e520caf88f18474cfbadcc79c43ac8156595a6c05eb66b087d1e SHA512 a08dc39290a1e254e2d76f70b989d8f8f1e6f5aee3ed12b5ff4325d878d025e05d3ccb6de78aa77f63ebb11846a12d7c07d79c7b8dd7804f1b5a6f3082dc992c -DIST Python-2.7.15.tar.xz 12642436 BLAKE2B d8783a48ea26695e8d4677397a08194c738d7e4bc8ecaddaab609ad1fd5a1ca07701f707fe38d259f6bd44a39171ef95e7530f3df4bcb4d94abc4d21d7e2d489 SHA512 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 -DIST Python-2.7.16.tar.xz 12752104 BLAKE2B 7d6b5b853f9974d44e04dd35ecdffaab87511e183b4b01dd4f8f4ee109c4b4ab208f045708f69717be9d3a706aa078b71438ed482c062c0b89c12730eae074ae SHA512 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0 DIST Python-2.7.17.tar.xz 12855568 BLAKE2B 6d09214a51d6595fe5253a279ee556d7510dcb9a0e8ad71e9cf73b4fb00c3abd3680e2429f4f87d9387d1fc16d4887f5f33fc600b24b0ca2c70f36bf34df2157 SHA512 2dc19a0b0d818c71429dae94783e58b2aac0fa31f5faa1e840cac06245a59932ecc4658d913515736601bcf70a78c9ec60367aed75f4567d1e41ff3bb104da9a -DIST Python-3.5.5.tar.xz 15351440 BLAKE2B 217cb7f51e04d57983ce053ff4276d056e17c8223b6f3d87b69f556453fe2ae3d4dc2c1a6b9c2c6aad033cea9b40cd32264d8208cc81a1ec34ff252379bf95b8 SHA512 c9056baee6a2d1fe7f14b1f310db95b78e8972766d086f8ae10954f38f8182956171580bde01ddadebe897f2545a6fbe47669ca3e4887026ac1fae5ee9197f22 -DIST Python-3.5.7.tar.xz 15324736 BLAKE2B 0f1dd80584385b7f859652c85dc6b51bf71cd9f1d53fcf1716c54e8ffc3d2a36ef9969956e4429ac1ba878dad1e9acbb5f82ddb6a9923886bf3c84b3327dfecb SHA512 83f57451e1d7082bf19e4e49a0902e9257e381836d9a04154a6b276135fa49e5c96b6869eed9ec4475e06b76556c1ae89f5cca111b762eb8b2dee6f65373e0f4 -DIST Python-3.5.9.tar.xz 15388876 BLAKE2B 6086ed2350b6dce3203360f24c2fddf77df65a5815d6da019809796b30c2f43440a9e349c7defd0187cfc3a50a387352dfa63594c2ec513dd6bf585e7c34ec51 SHA512 58127793adef42ed57ae4d56338268866e14c2d084f09f57f26fc6b1c9454e70cc6d3dffc638f8d56f182acc0884021a4dbb578f312dd6fc01995fa85e31377e -DIST Python-3.6.5.tar.xz 17049912 BLAKE2B f393e9563a18a46c457afcd2e174d9eacda20fe2b0ae5461e11c582fa4d27b85c01bbe7b602f45511b6b44f635c6330205b12fb3e8325ffd07e87b78a8258889 SHA512 6b26fcd296b9bd8e67861eff10d14db7507711ddba947288d16d6def53135c39326b7f969c04bb2b2993f924d9e7ad3f5c5282a3915760bc0885cf0a8ea5eb51 -DIST Python-3.6.8.tar.xz 17212420 BLAKE2B e104b49a35492b622080ab81a446c0cdd1223e8ddf95c4e1b262762a027664b59f3e4deeda4ba7177115d780e48b6764a053acef640a645327df428d2e4820cd SHA512 b17867e451ebe662f50df83ed112d3656c089e7d750651ea640052b01b713b58e66aac9e082f71fd16f5b5510bc9b797f5ccd30f5399581e9aa406197f02938a +DIST Python-3.6.10.tar.xz 17212220 BLAKE2B 822e231cf2755e6477e49e9128a983185a4f1e30e9d6c221f1b5720891c0de345e8c5402af458d3627eba124e75fea4b5daa94e01b0eaddc116dc3281263ecbe SHA512 26147099e1f1a0ffc85febad26e18e991f019599a150887ea0b925e34663fad8e03b3c2a941e2770c1a63960695e173ef32709572c9361e7f2cb862ccf75b28a DIST Python-3.6.9.tar.xz 17212164 BLAKE2B ef33dbc1ea3bbeaf92092de867279d759e3a204ca4e8bf0e5c6a1adbb17a9220d8829245fa9f067ec6497a5789a4f60b8db8c727bb2bd8126df470921d552a53 SHA512 05de9c6f44d96a52bfce10ede4312de892573edaf8bece65926d19973a3a800d65eed7a857af945f69efcfb25efa3788e7a54016b03d80b611eb51c3ea074819 -DIST Python-3.7.2.tar.xz 17042320 BLAKE2B 79b06b7d38590b7ad00850a4323156bfee07c4cf8531cbc09d262c6eb38721e32b8b0591fc21017e56948dd81763e9061f118f204eda5b9cc0b84e7132b42979 SHA512 6cd2d6d8455558783b99d55985cd7b22d67b98f41a09b4fdd96f680a630a4e035220d2b903f8c59ed513aa5ffe6730fa947ddb55bb72ce36f0e945ef8af5d971 -DIST Python-3.7.3.tar.xz 17108364 BLAKE2B ac86ea442519a02f0afcb0d0ec70cb288ae28df63fc9f575ee4d8e03e6e31aff9ad2ff18ff5787d922727bd1c6f1a488f94541cd9787ac932d041c93847dea34 SHA512 6d9b7c0f1764e0f655a39430a3af6f7b5e3c9b7166c042e780677a54b17ad4ca6d0d9cba262c82b1b70bba8f7c28883dad4cc0d7cc194fc7d2c1b5f4f08a763a -DIST Python-3.7.4.tar.xz 17131432 BLAKE2B e175f750f1fa610a19a40f382ae5e652de12c775cba41bf575868c0621a8e5c4060a15a5567c207b251de5304f8321191f5bc56388c253d42cf17c5654a88ebb SHA512 71f64668c259f3ed07bd4aa239dbba6cc1b6b0a84d50bbff160664845d7986f757e4d65fca327e62a2d12ba593742ca83a22f7cb6093aff8715ec916c2ba9416 DIST Python-3.7.5.tar.xz 17236432 BLAKE2B fb49a3bfd9b1944d567a45682f789ef840e63ed610e0dddb5695da7a84a0bcb50a6fa52097722f09b57d6fc15a5f89aeaa46a061125219e597897086f3dffe40 SHA512 f4f3879881f260f58dbb041fb0f2f210d4b70b02a739e41e50e6fea67d31855a7a29ce4ebef66bfde3d0edf54b946a48f78490f986da965357b835d4dbb3f414 -DIST Python-3.8.0.tar.xz 17829824 BLAKE2B fcef24b7f0db3b47f899810c77af1e2a84f8b4bf4098a2b417e22dcfb7a5444160e26e5995f73d1068cc7fdbe226d09a88bb5065ac765a4484f66cd327911eef SHA512 5f9bfcb3acdf592770a9d5abd2c32c68c55a49b92f958ded069e3ef31cf2d415e67112b4f6738fab237dc29e5c622298719946d2e9471e7e78e3a6bdf2fac1d1 -DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca -DIST python-gentoo-patches-2.7.16.tar.xz 13904 BLAKE2B 218b46f8656f4a792dcd47eabca6d59a1558276b77676544991ee75914cd76dda84c36f43e72e477b850dd4cb52374d289f20dccd244a3b52ae5debaf3363432 SHA512 83f90545231c663a34c6925352a357a2b15997ac0362578a1893304c5070b5251922585ae8bc1bafb68d306bcddd4cdba4b6406648d473bd3e980eef65fe3ecd +DIST Python-3.7.6.tar.xz 17246360 BLAKE2B b83a440a1ad5b1a2210e03be0522d39f53778774ea725fa41aaaab28cccfcdf007996f1a1d3cb95f8040b71b692189e28db67ba6ec136af82158363a1aadbba6 SHA512 5be022c384728b0c6709d165486f66226d126c521b466ed24d0c4c3c5910ec786a734f4c2c916ac409213c54a492b9fb230fb721c41e3de281676a7e9d8f3171 +DIST Python-3.8.1.tar.xz 17828408 BLAKE2B db1841625de89b812cadcd538a990401a4e49d43968dce733c289121e9de9749eaf39e1c772a32e10ed2b40bef215b19ae9c7d88e0ec9e99cd3d467406ea063c SHA512 d41381848cc1ec8009643b71875f395a9ac2c8e12a5b1efef33caf8a9e99a337c790d4354695c85352d11b62092ae372b5af62f78724363fcbf3504ff9a6ddca +DIST Python-3.9.0a2.tar.xz 17988748 BLAKE2B 3d6a6facacb49d8eeaf01c3194bad8e6c920bd03a8f50ac171016fd61288120dfa06af50583c647e5850b5965fc41e03515042ef1594ec4dcbf39794e999b61a SHA512 3f17869f3ca4db423f66e145e67c9fb4935d8c908c5362de585898343190edb901861701e27ab9187a287880ee42bbb4897aa298967c1862f44b12dbab19d412 +DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f DIST python-gentoo-patches-2.7.17.tar.xz 13476 BLAKE2B 788688e2941d2d6d4f768168881b2c3639213a97e214557b3a93f8db44d81e2b6d70be847b7462e54e3786660ebee4ee331402081d92167d74ad149279c3f389 SHA512 1641737635d33607a77ed2ee2462854cec603be39737de3f81abb188702aaf46f039d1616f9dcd413da1f4a8040175c66a2883e496132c2e4ebe8f860b36f9f1 -DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec -DIST python-gentoo-patches-3.6.4.tar.xz 12888 BLAKE2B 7cf49ae22df53e855f2e99df51686b5d4bd0da82ef4c22836e24726ea9ed561808352c0305a5659b052d38b843f1ff61b6466a7bc3673b7e5cfb4d81d22fa4bc SHA512 90a1b685f2539872ffd67f96581f70145b7afaf18af19f4a7f4a61214103d2a10bf0069c1769dac229ae011fceaf8538f041082b33c1671905246d018d184dd7 +DIST python-gentoo-patches-3.6.10.tar.xz 10964 BLAKE2B e32c8cb3050c7324ee234f585be7fc40cfacc6ad87759eaa300e57289e6dc6cbaed3913f33ad632b8754638e8d71983d8364ceeaad8ef325cfa6d4d2dfb56df0 SHA512 71fea7306c876c63888c4547eaf14dc2e0413dec343609d748cd1b5888e4605d47888758ebc5120a287ce833b69dd538073f91989460da7c40462b53eefca7ce DIST python-gentoo-patches-3.6.8.tar.xz 11224 BLAKE2B 5fe38282bcf28df18e0bd37756c880ae191ea738dc92f1cf83f682cfdc52525b9c44287dc99191a73d75c90672ab501b56adf49515b35ff1fdee88c8dc07b175 SHA512 89e700663db25d6d78eee1d4bfdab686c5341a794062f3a63df3485ac0b58deb4b4885d24701f3ae138d06ca783be92e310e1100c6d633910c33732f3cb0d7df -DIST python-gentoo-patches-3.7.2.tar.xz 9776 BLAKE2B fe451c3fb44a1ace4489d1bc68db9848b4227422fe9135659594248d057a8916e2abfe8e2677ef6efc9c962dbefe3ca7cd05cbd62b325d53eef6b05928f82017 SHA512 55e932624333b78b55e8981aaa7e7bfbddb635a61f594353a77a6bd5c2b57de31a4ee9ae04e072c4e2eb0fddd1c2702b4bd6133cf0a2c94ab35808df86550156 -DIST python-gentoo-patches-3.7.3-0.tar.xz 9800 BLAKE2B b3e1df06cc2c404f08d2da7ea7d44c3612c5b4f908c58d469084b4e78ee4c3024e57879b3f83027d980c9f5e065804e3e144ba734b1da357d3d073c22c14b02e SHA512 deeaf5fbd1d557d4c40c770c1bd772b835bf5ced1842b964fd8ad1aa652b706782301e8a860d6fd1909d90246a8f48a9aaf384d047fca594f96d6771c2901338 DIST python-gentoo-patches-3.7.4-1.tar.xz 10100 BLAKE2B 63e8fada89b64b59ba083745626a1e8a07bec0cf93b7b6ab405c33a0f2932cbe497a331c52895a07f10434b230c438f27c9582efecdd57f3bad15d9aa604d157 SHA512 11b0e811a9890a1235c85426061b35f9964eba64cac0536f4c9e0498b1cc66eb005f14aed34eead735b43e91c2b5babced60e3310f5329231a1706871b95b547 -DIST python-gentoo-patches-3.8.0.tar.xz 9788 BLAKE2B 9ca14fa49fbbd11412451dc6ce32f643cdffdc988c6b2b312593e2b87b85d09e95ada397aaafa548cdb5cf58be09d970d020ef6f20a3575108581fb4647b7bfa SHA512 946be0babc8c67586309b48bffb5ac0a2a354b3798fa7e23c641cc836ff310ab744d75308d1324e9ed54720bf9f4d0aba1f89fb454a98bf9b9fa9484210b6ca5 -EBUILD python-2.7.15.ebuild 10789 BLAKE2B c974e0ad029ddb6d5e7b156db15fc391998331aeb679837793572ceb6aa36e43003d65814cfdb7b9be021c8ffa48074cf2043199702cda316a58035b9165b2f2 SHA512 45eba035156e05ac023aa6a2671a61137aa21aa074bedc787ee666090532baeeb7f0d19a515530b7826a61008b154e915e517bdb38dfbc3a2286544cfc0fe64e -EBUILD python-2.7.16.ebuild 10814 BLAKE2B 140a20b0329cf140e11583d29aba756227e718c71d9b93d1e99f630eda8f5d31e212c47ca73ecd046ac2e5e0d6856cfedc45f3e90a333d347980921a6827c95e SHA512 6ce82e2d7e94b15bd71b5cd99e2dc90995ffe3d0439053877c3765c50b9ca913a57dea0a4f84ce7ab3a6b61b8f97c4667a8496ecc920065826b8a670fac96dd7 -EBUILD python-2.7.17.ebuild 10795 BLAKE2B 99194de8403fd2bbfc125e221c3f43cdde96e6911b0a1dbce290e0cfd70d8ad32003a59b478a8d31912fc47650978b417a8999d94fc49c9224e16672acd7bff8 SHA512 1979861eba03063410a058ffe3e30e731f53678c05db74aac6abc154271347a187113f49653c1fc188a184fcc55ca9d7f77955f2c618a6f93475e78c93c7870d -EBUILD python-3.5.5.ebuild 10813 BLAKE2B e6f0cd525583c32bb1c0ab4559253b312d19a69406e6d772ac4d74c663394a7cd236a3d6b0cc1c5b0d95dda43e0c4ea1f1d16899b9e401afcd1c6a517529f7f0 SHA512 dd6ae17e7b5c9925615253b973b4e917f0bd7658849fd3f7e1d4420273cf4ce79e97543cebac4e89856a4dff3b768ba2c667acf62c2788e474b3f043d1a25983 -EBUILD python-3.5.7.ebuild 10965 BLAKE2B 6d0586387efe4d0b47e9eef7663df194266c3ef7d4f649f8fa62742218059af08d948676abce9b83e01e6bb1bfffb0891d29d9f6d7128516579ff99ed3a06b77 SHA512 a443b14ac2570cc654d48b90c65a9bba0eb4b673d4f107b4bfb4b8c47e8185d768c3603e0ebcd24f26e223f864fdefd8ff94140fb251272a1412202560468e93 -EBUILD python-3.5.9.ebuild 10956 BLAKE2B 1f08ae9634d32d5c7b8e9ca0c8e1940a519cf8a8699df14461f0a1beff9eaa16b0a6fe4cf417245b9b84043e12606cc3c681a131f7a5a6f9df0c172d32fcf5fb SHA512 d6ccd5a7348de781c5f560d5452152d259533c261ee2b4242652d8fd384d0d082cb41e8079f184b3439e8c1edfbcc32b7540105bc34835255175f680d81b2e10 -EBUILD python-3.6.5.ebuild 10154 BLAKE2B 05284ffcbf682b8c9ffe2dd1e04a6e47de76af4899abca004861123526642c68deb7e125afee9202b54f42c89f4274d710216d58878274eba7dd0a5a72eb8fbc SHA512 28968bf203bbbb440fac2acf011d5d4d40b3fcc6c1a29c7f620ee0c1f739302dec497468dc788a7655927085fe15fb6ad152f65b057392e3dc46fbe4b711953e -EBUILD python-3.6.8.ebuild 10201 BLAKE2B 0bc6249f03da4171528f38505b77a430cc50337e70a0adfb6e897f8f7a08319ac193696f8cf5ad474a8ac1a2f96a75324fd21621a5732e5e9933f618f7fb36f2 SHA512 06b6072ddcf0f52cfe95f78baaa056825003ff763a5e4d243aa9d6ac908453567126f1c7639e5f5154396568d01f9eb77ee3c4bae69b398229d599d164afaee1 -EBUILD python-3.6.9.ebuild 10188 BLAKE2B 209285cdb6fd5b10ac4970fdc328ba697b9d8468e3509d0599ab336c65ab4a5a8874687ed5bfbc0a3ab8001a98b9453c13ac2b89070a73318d4e79faf45861e0 SHA512 df21513ec078a1b3553db1c52f12d0330436315e67e88ad6538d3714a862c04282f595b5f43d2e0f76bbd48cc2229178fde455d6fb3163ff069f81209d860959 -EBUILD python-3.7.2.ebuild 9627 BLAKE2B 92c3fbd51a8bc9beb21de196c98810f5c586b26599bbf2cdfa11dd85c10d700aee82be8338d92f0abab965c8da0eb1d5b6cd5e097caadfbdcce66d85d67ef51e SHA512 697df3fbdb994c304f1608c4ebc45c93887c13ca03e7394fa4ee4f26f21aa6ca0d5bf204da58fa28b267f75cba2fca3056e6fbe54b89348690af5c831f1108f2 -EBUILD python-3.7.3.ebuild 9772 BLAKE2B 52c197f9c85429667de4bc031c393d43785bd21562357890c67cb91296c24867f33045eb81abaa4edae9ccdfa32e12e9c73da8a5d2e66a90c00b699ab70b63f7 SHA512 5afc0a43935363d02374c840248498825c0c9aa237927373fcab89435fefddaa861217ccbf919b04944e2312b4b51b020a2e8f800d74672ab8c966f8f02c19cd -EBUILD python-3.7.4-r1.ebuild 9775 BLAKE2B b8ce91301521719529199c1a53779ea909fa8de096d86339dc1adfb37efe0db9374e99952ada8d6c013aca7e1c6804b219a28b4ad5b9f6472889ffcd39dc198c SHA512 7b8011e11bfb315fbcd0e42f321d8e793d6f5f0ceadccecba133861fb53e0c94e09ecc1a7363a55b72a8e376f33d39eab72b878f1f2cde0e055c54724251bdbb -EBUILD python-3.7.5-r1.ebuild 9810 BLAKE2B ac96956285b0c6fdb066245b412a022c3826e33c79f6f941e27454b7692d4cceedafdd049a0c64bf7a599158c389d2355f3d2ddd319a5ab526a491d471b63653 SHA512 9e9c1a8b9b661d2329850e449824845a09cced8d28694c65b6fed9bb6f1f1cc91335fe29310191dcc8147893634370161bdba3671a42e859d27a8574b91d0084 -EBUILD python-3.7.5.ebuild 9775 BLAKE2B b8ce91301521719529199c1a53779ea909fa8de096d86339dc1adfb37efe0db9374e99952ada8d6c013aca7e1c6804b219a28b4ad5b9f6472889ffcd39dc198c SHA512 7b8011e11bfb315fbcd0e42f321d8e793d6f5f0ceadccecba133861fb53e0c94e09ecc1a7363a55b72a8e376f33d39eab72b878f1f2cde0e055c54724251bdbb -EBUILD python-3.8.0.ebuild 9745 BLAKE2B 3747c6e0fc1f9e0ad7cdf26e2992aa3d9bfdd4ab331e2df16ed3ce019e80aae49bf6723ae5a871d69e58418bcf7056059d0e74634e777a3487b14a0a96948ea9 SHA512 2bbe33d310e956b784ac5e869ebfeeae02c3a78e4ab48417644b7d339ac41bc6ff8b2e91bca8f078f62a259ad3f7370fd1b3e0cacfbadb9adca4e2ec0cca9c63 +DIST python-gentoo-patches-3.7.6.tar.xz 10084 BLAKE2B 220869e85bdaf9c21b1b05e13803bdb6ecc22ac0f69da77e57fd7c1cd93ef45ec43401b62732842e1bb3467feb6d65c8204120e2741e9eb6f4cab673fd3a8d62 SHA512 4c04b0cf7da55fa7973ab178e3ac2c59bc2142924bdced5954c058053280b6c663d7c39912286d10fe0e82ca30af6a0dd6a56fa85433f836217ca3dcbb284def +DIST python-gentoo-patches-3.8.1-r2.tar.xz 10108 BLAKE2B 02d3e2ae95b5cfa67c0ba4ff618fbee51d2342955d0a064b80575beda73902bd72462e4f6dba63743bf9fc031d92c69153ef8bd8a0ab5d6e17bfdf8ed0152da5 SHA512 757f7cf6b0cb6c1493d8ed8e5780780efcb32860a9aeba4f933a3a3fb22c412bebde8854e34609465d8a12cb9545a7b19e5d5dbe87d772bb83acd9fe829b75cc +DIST python-gentoo-patches-3.9.0_alpha2.tar.xz 8340 BLAKE2B b93edca01fa46c8eb4e18e0d92c72a3e4ef8dcebf26c0e1c0fab4c82201645ed4c358cf2311c9eb454f6a261ab514985302f81fc86284d3714d662037928963c SHA512 58b0a64d8747f187e6cc4749dc660a443c066e43f509ecc2976b6406bbfb3851a03f686adc36bd58c7c3142a707a387ac25431ca078980914d2219c49a0f2202 +EBUILD python-2.7.17-r1.ebuild 10497 BLAKE2B c4007d0d091dc763664cac39d4f47dad659ac934a5e3fe2ecc76eecaf8fb4aaf65b81fd7d4a874c02586419ec1d9552f7a075ffd1c818554bb5a770782b5e073 SHA512 3c94f6051ded48a0c5062de49e50370b7d0bc9584f558d72bf7b7c993f127d970c8fa797f224a6cd3158fedd20b8481e1e0ce1ebbb59b8551d79d702b75a1687 +EBUILD python-2.7.17.ebuild 10792 BLAKE2B 41f0fa0442a8aecfe6086b1c6185337febe99be3e9e0fc9025b8947c535c7776263ba58b11a7cd35b0d4f6e68773cdc7808e734e2a53a75620a96f850a1e9f64 SHA512 259bbdb559b14724d3abe52f7521b83b5b4df594bd599e2787813389cdd7d6fe4891431e6db971137c8a86019b81e5d77f433c78770ec1c494a6c0eb04e77ea3 +EBUILD python-3.6.10.ebuild 10252 BLAKE2B 04910bc0dbf490aec1d21c7038264d2c2691cf9cffc5cb5534c14d6c5e4c04580acc19af99d19b25c81f184052a6945618110afa50123d8e81518d3f485d34ae SHA512 0cfc0d7d36d431cd8c127e59cf04679268b579d45607ab41e6383c8074e4c4741ca626ae453d6774f13dcec137128072182c8c1132be791ff65f368a7bee51e7 +EBUILD python-3.6.9.ebuild 10160 BLAKE2B cb3770d69842def2466cc7dad50ddebc5198c00d746f359e8ba5465706d447c2130d8796e3b6e05a1dec131c7ffa4fb719fa653bbf89534ceabe4ca874d9f9a9 SHA512 ec60eb403c2cdaf4c69a479a5247400011d99089693786d5edabef63ffcb9a97b00522a79b0cbb0e5df86cbfb463e2e8b717f1df101b98d8719e270d9f69348d +EBUILD python-3.7.5-r1.ebuild 9780 BLAKE2B 2ebbfe286fbafcfdf1b7352082aa0cc89d5b96c7e1a98c57def272c9a528d4809f4e0e97b614c2ff22e36244ec00f9e0e44eb05e0098ccc52ddd76150fa026e0 SHA512 99e92532766f089cde65daabffbd1efb1b1cd4c4cd37c3249c0b0dd3e439b825c321e2871cca3d4c9f8d63286fa5b0d00594b2bfbd626af35335aee428daa99a +EBUILD python-3.7.6.ebuild 9799 BLAKE2B bfa59f2a845fcf21fdb0c5e14267a681630525ceb15ba0f327043f428849f986e1dbd97a94d37180b643d38da9210d37b0bbe6788ed2571869da2dd8852e5ebf SHA512 e1fe9798ed68542bf5a704560ed871446b4b8b06ef0d92542fe7a18f85f081047a072650de554139fbbe5ce4fcb4ffa93458aade81f99a1e9d685adf1c29dd9a +EBUILD python-3.8.1.ebuild 9839 BLAKE2B 2b411d16fa95019629fd91851c19375c2c8a729e24a77020c2c26f4f6d5e09bf88f8f1577c7e82f29d363e17214979fa393b1af94f6c8a6f98674b56b904237e SHA512 3121a9fad103e086e76d8885ac0094a0667a2f586b5715214b6b2c02b1f8bc247378d1397c7e8b7daf14b7004a7ebbbb7cc43405e523c99c34e1f6bbf413e27a +EBUILD python-3.9.0_alpha2.ebuild 9333 BLAKE2B 95107bf9aefccf8156a7ada79d1dadc2834d4a162b5fbbff8d01e479172816a719556f52f3c1dbaeb579d075447c80013a5a63915b1ca9ce264117ef2978f28b SHA512 aa9b91ca9285c47cb65bc55c3067c2a77ed176cd74a0e41b23348ca7ffc9dc8367b6e8a8fd8e816369a215a16186c6f3d135ef8279a70fbc4beae6a94bfc9893 MISC metadata.xml 819 BLAKE2B 120c7c65d77488e726c5a0f4aa19469867ea6900e747169fae2f9cf8f14ec2936089d5edfe1935ce610bec26387273e261b1cc4b023680c8c4b229f2141a7223 SHA512 08f45707e5490067a21951b9d37c8ae67064ab67cccc5b8d8c204eab8d4a004fb910627b62989c67b849b89d301618f8f8f7996e99e1ef5bab38a239c49c124d diff --git a/dev-lang/python/files/3.6-disable-nis.patch b/dev-lang/python/files/3.6-disable-nis.patch deleted file mode 100644 index 4e81847b5070..000000000000 --- a/dev-lang/python/files/3.6-disable-nis.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -1332,17 +1332,7 @@ class PyBuildExt(build_ext): - # Jeremy Hylton's rlimit interface - exts.append( Extension('resource', ['resource.c']) ) - -- # Sun yellow pages. Some systems have the functions in libc. -- if (host_platform not in ['cygwin', 'qnx6'] and -- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None): -- if (self.compiler.find_library_file(lib_dirs, 'nsl')): -- libs = ['nsl'] -- else: -- libs = [] -- exts.append( Extension('nis', ['nismodule.c'], -- libraries = libs) ) -- else: -- missing.append('nis') -+ missing.append('nis') - else: - missing.extend(['nis', 'resource', 'termios']) - diff --git a/dev-lang/python/files/3.6.5-disable-nis.patch b/dev-lang/python/files/3.6.5-disable-nis.patch deleted file mode 100644 index 3937c6fe795d..000000000000 --- a/dev-lang/python/files/3.6.5-disable-nis.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -1364,7 +1364,7 @@ class PyBuildExt(build_ext): - else: - missing.extend(['resource', 'termios']) - -- nis = self._detect_nis(inc_dirs, lib_dirs) -+ nis = None - if nis is not None: - exts.append(nis) - else: diff --git a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch deleted file mode 100644 index 8bfad1142789..000000000000 --- a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch +++ /dev/null @@ -1,13 +0,0 @@ -do not hardcode /usr/include paths - ---- a/configure.ac -+++ b/configure.ac -@@ -4402,7 +4402,7 @@ fi - - # first curses header check - ac_save_cppflags="$CPPFLAGS" --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`" - - AC_CHECK_HEADERS(curses.h ncurses.h) - diff --git a/dev-lang/python/files/python-3.5-distutils-OO-build.patch b/dev-lang/python/files/python-3.5-distutils-OO-build.patch deleted file mode 100644 index 8af8c30c76fe..000000000000 --- a/dev-lang/python/files/python-3.5-distutils-OO-build.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 5 Jun 2016 08:18:01 +0200 -Subject: [PATCH] distutils: make -OO enable both opt-1 and opt-2 optimization - -Bug: http://bugs.python.org/issue27226 -Bug: https://bugs.gentoo.org/585060 ---- - Lib/distutils/command/build_py.py | 8 ++++---- - Lib/distutils/command/install_lib.py | 12 ++++++------ - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py -index cf0ca57..838d4e4 100644 ---- a/Lib/distutils/command/build_py.py -+++ b/Lib/distutils/command/build_py.py -@@ -315,9 +315,9 @@ class build_py (Command): - if self.compile: - outputs.append(importlib.util.cache_from_source( - filename, optimization='')) -- if self.optimize > 0: -+ for opt in range(1, self.optimize + 1): - outputs.append(importlib.util.cache_from_source( -- filename, optimization=self.optimize)) -+ filename, optimization=opt)) - - outputs += [ - os.path.join(build_dir, filename) -@@ -387,8 +387,8 @@ class build_py (Command): - if self.compile: - byte_compile(files, optimize=0, - force=self.force, prefix=prefix, dry_run=self.dry_run) -- if self.optimize > 0: -- byte_compile(files, optimize=self.optimize, -+ for opt in range(1, self.optimize + 1): -+ byte_compile(files, optimize=opt, - force=self.force, prefix=prefix, dry_run=self.dry_run) - - class build_py_2to3(build_py, Mixin2to3): -diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py -index 6154cf0..049b662 100644 ---- a/Lib/distutils/command/install_lib.py -+++ b/Lib/distutils/command/install_lib.py -@@ -24,8 +24,8 @@ class install_lib(Command): - # 2) compile .pyc only (--compile --no-optimize; default) - # 3) compile .pyc and "opt-1" .pyc (--compile --optimize) - # 4) compile "opt-1" .pyc only (--no-compile --optimize) -- # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more) -- # 6) compile "opt-2" .pyc only (--no-compile --optimize-more) -+ # 5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more) -+ # 6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more) - # - # The UI for this is two options, 'compile' and 'optimize'. - # 'compile' is strictly boolean, and only decides whether to -@@ -132,8 +132,8 @@ class install_lib(Command): - byte_compile(files, optimize=0, - force=self.force, prefix=install_root, - dry_run=self.dry_run) -- if self.optimize > 0: -- byte_compile(files, optimize=self.optimize, -+ for opt in range(1, self.optimize + 1): -+ byte_compile(files, optimize=opt, - force=self.force, prefix=install_root, - verbose=self.verbose, dry_run=self.dry_run) - -@@ -167,9 +167,9 @@ class install_lib(Command): - if self.compile: - bytecode_files.append(importlib.util.cache_from_source( - py_file, optimization='')) -- if self.optimize > 0: -+ for opt in range(1, self.optimize + 1): - bytecode_files.append(importlib.util.cache_from_source( -- py_file, optimization=self.optimize)) -+ py_file, optimization=opt)) - - return bytecode_files - --- -2.8.3 - diff --git a/dev-lang/python/files/python-3.5.5-hash-unaligned.patch b/dev-lang/python/files/python-3.5.5-hash-unaligned.patch deleted file mode 100644 index c418f40b7da4..000000000000 --- a/dev-lang/python/files/python-3.5.5-hash-unaligned.patch +++ /dev/null @@ -1,43 +0,0 @@ -The hash implementation casts the input pointer to uint64_t* and directly reads -from this, which may cause unaligned accesses. Use memcpy() instead so this code -will not crash with SIGBUS on sparc. - ---- a/Python/pyhash.c 2017-11-29 10:21:20.283094068 +0100 -+++ b/Python/pyhash.c 2017-11-29 10:24:26.733087813 +0100 -@@ -372,7 +372,7 @@ siphash24(const void *src, Py_ssize_t sr - PY_UINT64_T k0 = _le64toh(_Py_HashSecret.siphash.k0); - PY_UINT64_T k1 = _le64toh(_Py_HashSecret.siphash.k1); - PY_UINT64_T b = (PY_UINT64_T)src_sz << 56; -- const PY_UINT64_T *in = (PY_UINT64_T*)src; -+ const PY_UINT8_T *in = (PY_UINT8_T*)src; - - PY_UINT64_T v0 = k0 ^ 0x736f6d6570736575ULL; - PY_UINT64_T v1 = k1 ^ 0x646f72616e646f6dULL; -@@ -381,12 +381,14 @@ siphash24(const void *src, Py_ssize_t sr - - PY_UINT64_T t; - PY_UINT8_T *pt; -- PY_UINT8_T *m; -+ const PY_UINT8_T *m; - - while (src_sz >= 8) { -- PY_UINT64_T mi = _le64toh(*in); -- in += 1; -- src_sz -= 8; -+ PY_UINT64_T mi; -+ memcpy(&mi, in, sizeof(mi)); -+ mi = _le64toh(mi); -+ in += sizeof(mi); -+ src_sz -= sizeof(mi); - v3 ^= mi; - DOUBLE_ROUND(v0,v1,v2,v3); - v0 ^= mi; -@@ -394,7 +396,7 @@ siphash24(const void *src, Py_ssize_t sr - - t = 0; - pt = (PY_UINT8_T *)&t; -- m = (PY_UINT8_T *)in; -+ m = in; - switch (src_sz) { - case 7: pt[6] = m[6]; - case 6: pt[5] = m[5]; diff --git a/dev-lang/python/files/python-3.5.5-libressl-compatibility.patch b/dev-lang/python/files/python-3.5.5-libressl-compatibility.patch deleted file mode 100644 index 67d57d0c138b..000000000000 --- a/dev-lang/python/files/python-3.5.5-libressl-compatibility.patch +++ /dev/null @@ -1,69 +0,0 @@ -# From 8d89a385b71a2e4cce0fba0cfc8d91b63485edc5 Mon Sep 17 00:00:00 2001 -# From: Christian Heimes <christian@python.org> -# Date: Sat, 24 Mar 2018 18:38:14 +0100 -# Subject: [PATCH] [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0 -# (GH-6210) (GH-6214) -# -# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects -# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and -# LibreSSL < 2.7. - -# Documentation updates and fixes for failing tests will be provided in -# another patch set. - -# Signed-off-by: Christian Heimes <christian@python.org>. -# (cherry picked from commit 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1) - -# Co-authored-by: Christian Heimes <christian@python.org> -# Patch modified by Aaron Bauman <bman@gentoo.org> for 3.5.5 - ---- a/Modules/_ssl.c 2018-04-13 18:33:17.397649561 -0400 -+++ b/Modules/_ssl.c 2018-04-13 18:40:22.319852014 -0400 -@@ -101,6 +101,12 @@ - - #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) - # define OPENSSL_VERSION_1_1 1 -+# define PY_OPENSSL_1_1_API 1 -+#endif -+ -+/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */ -+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL -+# define PY_OPENSSL_1_1_API 1 - #endif - - /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1 -@@ -129,16 +135,18 @@ - #define INVALID_SOCKET (-1) - #endif - --#ifdef OPENSSL_VERSION_1_1 --/* OpenSSL 1.1.0+ */ --#ifndef OPENSSL_NO_SSL2 --#define OPENSSL_NO_SSL2 --#endif --#else /* OpenSSL < 1.1.0 */ --#if defined(WITH_THREAD) -+/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */ -+#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD) - #define HAVE_OPENSSL_CRYPTO_LOCK - #endif - -+#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2) -+#define OPENSSL_NO_SSL2 -+#endif -+ -+#ifndef PY_OPENSSL_1_1_API -+/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */ -+ - #define TLS_method SSLv23_method - - static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) -@@ -187,7 +195,7 @@ - { - return store->param; - } --#endif /* OpenSSL < 1.1.0 or LibreSSL */ -+#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */ - - - enum py_ssl_error { diff --git a/dev-lang/python/files/python-3.6.5-hash-unaligned.patch b/dev-lang/python/files/python-3.6.5-hash-unaligned.patch deleted file mode 100644 index d096887cbfb7..000000000000 --- a/dev-lang/python/files/python-3.6.5-hash-unaligned.patch +++ /dev/null @@ -1,42 +0,0 @@ -The hash implementation casts the input pointer to uint64_t* and directly reads -from this, which may cause unaligned accesses. Use memcpy() instead so this code -will not crash with SIGBUS on sparc. - ---- a/Python/pyhash.c 2017-11-29 10:21:20.283094068 +0100 -+++ b/Python/pyhash.c 2017-11-29 10:24:26.733087813 +0100 -@@ -369,7 +369,7 @@ - uint64_t k0 = _le64toh(_Py_HashSecret.siphash.k0); - uint64_t k1 = _le64toh(_Py_HashSecret.siphash.k1); - uint64_t b = (uint64_t)src_sz << 56; -- const uint64_t *in = (uint64_t*)src; -+ const uint8_t *in = (uint8_t*)src; - - uint64_t v0 = k0 ^ 0x736f6d6570736575ULL; - uint64_t v1 = k1 ^ 0x646f72616e646f6dULL; -@@ -378,11 +378,13 @@ - - uint64_t t; - uint8_t *pt; -- uint8_t *m; -+ const uint8_t *m; - - while (src_sz >= 8) { -- uint64_t mi = _le64toh(*in); -- in += 1; -- src_sz -= 8; -+ uint64_t mi; -+ memcpy(&mi, in, sizeof(mi)); -+ mi = _le64toh(mi); -+ in += sizeof(mi); -+ src_sz -= sizeof(mi); - v3 ^= mi; - DOUBLE_ROUND(v0,v1,v2,v3); -@@ -391,7 +393,7 @@ - - t = 0; - pt = (uint8_t *)&t; -- m = (uint8_t *)in; -+ m = in; - switch (src_sz) { - case 7: pt[6] = m[6]; /* fall through */ - case 6: pt[5] = m[5]; /* fall through */ diff --git a/dev-lang/python/files/python-3.6.5-libressl-compatibility.patch b/dev-lang/python/files/python-3.6.5-libressl-compatibility.patch deleted file mode 100644 index 2f9e6a2bef24..000000000000 --- a/dev-lang/python/files/python-3.6.5-libressl-compatibility.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 8d89a385b71a2e4cce0fba0cfc8d91b63485edc5 Mon Sep 17 00:00:00 2001 -From: Christian Heimes <christian@python.org> -Date: Sat, 24 Mar 2018 18:38:14 +0100 -Subject: [PATCH] [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0 - (GH-6210) (GH-6214) - -LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects -LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and -LibreSSL < 2.7. - -Documentation updates and fixes for failing tests will be provided in -another patch set. - -Signed-off-by: Christian Heimes <christian@python.org>. -(cherry picked from commit 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1) - -Co-authored-by: Christian Heimes <christian@python.org> ---- - Lib/test/test_ssl.py | 1 + - .../2018-03-24-15-08-24.bpo-33127.olJmHv.rst | 1 + - Modules/_ssl.c | 24 ++++++++++++------- - Tools/ssl/multissltests.py | 3 ++- - 4 files changed, 20 insertions(+), 9 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 8dd3b41450..9785a59a7e 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -1687,6 +1687,7 @@ class SimpleBackgroundTests(unittest.TestCase): - self.assertEqual(len(ctx.get_ca_certs()), 1) - - @needs_sni -+ @unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_2"), "needs TLS 1.2") - def test_context_setget(self): - # Check that the context of a connected socket can be replaced. - ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) -diff --git a/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst b/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst -new file mode 100644 -index 0000000000..635aabbde0 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst -@@ -0,0 +1 @@ -+The ssl module now compiles with LibreSSL 2.7.1. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index c54e43c2b4..5e007da858 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -106,6 +106,12 @@ struct py_ssl_library_code { - - #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) - # define OPENSSL_VERSION_1_1 1 -+# define PY_OPENSSL_1_1_API 1 -+#endif -+ -+/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */ -+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL -+# define PY_OPENSSL_1_1_API 1 - #endif - - /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1 -@@ -152,16 +158,18 @@ struct py_ssl_library_code { - #define INVALID_SOCKET (-1) - #endif - --#ifdef OPENSSL_VERSION_1_1 --/* OpenSSL 1.1.0+ */ --#ifndef OPENSSL_NO_SSL2 --#define OPENSSL_NO_SSL2 --#endif --#else /* OpenSSL < 1.1.0 */ --#if defined(WITH_THREAD) -+/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */ -+#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD) - #define HAVE_OPENSSL_CRYPTO_LOCK - #endif - -+#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2) -+#define OPENSSL_NO_SSL2 -+#endif -+ -+#ifndef PY_OPENSSL_1_1_API -+/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */ -+ - #define TLS_method SSLv23_method - #define TLS_client_method SSLv23_client_method - #define TLS_server_method SSLv23_server_method -@@ -227,7 +235,7 @@ SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) - return s->tlsext_tick_lifetime_hint; - } - --#endif /* OpenSSL < 1.1.0 or LibreSSL */ -+#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */ - - - enum py_ssl_error { -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index ce5bbd8530..ba4529ae06 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -57,8 +57,9 @@ LIBRESSL_OLD_VERSIONS = [ - ] - - LIBRESSL_RECENT_VERSIONS = [ -- "2.5.3", - "2.5.5", -+ "2.6.4", -+ "2.7.1", - ] - - # store files in ../multissl --- -2.17.0 - diff --git a/dev-lang/python/python-2.7.15.ebuild b/dev-lang/python/python-2.7.15.ebuild deleted file mode 100644 index c8f7aeab5900..000000000000 --- a/dev-lang/python/python-2.7.15.ebuild +++ /dev/null @@ -1,359 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV}" -PATCHSET_VERSION="2.7.15" - -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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="2.7" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode 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:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:5.1 - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1 ) - !!<sys-apps/portage-2.1.9" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" - -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_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - rm -r Modules/zlib || die - - if tc-is-cross-compiler; then - rm "${WORKDIR}/patches/0006-Regenerate-platform-specific-modules.patch" || die - fi - - local PATCHES=( - "${WORKDIR}/patches" - # Fix for cross-compiling. - "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" - "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" - "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" - "${FILESDIR}/python-2.7.10-system-libffi.patch" - ) - - 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) - - # Set LDFLAGS so we link modules with -lpython2.7 correctly. - # Needed on FreeBSD unless Python 2.7 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - ECONF_SOURCE="${S}" OPT="" \ - econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ - --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 - - if use threads && 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() { - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - cd "${BUILD_DIR}" || die - 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 - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="distutils gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # 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${SLOT}/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${SLOT} - - cd "${BUILD_DIR}" || die - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" - - 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${SLOT}" "${libdir}/"{idlelib,lib-tk} || die - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/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-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${SLOT}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${SLOT%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/python${SLOT}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die - # python-config and pythonX-config - ln -s "../../../bin/python${SLOT}-config" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${SLOT}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${SLOT}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${SLOT}" "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-2.7.16.ebuild b/dev-lang/python/python-2.7.17-r1.ebuild index 4ec6308a22cb..cadc834964dd 100644 --- a/dev-lang/python/python-2.7.16.ebuild +++ b/dev-lang/python/python-2.7.17-r1.ebuild @@ -1,31 +1,33 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI="7" WANT_LIBTOOL="none" inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs MY_P="Python-${PV}" -PATCHSET_VERSION="2.7.16" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-2.7.17-r1" 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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" -SLOT="2.7" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" +SLOT="${PYVER}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="-berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode 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:0= - >=sys-libs/zlib-1.1.3:0= +RDEPEND="app-arch/bzip2:= + >=sys-libs/zlib-1.1.3:= virtual/libffi:= virtual/libintl berkdb? ( || ( @@ -39,34 +41,29 @@ RDEPEND="app-arch/bzip2:0= sys-libs/db:4.3 sys-libs/db:4.2 ) ) - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) + 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? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) ) tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1 ) - !!<sys-apps/portage-2.1.9" + xml? ( >=dev-libs/expat-2.1:= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) virtual/pkgconfig - >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" +RDEPEND+=" !build? ( app-misc/mime-types )" PDEPEND=">=app-eselect/eselect-python-20140125-r1" -S="${WORKDIR}/${MY_P}" - pkg_setup() { if use berkdb; then ewarn "'bsddb' module is out-of-date and no longer maintained inside" @@ -84,21 +81,12 @@ pkg_setup() { src_prepare() { # Ensure that internal copies of expat, libffi and zlib are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - rm -r Modules/zlib || die - - if tc-is-cross-compiler; then - rm "${WORKDIR}/patches/0006-Regenerate-platform-specific-modules.patch" || die - fi + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die local PATCHES=( - "${WORKDIR}/patches" - # Fix for cross-compiling. - "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" - "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" - "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" - "${FILESDIR}/python-2.7.10-system-libffi.patch" + "${WORKDIR}/${PATCHSET}" ) default @@ -118,27 +106,27 @@ src_prepare() { } 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 + # 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}" @@ -203,7 +191,7 @@ src_configure() { --without-ensurepip ) - OPT= econf "${myeconfargs[@]}" + OPT="" econf "${myeconfargs[@]}" if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then eerror "configure has detected that the sem_open function is broken." @@ -213,6 +201,10 @@ src_configure() { } 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 @@ -262,52 +254,53 @@ src_test() { done elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" + elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" elog "and run the tests separately." - if [[ "${result}" -ne 0 ]]; then + if [[ ${result} -ne 0 ]]; then die "emake test failed" fi } src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} + local libdir=${ED}/usr/$(get_libdir)/python${PYVER} emake DESTDIR="${D}" altinstall - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" + 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-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" + 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${SLOT}" "${libdir}/"{idlelib,lib-tk} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} + dodoc Misc/{ACKS,HISTORY,NEWS} if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/Tools + 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-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" + -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" # for python-exec local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) @@ -320,34 +313,43 @@ src_install() { vars=( PYTHON "${vars[@]}" ) fi - python_export "python${SLOT}" "${vars[@]}" + python_export "python${PYVER}" "${vars[@]}" echo "EPYTHON='${EPYTHON}'" > epython.py || die python_domodule epython.py # python-exec wrapping support - local pymajor=${SLOT%.*} + local pymajor=${PYVER%.*} mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die # python and pythonX - ln -s "../../../bin/python${SLOT}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "../../../bin/python${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die # python-config and pythonX-config - ln -s "../../../bin/python${SLOT}-config" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die + ln -s "../../../bin/python${PYVER}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${SLOT}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${SLOT}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die + ln -s "../../../bin/2to3-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die # idle if use tk; then - ln -s "../../../bin/idle${SLOT}" "${D}${PYTHON_SCRIPTDIR}/idle" || die + ln -s "../../../bin/idle${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die fi } eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then + if [[ -z "$(eselect python show)" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then eselect python update fi - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + if [[ -z "$(eselect python show --python${PV%%.*})" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] + then eselect python update --python${PV%%.*} fi } diff --git a/dev-lang/python/python-2.7.17.ebuild b/dev-lang/python/python-2.7.17.ebuild index b9c9ec73ec81..2aba9a4f6033 100644 --- a/dev-lang/python/python-2.7.17.ebuild +++ b/dev-lang/python/python-2.7.17.ebuild @@ -16,7 +16,7 @@ SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz LICENSE="PSF-2" SLOT="2.7" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86" IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" # Do not add a dependency on dev-lang/python to this ebuild. diff --git a/dev-lang/python/python-3.5.5.ebuild b/dev-lang/python/python-3.5.5.ebuild deleted file mode 100644 index 66e8fbadbe74..000000000000 --- a/dev-lang/python/python-3.5.5.ebuild +++ /dev/null @@ -1,365 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV/_/}" -PATCHSET_VERSION="3.5.4-0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.5/3.5m" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads 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:0= - app-arch/xz-utils:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" -DEPEND="${RDEPEND} - test? ( app-arch/xz-utils[extra-filters(+)] ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" - -PYVER=${SLOT%/*} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if tc-is-cross-compiler; then - # Invokes BUILDPYTHON, which is built for the host arch - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" - epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" - epatch "${FILESDIR}/3.6-disable-nis.patch" - epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch" - epatch "${FILESDIR}/python-3.5.5-hash-unaligned.patch" - - epatch_user - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - configure.ac \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/getpath.c \ - Modules/Setup.dist \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - 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 - - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - local myeconfargs=( - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --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 - ) - - ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}" - - if use threads && 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 - - cd "${BUILD_DIR}" || die - - 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 - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - local -x PYTHONDONTWRITEBYTECODE= - emake test EXTRATESTOPTS="-u-network" 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/$(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} - - cd "${BUILD_DIR}" || die - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" - - # 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 elibc_uclibc && rm -fr "${libdir}/test" - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/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" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" \ - "${D}${PYTHON_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 > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.5.7.ebuild b/dev-lang/python/python-3.5.7.ebuild deleted file mode 100644 index 8d7fe9a0b02f..000000000000 --- a/dev-lang/python/python-3.5.7.ebuild +++ /dev/null @@ -1,368 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV/_/}" -PATCHSET_VERSION="3.5.4-0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.5/3.5m" -KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads 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:0= - app-arch/xz-utils:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" - -PYVER=${SLOT%/*} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if tc-is-cross-compiler; then - # Invokes BUILDPYTHON, which is built for the host arch - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" - epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" - epatch "${FILESDIR}/3.6-disable-nis.patch" -# epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch" - epatch "${FILESDIR}/python-3.5.5-hash-unaligned.patch" - - epatch_user - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - configure.ac \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/getpath.c \ - Modules/Setup.dist \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - 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 - - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - local myeconfargs=( - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --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 - ) - - ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}" - - if use threads && 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 - - cd "${BUILD_DIR}" || die - - 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 - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - local -x PYTHONDONTWRITEBYTECODE= - emake test EXTRATESTOPTS="-u-network" 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/$(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} - - cd "${BUILD_DIR}" || die - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" - - # 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 elibc_uclibc && rm -fr "${libdir}/test" - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/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" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" \ - "${D}${PYTHON_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 > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.5.9.ebuild b/dev-lang/python/python-3.5.9.ebuild deleted file mode 100644 index 44cd7a604772..000000000000 --- a/dev-lang/python/python-3.5.9.ebuild +++ /dev/null @@ -1,368 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -WANT_LIBTOOL="none" - -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV/_/}" -PATCHSET_VERSION="3.5.4-0" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.5/3.5m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads 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:0= - app-arch/xz-utils:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" - -PYVER=${SLOT%/*} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if tc-is-cross-compiler; then - # Invokes BUILDPYTHON, which is built for the host arch - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" - epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" - epatch "${FILESDIR}/3.6-disable-nis.patch" -# epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch" - epatch "${FILESDIR}/python-3.5.5-hash-unaligned.patch" - - epatch_user - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - configure.ac \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/getpath.c \ - Modules/Setup.dist \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - 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 - - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - BUILD_DIR="${WORKDIR}/${CHOST}" - mkdir -p "${BUILD_DIR}" || die - cd "${BUILD_DIR}" || die - - local myeconfargs=( - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --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 - ) - - ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}" - - if use threads && 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 - - cd "${BUILD_DIR}" || die - - 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 - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - local -x PYTHONDONTWRITEBYTECODE= - emake test EXTRATESTOPTS="-u-network" 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/$(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} - - cd "${BUILD_DIR}" || die - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" - - # 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 elibc_uclibc && rm -fr "${libdir}/test" - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} - - use threads || rm -fr "${libdir}/multiprocessing" - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - dodoc -r "${S}"/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" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" \ - "${D}${PYTHON_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 > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.6.8.ebuild b/dev-lang/python/python-3.6.10.ebuild index fabbf47dc28e..43dc80e812fe 100644 --- a/dev-lang/python/python-3.6.8.ebuild +++ b/dev-lang/python/python-3.6.10.ebuild @@ -1,21 +1,23 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI="7" WANT_LIBTOOL="none" inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs MY_P="Python-${PV}" -PATCHSET_VERSION="3.6.8" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-3.6.10" 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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" -SLOT="3.6/3.6m" +SLOT="${PYVER}/${PYVER}m" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml" RESTRICT="!test? ( test )" @@ -25,27 +27,26 @@ RESTRICT="!test? ( test )" # run the bootstrap code on your dev box and include the results in the # patchset. See bug 447752. -RDEPEND="app-arch/bzip2:0= - app-arch/xz-utils:0= - >=sys-libs/zlib-1.1.3:0= +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + >=sys-libs/zlib-1.1.3:= virtual/libffi:= virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) + 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? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) ) tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" + xml? ( >=dev-libs/expat-2.1:= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) @@ -55,17 +56,14 @@ DEPEND="${RDEPEND} RDEPEND+=" !build? ( app-misc/mime-types )" PDEPEND=">=app-eselect/eselect-python-20140125-r1" -S="${WORKDIR}/${MY_P}" -PYVER=${SLOT%/*} - src_prepare() { # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die local PATCHES=( - "${WORKDIR}/patches" + "${WORKDIR}/${PATCHSET}" ) default @@ -89,13 +87,13 @@ 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. + 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 @@ -218,19 +216,22 @@ src_install() { emake DESTDIR="${D}" altinstall + # Remove static library + rm "${ED}"/usr/$(get_libdir)/libpython*.a || die + sed \ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ -e "s/\(PY_LDFLAGS=\).*/\1/" \ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}usr/include"; echo python*) + 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 + 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" @@ -241,23 +242,23 @@ src_install() { # 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}" + pax-mark E "${ED}/usr/bin/${abiver}" else - pax-mark m "${ED}usr/bin/${abiver}" + 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 tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die use threads || rm -r "${libdir}/multiprocessing" || die use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} + dodoc Misc/{ACKS,HISTORY,NEWS} if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/Tools + 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' | \ @@ -269,7 +270,8 @@ src_install() { 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" + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" # for python-exec local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) @@ -292,8 +294,7 @@ src_install() { # python and pythonX ln -s "../../../bin/${abiver}" \ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" \ - "${D}${PYTHON_SCRIPTDIR}/python" || die + ln -s "python${pymajor}" "${D}${PYTHON_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 @@ -325,11 +326,14 @@ pkg_preinst() { } eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then + if [[ -z "$(eselect python show)" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then eselect python update fi - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + if [[ -z "$(eselect python show --python${PV%%.*})" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] + then eselect python update --python${PV%%.*} fi } diff --git a/dev-lang/python/python-3.6.5.ebuild b/dev-lang/python/python-3.6.5.ebuild deleted file mode 100644 index 4d67b4d47a31..000000000000 --- a/dev-lang/python/python-3.6.5.ebuild +++ /dev/null @@ -1,346 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV}" -PATCHSET_VERSION="3.6.4" - -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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.6/3.6m" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads 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:0= - app-arch/xz-utils:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" -DEPEND="${RDEPEND} - test? ( app-arch/xz-utils[extra-filters(+)] ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" -PYVER=${SLOT%/*} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - local PATCHES=( - "${WORKDIR}/patches" - "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" - "${FILESDIR}/3.6.5-disable-nis.patch" - "${FILESDIR}/python-3.6.5-libressl-compatibility.patch" - "${FILESDIR}/python-3.6.5-hash-unaligned.patch" - ) - - 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 \ - configure.ac \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - 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 - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - local -x PYTHONDONTWRITEBYTECODE= - - emake test EXTRATESTOPTS="-u-network" 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/$(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/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm -f "${ED}usr/$(get_libdir)/libpython3.so" - - # 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 threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/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" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" \ - "${D}${PYTHON_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 > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.6.9.ebuild b/dev-lang/python/python-3.6.9.ebuild index 2c900db4f4fc..41d346eb2cbc 100644 --- a/dev-lang/python/python-3.6.9.ebuild +++ b/dev-lang/python/python-3.6.9.ebuild @@ -44,8 +44,7 @@ RDEPEND="app-arch/bzip2:0= dev-tcltk/blt:0= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" + xml? ( >=dev-libs/expat-2.1:0= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) diff --git a/dev-lang/python/python-3.7.2.ebuild b/dev-lang/python/python-3.7.2.ebuild deleted file mode 100644 index 8982ff6d7bb0..000000000000 --- a/dev-lang/python/python-3.7.2.ebuild +++ /dev/null @@ -1,325 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV}" -PATCHSET_VERSION="3.7.2" - -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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.7/3.7m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 libressl +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:0= - app-arch/xz-utils:0= - sys-apps/util-linux:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" -PYVER=${SLOT%/*} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - local PATCHES=( - "${WORKDIR}/patches" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - 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 - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - local -x PYTHONDONTWRITEBYTECODE= - - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED%/}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm -f "${ED%/}/usr/$(get_libdir)/libpython3.so" - - # 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 "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/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" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D%/}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D%/}${PYTHON_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 > "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D%/}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.7.5-r1.ebuild b/dev-lang/python/python-3.7.5-r1.ebuild index a247fe6460d0..207683a35c2e 100644 --- a/dev-lang/python/python-3.7.5-r1.ebuild +++ b/dev-lang/python/python-3.7.5-r1.ebuild @@ -16,7 +16,7 @@ SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz LICENSE="PSF-2" SLOT="3.7/3.7m" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86" +KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86" IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" RESTRICT="!test? ( test )" @@ -45,8 +45,7 @@ RDEPEND="app-arch/bzip2:0= dev-tcltk/blt:0= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" + xml? ( >=dev-libs/expat-2.1:0= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) diff --git a/dev-lang/python/python-3.7.5.ebuild b/dev-lang/python/python-3.7.5.ebuild deleted file mode 100644 index 6ddae2e9d0b7..000000000000 --- a/dev-lang/python/python-3.7.5.ebuild +++ /dev/null @@ -1,328 +0,0 @@ -# Copyright 1999-2019 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 - -MY_P="Python-${PV}" -PATCHSET_VERSION="3.7.4-1" - -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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" - -LICENSE="PSF-2" -SLOT="3.7/3.7m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 libressl +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:0= - app-arch/xz-utils:0= - sys-apps/util-linux:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi:= - virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" -PYVER=${SLOT%/*} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - local PATCHES=( - "${WORKDIR}/patches" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - 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 - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - # 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=( - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - local -x PYTHONDONTWRITEBYTECODE= - - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED%/}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm -f "${ED%/}/usr/$(get_libdir)/libpython3.so" - - # 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 "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/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" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # 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 - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D%/}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D%/}${PYTHON_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 > "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D%/}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT%/}/usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT%/}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.8.0.ebuild b/dev-lang/python/python-3.7.6.ebuild index 9428510a9d1d..df19e80b7cb0 100644 --- a/dev-lang/python/python-3.8.0.ebuild +++ b/dev-lang/python/python-3.7.6.ebuild @@ -8,16 +8,16 @@ inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs MY_P="Python-${PV}" PYVER=$(ver_cut 1-2) -PATCHSET_VERSION="3.8.0" +PATCHSET="python-gentoo-patches-3.7.6" 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-gentoo-patches-${PATCHSET_VERSION}.tar.xz" + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" -SLOT="${PYVER}" +SLOT="${PYVER}/${PYVER}m" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" RESTRICT="!test? ( test )" @@ -33,7 +33,7 @@ RDEPEND="app-arch/bzip2:= >=sys-libs/zlib-1.1.3:= virtual/libffi:= virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) + 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= ) @@ -47,8 +47,7 @@ RDEPEND="app-arch/bzip2:= dev-tcltk/blt:= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1:= ) - !!<sys-apps/sandbox-2.6-r1" + xml? ( >=dev-libs/expat-2.1:= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) @@ -65,8 +64,7 @@ src_prepare() { rm -fr Modules/zlib || die local PATCHES=( - "${FILESDIR}/python-3.7.5-hashlib.patch" - "${WORKDIR}/patches" + "${WORKDIR}/${PATCHSET}" ) default @@ -280,7 +278,8 @@ src_install() { local pymajor=${PYVER%.*} mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die # python and pythonX - ln -s "../../../bin/${abiver}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "../../../bin/${abiver}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die # python-config and pythonX-config # note: we need to create a wrapper rather than symlinking it due @@ -290,13 +289,19 @@ src_install() { exec "${abiver}-config" "\${@}" EOF chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die + ln -s "../../../bin/pyvenv-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die # idle if use tk; then - ln -s "../../../bin/idle${PYVER}" "${D}${PYTHON_SCRIPTDIR}/idle" || die + ln -s "../../../bin/idle${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die fi } @@ -307,11 +312,14 @@ pkg_preinst() { } eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then + if [[ -z "$(eselect python show)" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then eselect python update fi - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + if [[ -z "$(eselect python show --python${PV%%.*})" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] + then eselect python update --python${PV%%.*} fi } diff --git a/dev-lang/python/python-3.7.4-r1.ebuild b/dev-lang/python/python-3.8.1.ebuild index 6ddae2e9d0b7..cc9a3439c5bc 100644 --- a/dev-lang/python/python-3.7.4-r1.ebuild +++ b/dev-lang/python/python-3.8.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -7,15 +7,17 @@ WANT_LIBTOOL="none" inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs MY_P="Python-${PV}" -PATCHSET_VERSION="3.7.4-1" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${PV}-r2" 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/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" -SLOT="3.7/3.7m" +SLOT="${PYVER}" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" RESTRICT="!test? ( test )" @@ -25,28 +27,27 @@ RESTRICT="!test? ( test )" # run the bootstrap code on your dev box and include the results in the # patchset. See bug 447752. -RDEPEND="app-arch/bzip2:0= - app-arch/xz-utils:0= - sys-apps/util-linux:0= - >=sys-libs/zlib-1.1.3:0= +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= virtual/libffi:= virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) + 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? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) ) tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" + xml? ( >=dev-libs/expat-2.1:= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) @@ -56,17 +57,14 @@ DEPEND="${RDEPEND} RDEPEND+=" !build? ( app-misc/mime-types )" PDEPEND=">=app-eselect/eselect-python-20140125-r1" -S="${WORKDIR}/${MY_P}" -PYVER=${SLOT%/*} - src_prepare() { # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die local PATCHES=( - "${WORKDIR}/patches" + "${WORKDIR}/${PATCHSET}" ) default @@ -81,13 +79,13 @@ 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. + 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 @@ -112,6 +110,11 @@ src_configure() { 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 @@ -201,23 +204,26 @@ src_test() { } src_install() { - local libdir=${ED%/}/usr/lib/python${PYVER} + local libdir=${ED}/usr/lib/python${PYVER} emake DESTDIR="${D}" altinstall + # Remove static library + rm "${ED}"/usr/$(get_libdir)/libpython*.a || die + sed \ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ -e "s/\(PY_LDFLAGS=\).*/\1/" \ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" # Fix collisions between different slots of Python. - rm -f "${ED%/}/usr/$(get_libdir)/libpython3.so" + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED%/}/usr/include"; echo python*) + 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 + 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" @@ -228,22 +234,22 @@ src_install() { # 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}" + pax-mark E "${ED}/usr/bin/${abiver}" else - pax-mark m "${ED%/}/usr/bin/${abiver}" + 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 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 "${S}"/Misc/{ACKS,HISTORY,NEWS} + dodoc Misc/{ACKS,HISTORY,NEWS} if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/Tools + 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' | \ @@ -255,7 +261,8 @@ src_install() { 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" + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" # for python-exec local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) @@ -274,26 +281,30 @@ src_install() { # python-exec wrapping support local pymajor=${PYVER%.*} - mkdir -p "${D%/}${PYTHON_SCRIPTDIR}" || die + mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die # python and pythonX - ln -s "../../../bin/${abiver}" "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D%/}${PYTHON_SCRIPTDIR}/python" || die + ln -s "../../../bin/${abiver}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "python${pymajor}" "${D}${PYTHON_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 > "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die + cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die #!/bin/sh exec "${abiver}-config" "\${@}" EOF - chmod +x "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D%/}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pyvenv" || die + chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die # idle if use tk; then - ln -s "../../../bin/idle${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/idle" || die + ln -s "../../../bin/idle${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die fi } @@ -304,11 +315,14 @@ pkg_preinst() { } eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT%/}/usr/bin/$(eselect python show)" ]]; then + if [[ -z "$(eselect python show)" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then eselect python update fi - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT%/}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + if [[ -z "$(eselect python show --python${PV%%.*})" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] + then eselect python update --python${PV%%.*} fi } diff --git a/dev-lang/python/python-3.7.3.ebuild b/dev-lang/python/python-3.9.0_alpha2.ebuild index d5def2f23517..d27153afa53e 100644 --- a/dev-lang/python/python-3.7.3.ebuild +++ b/dev-lang/python/python-3.9.0_alpha2.ebuild @@ -1,21 +1,24 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 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 +inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ + toolchain-funcs -MY_P="Python-${PV}" -PATCHSET_VERSION="3.7.3-0" +MY_P="Python-${PV/_alpha/a}" +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-gentoo-patches-${PATCHSET_VERSION}.tar.xz" +SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" -SLOT="3.7/3.7m" +SLOT="${PYVER}" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" RESTRICT="!test? ( test )" @@ -25,28 +28,27 @@ RESTRICT="!test? ( test )" # run the bootstrap code on your dev box and include the results in the # patchset. See bug 447752. -RDEPEND="app-arch/bzip2:0= - app-arch/xz-utils:0= - sys-apps/util-linux:0= - >=sys-libs/zlib-1.1.3:0= +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= virtual/libffi:= virtual/libintl - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) + 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? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) ) tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= dev-tcltk/tix ) - xml? ( >=dev-libs/expat-2.1:0= ) - !!<sys-apps/sandbox-2.6-r1" + xml? ( >=dev-libs/expat-2.1:= )" # bluetooth requires headers from bluez DEPEND="${RDEPEND} bluetooth? ( net-wireless/bluez ) @@ -56,17 +58,29 @@ DEPEND="${RDEPEND} RDEPEND+=" !build? ( app-misc/mime-types )" PDEPEND=">=app-eselect/eselect-python-20140125-r1" -S="${WORKDIR}/${MY_P}" -PYVER=${SLOT%/*} +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +pkg_pretend() { + use test && check-reqs_pkg_pretend + + ewarn "This is an early developer preview of Python 3.9. New features" + ewarn "can still be added up to 2020-05-18. It's not suitable for production" + ewarn "use, and it is not supported for Gentoo packages." +} + +pkg_setup() { + use test && check-reqs_pkg_setup +} src_prepare() { # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die local PATCHES=( - "${WORKDIR}/patches" + "${WORKDIR}/${PATCHSET}" ) default @@ -81,13 +95,13 @@ 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. + 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 @@ -112,6 +126,11 @@ src_configure() { 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 @@ -201,23 +220,26 @@ src_test() { } src_install() { - local libdir=${ED%/}/usr/lib/python${PYVER} + local libdir=${ED}/usr/lib/python${PYVER} emake DESTDIR="${D}" altinstall + # Remove static library + rm "${ED}"/usr/$(get_libdir)/libpython*.a || die + sed \ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ -e "s/\(PY_LDFLAGS=\).*/\1/" \ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" # Fix collisions between different slots of Python. - rm -f "${ED%/}/usr/$(get_libdir)/libpython3.so" + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED%/}/usr/include"; echo python*) + 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 + 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" @@ -228,22 +250,20 @@ src_install() { # 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}" + pax-mark E "${ED}/usr/bin/${abiver}" else - pax-mark m "${ED%/}/usr/bin/${abiver}" + 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 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 "${S}"/Misc/{ACKS,HISTORY,NEWS} + dodoc Misc/{ACKS,HISTORY,NEWS} if use examples; then - insinto /usr/share/doc/${PF}/examples - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr - doins -r "${S}"/Tools + 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' | \ @@ -255,7 +275,8 @@ src_install() { 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" + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" # for python-exec local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) @@ -274,55 +295,29 @@ src_install() { # python-exec wrapping support local pymajor=${PYVER%.*} - mkdir -p "${D%/}${PYTHON_SCRIPTDIR}" || die + mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die # python and pythonX - ln -s "../../../bin/${abiver}" "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D%/}${PYTHON_SCRIPTDIR}/python" || die + ln -s "../../../bin/${abiver}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "python${pymajor}" "${D}${PYTHON_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 > "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die + cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die #!/bin/sh exec "${abiver}-config" "\${@}" EOF - chmod +x "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${D%/}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pyvenv" || die + chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die # idle if use tk; then - ln -s "../../../bin/idle${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/idle" || die + ln -s "../../../bin/idle${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die fi } - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT%/}/usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT%/}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} |