diff options
author | 2024-07-16 15:00:39 -0700 | |
---|---|---|
committer | 2024-07-16 15:01:58 -0700 | |
commit | bebc026c685139497953a430559766e962e5e30d (patch) | |
tree | f53c5795482a49259cddbe5b09c337904fa0d798 /dev-lang | |
parent | dev-libs/libressl: drop 3.9.1 (diff) | |
download | libressl-bebc026c685139497953a430559766e962e5e30d.tar.gz libressl-bebc026c685139497953a430559766e962e5e30d.tar.bz2 libressl-bebc026c685139497953a430559766e962e5e30d.zip |
dev-lang/python: sync ::gentoo
Signed-off-by: orbea <orbea@riseup.net>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/Manifest | 6 | ||||
-rw-r--r-- | dev-lang/python/files/python-3.10.14-libressl.patch | 69 | ||||
-rw-r--r-- | dev-lang/python/files/python-3.10.3-libressl.patch | 69 | ||||
-rw-r--r-- | dev-lang/python/files/python-3.12.4-libressl.patch | 39 | ||||
-rw-r--r-- | dev-lang/python/files/python-3.9.9-r1-libressl.patch | 11 | ||||
-rw-r--r-- | dev-lang/python/python-3.10.14_p1-r1.ebuild (renamed from dev-lang/python/python-3.10.14_p1.ebuild) | 35 | ||||
-rw-r--r-- | dev-lang/python/python-3.11.9-r1.ebuild | 1 | ||||
-rw-r--r-- | dev-lang/python/python-3.12.3-r1.ebuild | 1 | ||||
-rw-r--r-- | dev-lang/python/python-3.12.4_p1.ebuild (renamed from dev-lang/python/python-3.12.3.ebuild) | 58 | ||||
-rw-r--r-- | dev-lang/python/python-3.12.4_p2.ebuild (renamed from dev-lang/python/python-3.11.9.ebuild) | 162 | ||||
-rw-r--r-- | dev-lang/python/python-3.9.19_p3.ebuild (renamed from dev-lang/python/python-3.9.19_p2.ebuild) | 3 |
11 files changed, 289 insertions, 165 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 2d92132..aa2c937 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -6,10 +6,14 @@ DIST Python-3.11.9.tar.xz 20175816 BLAKE2B 4e7cd2c42ee39b5ef9624ebd1798320957e94 DIST Python-3.11.9.tar.xz.asc 833 BLAKE2B fa29f632bae0bee7db946038ee3529bc3bfbe1b2e755b21394f67a3c80911ce8079aaab43a16d88e614a8bfc01fb5105ce3f61c59a5ca44470b0f59787c707b3 SHA512 b18b50e7168b2ca5376a1fa75e50e8baae2026d4f11d4cf613d758f3f17df4610fe4653fb2ac0c5c4ec0f6e630dc6490ad1ff32a2fd0ebd60f9f3bd136207ffc DIST Python-3.12.3.tar.xz 20625068 BLAKE2B fc4f57ae50183db4c8cb37d94c37a7e58da5d031e03866841a678b986f01bbb8afdefb38124ba82b0a4988445b647214be43338dea13b0f063d3c2bf81c48c0b SHA512 4a2213b108e7f1f1525baa8348e68b2a2336d925e60d0a59f0225fc470768a2c8031edafc0b8243f94dbae18afda335ee5adf2785328c2218fd64cbb439f13a4 DIST Python-3.12.3.tar.xz.asc 963 BLAKE2B f9668dde210793f8da0e0bb026b8ec3e0b4bc3abc58e72732f8faf356b19ca88a59b9d89b4b10f77b3602d9a967f0f2f44a0f091d698bc28ba9bad8049e5e006 SHA512 c291ec5b5e4f8deba867cc517624dd9a174745f04061ef737e58f3d52b9b30318264aec350e339fe88ccb493809ca1a90a378e86d86b8ec4a4f578b1a5843624 +DIST Python-3.12.4.tar.xz 20659356 BLAKE2B 4255171ef8ee1777bab829be7bbaf28a9d5073985b3b1309a41694dda5f6b4ad599df4534a1ce83ec65b357d42416cc18722ca94b4227a45ebd90e2c1df90945 SHA512 750132ee6369196096130a924f4ddb78b9a55804133e5d136a70b9280928822974d1aa559d844486df02e89155fb0d8117871e1ac532abc18174309ca4b08369 +DIST Python-3.12.4.tar.xz.asc 963 BLAKE2B d4f62dca1de5f4e4b2581fc49ca55b1d87abe7c4ceb2c9087efe4b92d9e9b3bdd25949bbf82fd771b4b60bc3690be982c2f25b810d87592665f0728fbe08be9d SHA512 1102b17f395e0ec5de5368d04a4dceb8cc98dd408b68b53998071cf129eb9a6c259316a416128f1dfa37a739f86e599507502a98430348da2272442ce1b7059e DIST Python-3.9.19.tar.xz 19682840 BLAKE2B a12256663f0ff3b799c2193c5877aa89a434340dfa01e655f790abea70af0709b54577e1c2590add241308a8581fd6f45a22aed450bd5db2bf9fa35c4a9d619b SHA512 5577830c734e63a70bbc62cd33d263b9aa87c4381b49cb694c3559067c4c682a55506b65ec5514a8e0a5abf6294dc728e909385d449ae1c388e62f83cea9bb89 DIST Python-3.9.19.tar.xz.asc 833 BLAKE2B b48b58b8ccf4d6ba8d0d7120f04bebf59f843ffecf5fde4c3989fd9c26e3d3d1ccf4e5688f7024ae94775c8731e9ffa56799fca8596289edf93e4aac5480aaad SHA512 f7f4946243dfc56de2c84f50276b088d347f17054f50e3331d1e312e2a8e2c6ed1b4b4a807202b51137fd2af3fc9218cafa42ed348a954ace896d9a432e2defd DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f DIST python-gentoo-patches-3.10.14_p1.tar.xz 15836 BLAKE2B a850e4ad4f025fa9d38ccba937f1b3ee8443ed186c22ede58b4c7324a8541cf724590686671a9aa9194662303ce75bc80aac8ee6f9da34b793876817b6f593ff SHA512 5d969f5e5126ee675a062924a5f403de142fc5bfe4a931fd3576bcc6298a855419d305d4b1ffedacb429783a05324b36eef4c45c861c47bada0bdd840de2bca3 DIST python-gentoo-patches-3.11.9.tar.xz 8456 BLAKE2B 4e62837f17c1d056460df417b056a79ad78dbcdd3454761c7cda68ffe6faf8f4d4f04d5539e0ba94332fe19a751f7d5ff2c35ff969a6aa09a2c72d2ce5efbff1 SHA512 a288aa8d1d15e906e0f1762602a2122f9dc91bbd6b72123ac5d00ce55b3af324a4e8280b600fc0fb630e489e57ee1547d7595a4ede7a70e4b26d6686a8414997 DIST python-gentoo-patches-3.12.3.tar.xz 6028 BLAKE2B 7953a48a1d95a6a33bd88060fbcac463a5469371aa0c882c3945f1fea64a63c4d45fca8451f51f4eaeea00a04267ad2e54e4cc720c95e8bb5a3477e00263b80a SHA512 4779bab2b24e59e4a77987ce3e9611d99e87c9c4d016309758c26a65fe2e11ef04d48d5af628c02b1552dc1f31b768f87448f8e19e716b4fe372941e6dacac3f -DIST python-gentoo-patches-3.9.19_p2.tar.xz 27684 BLAKE2B a69f00548c153da7b13dfeccb332d3d67ecf649fb5ae054590492f3e2fc2c84b78ebaf90bcf9738157c9022778e5bf2a6b4fb6a99e996dcb63859dcf6f84af23 SHA512 552a5f2d89307d4193d76df5a2cf1deb4bd5c8ad9ec81e6768987f1649f6571a318e68b92d8f8ecdba12bfe9c5f1a427a4cc577e6aaebf7748027cc50e412804 +DIST python-gentoo-patches-3.12.4_p1.tar.xz 7088 BLAKE2B 450b95539aaf7c8c052ca1bbcab3b1a8f1c33e8007b6c66cc290c33d88cac8bad346e13cf96508834599a59ccb6548e6dd8cbfb1e24d84539f502101b04299d0 SHA512 df874cb1d8d0f5df60fca82daa2a59cbcfeba6be72b021101a753306a09bb19ee268681b3fdb39659be923d868c727bf7aabbe8173cfd48a329c66f4727353c7 +DIST python-gentoo-patches-3.12.4_p2.tar.xz 11124 BLAKE2B 8e49af60b1e514de9b77c562a8df5ae7d6caf0045e631fcf85a8f91335cf18f1df2ac611ea73d26e5b70c2537beb423a9303dcce41c2c2e2b049ee9f1e537b53 SHA512 df1d49e60d23f5f09144c57034c86f81f8d185f65c3a93bbb2b386977638bd525b45fe1dff8c7202d60ca3a5fdf96b94a492b076072713565e7449b679fde7b5 +DIST python-gentoo-patches-3.9.19_p3.tar.xz 28240 BLAKE2B 35c70b1f9a590abe9a74795f478ab788cd72c96e9d84f2756685e61324dc4203148e71b00a236bb4af8fb8315e3582ecec255b39749a653e0511d4a9f9fef725 SHA512 6b8f4dab4aa7d4d646ee4091b5cf76bbc8896d4299a3623660a2c5fec06c0cf56c0a50ac87604885cd155141bc85e0e80acdbedb7b34a813901aad021b9b8ab2 diff --git a/dev-lang/python/files/python-3.10.14-libressl.patch b/dev-lang/python/files/python-3.10.14-libressl.patch index 7bde606..d363bfc 100644 --- a/dev-lang/python/files/python-3.10.14-libressl.patch +++ b/dev-lang/python/files/python-3.10.14-libressl.patch @@ -1,3 +1,72 @@ +LibreSSL has NID_sha3_256 and NID_sha512_256 now, but it's simpler to +handle -stable updates if we keep the patch until 7.4 is out. + +Index: Modules/_hashopenssl.c +--- a/Modules/_hashopenssl.c.orig ++++ b/Modules/_hashopenssl.c +@@ -45,10 +45,18 @@ + + #define MUNCH_SIZE INT_MAX + ++#ifdef NID_id_scrypt + #define PY_OPENSSL_HAS_SCRYPT 1 ++#endif ++#ifdef NID_sha3_256 + #define PY_OPENSSL_HAS_SHA3 1 ++#endif ++#ifdef NID_shake256 + #define PY_OPENSSL_HAS_SHAKE 1 ++#endif ++#ifdef NID_blake2s256 + #define PY_OPENSSL_HAS_BLAKE2 1 ++#endif + + #if OPENSSL_VERSION_NUMBER >= 0x30000000L + #define PY_EVP_MD EVP_MD +@@ -120,19 +128,27 @@ static const py_hashentry_t py_hashes[] = { + PY_HASH_ENTRY(Py_hash_sha384, "SHA384", SN_sha384, NID_sha384), + PY_HASH_ENTRY(Py_hash_sha512, "SHA512", SN_sha512, NID_sha512), + /* truncated sha2 */ ++#ifdef NID_sha512_256 + PY_HASH_ENTRY(Py_hash_sha512_224, "SHA512_224", SN_sha512_224, NID_sha512_224), + PY_HASH_ENTRY(Py_hash_sha512_256, "SHA512_256", SN_sha512_256, NID_sha512_256), ++#endif + /* sha3 */ ++#ifdef PY_OPENSSL_HAS_SHA3 + PY_HASH_ENTRY(Py_hash_sha3_224, NULL, SN_sha3_224, NID_sha3_224), + PY_HASH_ENTRY(Py_hash_sha3_256, NULL, SN_sha3_256, NID_sha3_256), + PY_HASH_ENTRY(Py_hash_sha3_384, NULL, SN_sha3_384, NID_sha3_384), + PY_HASH_ENTRY(Py_hash_sha3_512, NULL, SN_sha3_512, NID_sha3_512), ++#endif + /* sha3 shake */ ++#ifdef PY_OPENSSL_HAS_SHAKE + PY_HASH_ENTRY(Py_hash_shake_128, NULL, SN_shake128, NID_shake128), + PY_HASH_ENTRY(Py_hash_shake_256, NULL, SN_shake256, NID_shake256), ++#endif + /* blake2 digest */ ++#ifdef PY_OPENSSL_HAS_BLAKE2 + PY_HASH_ENTRY(Py_hash_blake2s, "blake2s256", SN_blake2s256, NID_blake2s256), + PY_HASH_ENTRY(Py_hash_blake2b, "blake2b512", SN_blake2b512, NID_blake2b512), ++#endif + PY_HASH_ENTRY(NULL, NULL, NULL, 0), + }; + +@@ -873,11 +889,15 @@ py_evp_fromname(PyObject *module, const char *digestna + goto exit; + } + ++#ifndef EVP_MD_FLAG_XOF ++ type = get_hashlib_state(module)->EVPtype; ++#else + if ((EVP_MD_flags(digest) & EVP_MD_FLAG_XOF) == EVP_MD_FLAG_XOF) { + type = get_hashlib_state(module)->EVPXOFtype; + } else { + type = get_hashlib_state(module)->EVPtype; + } ++#endif + + self = newEVPobject(type); + if (self == NULL) { --- a/Modules/_ssl.c.orig +++ b/Modules/_ssl.c @@ -4523,7 +4523,7 @@ diff --git a/dev-lang/python/files/python-3.10.3-libressl.patch b/dev-lang/python/files/python-3.10.3-libressl.patch deleted file mode 100644 index ebff9d4..0000000 --- a/dev-lang/python/files/python-3.10.3-libressl.patch +++ /dev/null @@ -1,69 +0,0 @@ -LibreSSL has NID_sha3_256 and NID_sha512_256 now, but it's simpler to -handle -stable updates if we keep the patch until 7.4 is out. - -Index: Modules/_hashopenssl.c ---- a/Modules/_hashopenssl.c.orig -+++ b/Modules/_hashopenssl.c -@@ -45,10 +45,18 @@ - - #define MUNCH_SIZE INT_MAX - -+#ifdef NID_id_scrypt - #define PY_OPENSSL_HAS_SCRYPT 1 -+#endif -+#ifdef NID_sha3_256 - #define PY_OPENSSL_HAS_SHA3 1 -+#endif -+#ifdef NID_shake256 - #define PY_OPENSSL_HAS_SHAKE 1 -+#endif -+#ifdef NID_blake2s256 - #define PY_OPENSSL_HAS_BLAKE2 1 -+#endif - - #if OPENSSL_VERSION_NUMBER >= 0x30000000L - #define PY_EVP_MD EVP_MD -@@ -120,19 +128,27 @@ static const py_hashentry_t py_hashes[] = { - PY_HASH_ENTRY(Py_hash_sha384, "SHA384", SN_sha384, NID_sha384), - PY_HASH_ENTRY(Py_hash_sha512, "SHA512", SN_sha512, NID_sha512), - /* truncated sha2 */ -+#ifdef NID_sha512_256 - PY_HASH_ENTRY(Py_hash_sha512_224, "SHA512_224", SN_sha512_224, NID_sha512_224), - PY_HASH_ENTRY(Py_hash_sha512_256, "SHA512_256", SN_sha512_256, NID_sha512_256), -+#endif - /* sha3 */ -+#ifdef PY_OPENSSL_HAS_SHA3 - PY_HASH_ENTRY(Py_hash_sha3_224, NULL, SN_sha3_224, NID_sha3_224), - PY_HASH_ENTRY(Py_hash_sha3_256, NULL, SN_sha3_256, NID_sha3_256), - PY_HASH_ENTRY(Py_hash_sha3_384, NULL, SN_sha3_384, NID_sha3_384), - PY_HASH_ENTRY(Py_hash_sha3_512, NULL, SN_sha3_512, NID_sha3_512), -+#endif - /* sha3 shake */ -+#ifdef PY_OPENSSL_HAS_SHAKE - PY_HASH_ENTRY(Py_hash_shake_128, NULL, SN_shake128, NID_shake128), - PY_HASH_ENTRY(Py_hash_shake_256, NULL, SN_shake256, NID_shake256), -+#endif - /* blake2 digest */ -+#ifdef PY_OPENSSL_HAS_BLAKE2 - PY_HASH_ENTRY(Py_hash_blake2s, "blake2s256", SN_blake2s256, NID_blake2s256), - PY_HASH_ENTRY(Py_hash_blake2b, "blake2b512", SN_blake2b512, NID_blake2b512), -+#endif - PY_HASH_ENTRY(NULL, NULL, NULL, 0), - }; - -@@ -873,11 +889,15 @@ py_evp_fromname(PyObject *module, const char *digestna - goto exit; - } - -+#ifndef EVP_MD_FLAG_XOF -+ type = get_hashlib_state(module)->EVPtype; -+#else - if ((EVP_MD_flags(digest) & EVP_MD_FLAG_XOF) == EVP_MD_FLAG_XOF) { - type = get_hashlib_state(module)->EVPXOFtype; - } else { - type = get_hashlib_state(module)->EVPtype; - } -+#endif - - self = newEVPobject(type); - if (self == NULL) { diff --git a/dev-lang/python/files/python-3.12.4-libressl.patch b/dev-lang/python/files/python-3.12.4-libressl.patch new file mode 100644 index 0000000..a60d3c8 --- /dev/null +++ b/dev-lang/python/files/python-3.12.4-libressl.patch @@ -0,0 +1,39 @@ +--- a/Modules/_hashopenssl.c.orig ++++ b/Modules/_hashopenssl.c +@@ -44,7 +44,9 @@ + + #define MUNCH_SIZE INT_MAX + ++#ifdef NID_id_scrypt + #define PY_OPENSSL_HAS_SCRYPT 1 ++#endif + #if defined(NID_sha3_224) && defined(NID_sha3_256) && defined(NID_sha3_384) && defined(NID_sha3_512) + #define PY_OPENSSL_HAS_SHA3 1 + #endif +@@ -922,11 +924,15 @@ py_evp_fromname(PyObject *module, const char *digestname, PyObject *data_obj, + goto exit; + } + ++#ifndef EVP_MD_FLAG_XOF ++ type = get_hashlib_state(module)->EVPtype; ++#else + if ((EVP_MD_flags(digest) & EVP_MD_FLAG_XOF) == EVP_MD_FLAG_XOF) { + type = get_hashlib_state(module)->EVPXOFtype; + } else { + type = get_hashlib_state(module)->EVPtype; + } ++#endif + + self = newEVPobject(type); + if (self == NULL) { +--- a/Modules/_ssl.c.orig ++++ b/Modules/_ssl.c +@@ -4523,7 +4523,7 @@ + return 0; + } + +-#if OPENSSL_VERSION_NUMBER < 0x30300000L ++#if OPENSSL_VERSION_NUMBER < 0x30300000L && !defined(LIBRESSL_VERSION_NUMBER) + static X509_OBJECT *x509_object_dup(const X509_OBJECT *obj) + { + int ok; diff --git a/dev-lang/python/files/python-3.9.9-r1-libressl.patch b/dev-lang/python/files/python-3.9.9-r1-libressl.patch index 997bc0e..79dd5b4 100644 --- a/dev-lang/python/files/python-3.9.9-r1-libressl.patch +++ b/dev-lang/python/files/python-3.9.9-r1-libressl.patch @@ -32,3 +32,14 @@ Index: Modules/_ssl.c #ifndef PY_OPENSSL_1_1_API /* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */ +--- a/Modules/_ssl.c.orig ++++ b/Modules/_ssl.c +@@ -4523,7 +4523,7 @@ + return 0; + } + +-#if OPENSSL_VERSION_NUMBER < 0x30300000L ++#if OPENSSL_VERSION_NUMBER < 0x30300000L && !defined(LIBRESSL_VERSION_NUMBER) + static X509_OBJECT *x509_object_dup(const X509_OBJECT *obj) + { + int ok; diff --git a/dev-lang/python/python-3.10.14_p1.ebuild b/dev-lang/python/python-3.10.14_p1-r1.ebuild index 1656bcc..0ba745c 100644 --- a/dev-lang/python/python-3.10.14_p1.ebuild +++ b/dev-lang/python/python-3.10.14_p1-r1.ebuild @@ -45,6 +45,7 @@ RDEPEND=" app-arch/xz-utils:= >=dev-libs/expat-2.1:= dev-libs/libffi:= + dev-libs/mpdecimal:= dev-python/gentoo-common >=sys-libs/zlib-1.1.3:= virtual/libcrypt:= @@ -120,7 +121,6 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" - "${FILESDIR}"/${PN}-3.10.3-libressl.patch "${FILESDIR}"/${PN}-3.10.14-libressl.patch ) @@ -261,6 +261,22 @@ src_configure() { -x test_tools ) + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + if has_version "app-arch/rpm" ; then # Avoid sandbox failure (attempts to write to /var/lib/rpm) profile_task_flags+=( @@ -289,6 +305,7 @@ src_configure() { --without-lto --with-system-expat --with-system-ffi + --with-system-libmpdec --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip $(use_with debug assertions) @@ -399,6 +416,22 @@ src_test() { ) fi + # musl-specific skips + use elibc_musl && test_opts+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + # workaround docutils breaking tests cat > Lib/docutils.py <<-EOF || die raise ImportError("Thou shalt not import!") diff --git a/dev-lang/python/python-3.11.9-r1.ebuild b/dev-lang/python/python-3.11.9-r1.ebuild index b6b315f..ab6fd0d 100644 --- a/dev-lang/python/python-3.11.9-r1.ebuild +++ b/dev-lang/python/python-3.11.9-r1.ebuild @@ -122,7 +122,6 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" - "${FILESDIR}"/${PN}-3.10.3-libressl.patch "${FILESDIR}"/${PN}-3.10.14-libressl.patch ) diff --git a/dev-lang/python/python-3.12.3-r1.ebuild b/dev-lang/python/python-3.12.3-r1.ebuild index b032f8a..24357fc 100644 --- a/dev-lang/python/python-3.12.3-r1.ebuild +++ b/dev-lang/python/python-3.12.3-r1.ebuild @@ -127,7 +127,6 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" - "${FILESDIR}"/${PN}-3.10.3-libressl.patch "${FILESDIR}"/${PN}-3.10.14-libressl.patch ) diff --git a/dev-lang/python/python-3.12.3.ebuild b/dev-lang/python/python-3.12.4_p1.ebuild index 0282cc1..9019119 100644 --- a/dev-lang/python/python-3.12.3.ebuild +++ b/dev-lang/python/python-3.12.4_p1.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" IUSE=" bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind @@ -46,6 +46,7 @@ RDEPEND=" app-crypt/libb2 >=dev-libs/expat-2.1:= dev-libs/libffi:= + dev-libs/mpdecimal:= dev-python/gentoo-common >=sys-libs/zlib-1.1.3:= virtual/libcrypt:= @@ -126,8 +127,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" - "${FILESDIR}"/${PN}-3.10.3-libressl.patch - "${FILESDIR}"/${PN}-3.10.14-libressl.patch + "${FILESDIR}"/${PN}-3.12.4-libressl.patch ) default @@ -136,6 +136,9 @@ src_prepare() { # https://bugs.gentoo.org/737660 sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + eautoreconf } @@ -251,6 +254,22 @@ src_configure() { -x test_tools ) + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + if has_version "app-arch/rpm" ; then # Avoid sandbox failure (attempts to write to /var/lib/rpm) profile_task_flags+=( @@ -281,6 +300,7 @@ src_configure() { --without-ensurepip --without-lto --with-system-expat + --with-system-libmpdec --with-platlibdir=lib --with-pkg-config=yes --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip @@ -410,6 +430,22 @@ src_test() { ) fi + # musl-specific skips + use elibc_musl && test_opts+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + # workaround docutils breaking tests cat > Lib/docutils.py <<-EOF || die raise ImportError("Thou shalt not import!") @@ -524,19 +560,3 @@ src_install() { ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die fi } - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.11.0_beta4-r2; then - ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.11 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.11/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.11.9.ebuild b/dev-lang/python/python-3.12.4_p2.ebuild index 8cdc57e..1f5ded0 100644 --- a/dev-lang/python/python-3.11.9.ebuild +++ b/dev-lang/python/python-3.12.4_p2.ebuild @@ -5,7 +5,7 @@ EAPI="8" WANT_LIBTOOL="none" inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit prefix python-utils-r1 toolchain-funcs verify-sig +inherit python-utils-r1 toolchain-funcs verify-sig MY_PV=${PV/_rc/rc} MY_P="Python-${MY_PV%_p*}" @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE=" bluetooth build debug +ensurepip examples gdbm libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind @@ -46,11 +46,12 @@ RDEPEND=" app-crypt/libb2 >=dev-libs/expat-2.1:= dev-libs/libffi:= + dev-libs/mpdecimal:= dev-python/gentoo-common >=sys-libs/zlib-1.1.3:= virtual/libcrypt:= virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) + ensurepip? ( dev-python/ensurepip-pip ) gdbm? ( sys-libs/gdbm:=[berkdb] ) kernel_linux? ( sys-apps/util-linux:= ) ncurses? ( >=sys-libs/ncurses-5.2:= ) @@ -71,7 +72,12 @@ RDEPEND=" DEPEND=" ${RDEPEND} bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils ) + test? ( + app-arch/xz-utils + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) valgrind? ( dev-debug/valgrind ) " # autoconf-archive needed to eautoreconf @@ -79,7 +85,7 @@ BDEPEND=" dev-build/autoconf-archive app-alternatives/awk virtual/pkgconfig - verify-sig? ( sec-keys/openpgp-keys-python ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) " RDEPEND+=" !build? ( app-misc/mime-types ) @@ -116,25 +122,22 @@ src_unpack() { src_prepare() { # Ensure that internal copies of expat and libffi are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die local PATCHES=( "${WORKDIR}/${PATCHSET}" - "${FILESDIR}"/${PN}-3.10.3-libressl.patch - "${FILESDIR}"/${PN}-3.10.14-libressl.patch + "${FILESDIR}"/${PN}-3.12.4-libressl.patch ) default - # https://bugs.gentoo.org/850151 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die - # force the correct number of jobs # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs) - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die eautoreconf } @@ -173,33 +176,33 @@ build_cbuild_python() { mkdir "${WORKDIR}"/${P}-${CBUILD} || die pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. - PYTHON_DISABLE_MODULES+=" _ctypes _crypt" \ - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" # Avoid as many dependencies as possible for the cross build. - cat >> Makefile <<-EOF || die - MODULE_NIS_STATE=disabled - MODULE__DBM_STATE=disabled - MODULE__GDBM_STATE=disabled - MODULE__DBM_STATE=disabled - MODULE__SQLITE3_STATE=disabled - MODULE__HASHLIB_STATE=disabled - MODULE__SSL_STATE=disabled - MODULE__CURSES_STATE=disabled - MODULE__CURSES_PANEL_STATE=disabled - MODULE_READLINE_STATE=disabled - MODULE__TKINTER_STATE=disabled - MODULE_PYEXPAT_STATE=disabled - MODULE_ZLIB_STATE=disabled + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes _crypt EOF + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + # Unfortunately, we do have to build this immediately, and # not in src_compile, because CHOST configure for Python # will check the existence of the --with-build-python value # immediately. - PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake + emake popd &> /dev/null || die } @@ -251,6 +254,22 @@ src_configure() { -x test_tools ) + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + if has_version "app-arch/rpm" ; then # Avoid sandbox failure (attempts to write to /var/lib/rpm) profile_task_flags+=( @@ -281,7 +300,7 @@ src_configure() { --without-ensurepip --without-lto --with-system-expat - --with-system-ffi + --with-system-libmpdec --with-platlibdir=lib --with-pkg-config=yes --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip @@ -292,9 +311,6 @@ src_configure() { $(use_with valgrind) ) - # disable implicit optimization/debugging flags - local -x OPT= - # https://bugs.gentoo.org/700012 if tc-is-lto; then append-cflags $(test-flags-CC -ffat-lto-objects) @@ -303,6 +319,22 @@ src_configure() { ) fi + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + if tc-is-cross-compiler ; then build_cbuild_python myeconfargs+=( @@ -323,7 +355,6 @@ src_configure() { append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw fi - hprefixify setup.py econf "${myeconfargs[@]}" if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then @@ -332,20 +363,6 @@ src_configure() { die "Broken sem_open function (bug 496328)" fi - # force-disable modules we don't want built - local disable_modules=( NIS ) - use gdbm || disable_modules+=( _GDBM _DBM ) - use sqlite || disable_modules+=( _SQLITE3 ) - use ssl || disable_modules+=( _HASHLIB _SSL ) - use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) - use readline || disable_modules+=( READLINE ) - use tk || disable_modules+=( _TKINTER ) - - local mod - for mod in "${disable_modules[@]}"; do - echo "MODULE_${mod}_STATE=disabled" - done >> Makefile || die - # install epython.py as part of stdlib echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die } @@ -354,9 +371,6 @@ src_compile() { # Ensure sed works as expected # https://bugs.gentoo.org/594768 local -x LC_ALL=C - # Prevent using distutils bundled by setuptools. - # https://bugs.gentoo.org/823728 - export SETUPTOOLS_USE_DISTUTILS=stdlib export PYTHONSTRICTEXTENSIONBUILD=1 # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't @@ -416,6 +430,22 @@ src_test() { ) fi + # musl-specific skips + use elibc_musl && test_opts+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + # workaround docutils breaking tests cat > Lib/docutils.py <<-EOF || die raise ImportError("Thou shalt not import!") @@ -439,6 +469,10 @@ src_test() { src_install() { local libdir=${ED}/usr/lib/python${PYVER} + # the Makefile rules are broken + # https://github.com/python/cpython/issues/100221 + mkdir -p "${libdir}"/lib-dynload || die + # -j1 hack for now for bug #843458 emake -j1 DESTDIR="${D}" altinstall @@ -526,19 +560,3 @@ src_install() { ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die fi } - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.11.0_beta4-r2; then - ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.11 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.11/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.9.19_p2.ebuild b/dev-lang/python/python-3.9.19_p3.ebuild index 5a38252..73dca70 100644 --- a/dev-lang/python/python-3.9.19_p2.ebuild +++ b/dev-lang/python/python-3.9.19_p3.ebuild @@ -45,6 +45,7 @@ RDEPEND=" app-arch/xz-utils:= >=dev-libs/expat-2.1:= dev-libs/libffi:= + dev-libs/mpdecimal:= dev-python/gentoo-common >=sys-libs/zlib-1.1.3:= virtual/libcrypt:= @@ -116,7 +117,6 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" "${FILESDIR}"/${PN}-3.9.9-r1-libressl.patch - "${FILESDIR}"/${PN}-3.10.14-libressl.patch ) default @@ -215,6 +215,7 @@ src_configure() { --without-lto --with-system-expat --with-system-ffi + --with-system-libmpdec --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip $(use_with debug assertions) |