From d6ca4e4f90cb75c323b5988eefa96a04c0d36908 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 20 Jun 2024 00:10:57 +0100 Subject: gentoo auto-resync : 20:06:2024 - 00:10:56 --- dev-lang/Manifest.gz | Bin 21963 -> 21965 bytes dev-lang/algol68g/Manifest | 2 + dev-lang/algol68g/algol68g-3.5.4.ebuild | 41 ++ dev-lang/interprolog/Manifest | 2 +- dev-lang/interprolog/files/build.xml | 45 -- dev-lang/interprolog/interprolog-2.1.2-r3.ebuild | 60 ++ dev-lang/pico8/Manifest | 8 +- dev-lang/pico8/pico8-0.2.5g.ebuild | 57 -- dev-lang/pico8/pico8-0.2.6b.ebuild | 56 ++ dev-lang/python/Manifest | 25 +- dev-lang/python/python-3.10.14_p1.ebuild | 508 ----------------- dev-lang/python/python-3.11.9.ebuild | 539 ------------------ dev-lang/python/python-3.12.3.ebuild | 537 ------------------ dev-lang/python/python-3.12.4.ebuild | 574 ------------------- dev-lang/python/python-3.13.0_beta1_p1.ebuild | 566 ------------------- dev-lang/python/python-3.13.0_beta1_p2.ebuild | 643 ---------------------- dev-lang/python/python-3.13.0_beta2.ebuild | 668 ---------------------- dev-lang/python/python-3.13.0_beta2_p1.ebuild | 668 ---------------------- dev-lang/python/python-3.13.0_beta2_p3.ebuild | 652 ---------------------- dev-lang/python/python-3.13.0_beta2_p5.ebuild | 671 ----------------------- dev-lang/python/python-3.13.0_beta2_p8.ebuild | 659 ---------------------- dev-lang/python/python-3.8.19_p1.ebuild | 430 --------------- dev-lang/python/python-3.8.19_p2.ebuild | 2 +- dev-lang/python/python-3.9.19_p2.ebuild | 490 ----------------- dev-lang/tuprolog/Manifest | 1 + dev-lang/tuprolog/tuprolog-3.2.0-r3.ebuild | 88 +++ 26 files changed, 255 insertions(+), 7737 deletions(-) create mode 100644 dev-lang/algol68g/algol68g-3.5.4.ebuild delete mode 100644 dev-lang/interprolog/files/build.xml create mode 100644 dev-lang/interprolog/interprolog-2.1.2-r3.ebuild delete mode 100644 dev-lang/pico8/pico8-0.2.5g.ebuild create mode 100644 dev-lang/pico8/pico8-0.2.6b.ebuild delete mode 100644 dev-lang/python/python-3.10.14_p1.ebuild delete mode 100644 dev-lang/python/python-3.11.9.ebuild delete mode 100644 dev-lang/python/python-3.12.3.ebuild delete mode 100644 dev-lang/python/python-3.12.4.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta1_p1.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta1_p2.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta2.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta2_p1.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta2_p3.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta2_p5.ebuild delete mode 100644 dev-lang/python/python-3.13.0_beta2_p8.ebuild delete mode 100644 dev-lang/python/python-3.8.19_p1.ebuild delete mode 100644 dev-lang/python/python-3.9.19_p2.ebuild create mode 100644 dev-lang/tuprolog/tuprolog-3.2.0-r3.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index 93869bcaa80c..f19192edaebd 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/algol68g/Manifest b/dev-lang/algol68g/Manifest index 603cabb8674a..4a9dca3e3ce3 100644 --- a/dev-lang/algol68g/Manifest +++ b/dev-lang/algol68g/Manifest @@ -2,7 +2,9 @@ AUX algol68g-3.3.21-configure-implicit.patch 236 BLAKE2B e59d1e65f6d1b83ac1bb43f DIST algol68g-3.5.1.tar.gz 661670 BLAKE2B ec0aa47f367af621f3cf8ebad81bd501bac31238b4a918943917fec4d9f66cf57f98f5bd4c4c02d315a8f1ac2fd789aafb6e331289fac417abf9301a2a5d339d SHA512 764038c7db567d5fc130d4c324b74f43d7dbcfd89efb7b12b1a6983314a7e13f17e105fa783fb3397fff3773b69699ca3f5fd3be873229db9bf91582f7bf52f4 DIST algol68g-3.5.2.tar.gz 664147 BLAKE2B 894d19a01a68613b2d4f3f5aeb10e1a72a87b50ee044c7791880f2e1ac7ef067377e7790009d339941fea3f6c93a13b3d85aac907789fecb5b9044e493d7dcfe SHA512 3bd46d1034cd771086981bc2e2004cca199cf13e8840fb867d66fe8ac63af06bbc8976decd46dea1bec9b64b38bbdb878582c5244fcd893695da19a5f84d924f DIST algol68g-3.5.3.tar.gz 664147 BLAKE2B d7052104650fdbbed6014f7a1b01d7bc037d44061ebbf91a46abc6d7bab5865c94a254881bb3915e59676b0fee98dd378a1d90f5cd39ea2369433ad7c425ebb8 SHA512 64758bffaa3275b20ea6a078f1db0a29527030e5dd069fba03a1dc8b3c51c6dc8bb0ad53317c66aaf5904b4c3aed3246dc4edd6ee7a1f0a38c61def5c397c52c +DIST algol68g-3.5.4.tar.gz 664208 BLAKE2B b8e2bcc53cf3cc7254da37f1d5655ddc4f79564c51608fea374da25bc828c34056284f2a48e4ada92202f866c38326c1323aa9803bbbb0be22d3a682767c24fa SHA512 0cedce2c2cb4c8d7de91ef022ade38c2040d8fcd02c747226721a016f1c5ae9a9249314370ac6466be2fdba34f7602ab0954e05dbf20d7af1e68a04059270a5c EBUILD algol68g-3.5.1.ebuild 946 BLAKE2B 7826e7dd8c13921585c3056103f6ad3e241e1599e45ed7854fd1f2da334d057bd5c92d6178491387cbdf391b7bc3bda1d2f1ca1eb458a0eb2d1b4251157ef29d SHA512 509e4b99469fcf59a74871f4d5f28ec22d2b6ae6c361abfa9305ef666580f27154cd33ffa3c923df665229c581bb56d8a57f33d16dc0d0b546cf1509cf6f1d39 EBUILD algol68g-3.5.2.ebuild 947 BLAKE2B 87f8a18c197e751b44821dcf82b8c262d8430caa080e2f3a742771b583a94d99b6e072c109d7c66738dce198a03de3c3fecc8fac9f45a504b0d9508fa3d07688 SHA512 d2e9d150e89e830205f4a9f7c406c40ccce9399a89499f8757b0ff1e3651143333f2577b0a4eb6b388a706b14a884023f562bf4a0c018c41bd50cff9c52ac7a3 EBUILD algol68g-3.5.3.ebuild 947 BLAKE2B 87f8a18c197e751b44821dcf82b8c262d8430caa080e2f3a742771b583a94d99b6e072c109d7c66738dce198a03de3c3fecc8fac9f45a504b0d9508fa3d07688 SHA512 d2e9d150e89e830205f4a9f7c406c40ccce9399a89499f8757b0ff1e3651143333f2577b0a4eb6b388a706b14a884023f562bf4a0c018c41bd50cff9c52ac7a3 +EBUILD algol68g-3.5.4.ebuild 947 BLAKE2B 87f8a18c197e751b44821dcf82b8c262d8430caa080e2f3a742771b583a94d99b6e072c109d7c66738dce198a03de3c3fecc8fac9f45a504b0d9508fa3d07688 SHA512 d2e9d150e89e830205f4a9f7c406c40ccce9399a89499f8757b0ff1e3651143333f2577b0a4eb6b388a706b14a884023f562bf4a0c018c41bd50cff9c52ac7a3 MISC metadata.xml 665 BLAKE2B 2b9b283f86666d64dd77164c5afb0d76403c63f9f0dfac3170eb2ade95bcc382b09d14248cb720edf7c1b055e78ca5ca0017b6784caf4381d970a011301058bd SHA512 b3171d505f9f9e4dcdd5b5a0c6d302849fa017538402832dd3db205c48c68a39867089aae4d1f3c158a45bfc170b21f83789cba16511f251d70300020e102b0a diff --git a/dev-lang/algol68g/algol68g-3.5.4.ebuild b/dev-lang/algol68g/algol68g-3.5.4.ebuild new file mode 100644 index 000000000000..6689c5616025 --- /dev/null +++ b/dev-lang/algol68g/algol68g-3.5.4.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Algol 68 Genie compiler-interpreter" +HOMEPAGE="https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html" +SRC_URI="https://jmvdveer.home.xs4all.nl/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+curl +gsl +mpfr +ncurses plotutils postgres +readline" + +RDEPEND=" + curl? ( net-misc/curl ) + gsl? ( sci-libs/gsl:= ) + mpfr? ( dev-libs/mpfr:= ) + plotutils? ( media-libs/plotutils ) + postgres? ( dev-db/postgresql:* ) + readline? ( sys-libs/readline:= ) +" +DEPEND=" + ${RDEPEND} +" + +PATCHES=( "${FILESDIR}/${PN}-3.3.21-configure-implicit.patch" ) + +src_configure() { + local -a myconf=( + $(use_enable curl) + $(use_enable gsl) + $(use_enable mpfr) + $(use_enable ncurses curses) + $(use_enable plotutils) + $(use_enable postgres postgresql) + $(use_enable readline) + $(use_with ncurses) + ) + econf "${myconf[@]}" +} diff --git a/dev-lang/interprolog/Manifest b/dev-lang/interprolog/Manifest index 8af504fab307..14e3a8b87312 100644 --- a/dev-lang/interprolog/Manifest +++ b/dev-lang/interprolog/Manifest @@ -1,6 +1,6 @@ -AUX build.xml 1461 BLAKE2B 97f817f1c8a5594c5b9a0f449046c1c91d6789d27592f421fb0d92d0d21cb30f009d90c99b037900e109d791159ad49d78cd3f5bb99464d35cae0508128c648c SHA512 0e469d954d69db940fdf1893257f20d15d1009148d3979755edd448bc1cda9425df5169f6ddba3e37b8eaccd25f3fbb7bfeb3c58a572111be2474e1850a32cb6 AUX interprolog-2.1.2-java1.4.patch 1341 BLAKE2B b1c02e38f990d8f693a274cb258b18151e5b5d93a8670ae40d2d0b29b25c8ee86c749463b880166d759509331c9bd58d57286f9c62b36ba53673291129d27a09 SHA512 cfd4a637e4d86172547448801c92decfa3f10fa7d02e007c42d8415901d742ecbdf1fca1e4034c7069885a06824f1577bc64f2454a2c31877af68e74ad3aa0d2 AUX interprolog-2.1.2-java17.patch 793 BLAKE2B d1f501918b153ce840887c4b697783a2a5ddd4fece70148c88d761d04891aa5710c3a33c5c14eb22b787ddedb52e852991bac80f3dd9fbe1a3764521d5336cba SHA512 26dc6ebaf903374da09af41b452a7a47af5fbf17d763d837603d5bdd628408b3d7adfddbad375a22f37ffddf66626336c3eac82c36acc0eb2942f07836291d0c DIST interprolog212.zip 1066931 BLAKE2B ea2666ff756c30db35262137938c32ee98d8a145ce59ea3b8694328771b8925395f7643ecabf9e0c010515176fdbbedcd333a81003a09c0ae1d9c1a94215e095 SHA512 e3d8b216f7e76d5d95ad9d27a96720075575fd717c89ddf9403376a72e18d56fd68afa2b1e6e70da55b99cd84043a16695ff37a59ec3366115cd4c36ed1ff50c EBUILD interprolog-2.1.2-r2.ebuild 1122 BLAKE2B 2a5eed55438be7d9942782f4382420077e3f3276c557ecd33c9fc8ab2a20aa73811c68c21c1a3c31209a686f2da7af5dfb2dea423aba1fdc44b2ec48cd3fded2 SHA512 8f722f7031d8eb994dfdfc05309e14ac0e9c2b0a6610bf48d19b9c1d2dab2d80ced5a3d5a19928f4afedc0ab4bddaee27f92b1741d24e293d4057e3254443021 +EBUILD interprolog-2.1.2-r3.ebuild 1125 BLAKE2B 6f80065e7e1983a9c13b90b1650216d712ef028f85a6a700f5772a207f6418d991f6f17e8f4cf077fc52abcb5bf492a1e379013aaa633fa004f6e4f43f57c4bd SHA512 5f49176b5dd9149fcf591196faaa5e3e02627dfe54dd91588ee6e86502a9bf6e2b829a981aa0c412d9e029aed3f16d597802b20b396b215989dc821203af6ac7 MISC metadata.xml 237 BLAKE2B d4347f2b84f6246e0bf64c19548b9bf8ad5094bf392fabb2b5add3bdb2af1e866aa34f67d4dad5fd6595daa79233456e962684b4d062bdc7be1f4ee1ef92d3ee SHA512 525172b6046cff15248158e173c764b9294cf0a8220914ef6b46ca4f15fdb79caca8089cb04ac0b1ca56e2496dc84d1f933b2d56e806007883cbc914a1a4eca5 diff --git a/dev-lang/interprolog/files/build.xml b/dev-lang/interprolog/files/build.xml deleted file mode 100644 index a24536d8936d..000000000000 --- a/dev-lang/interprolog/files/build.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev-lang/interprolog/interprolog-2.1.2-r3.ebuild b/dev-lang/interprolog/interprolog-2.1.2-r3.ebuild new file mode 100644 index 000000000000..f53ed5917e12 --- /dev/null +++ b/dev-lang/interprolog/interprolog-2.1.2-r3.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc" + +inherit java-pkg-2 java-pkg-simple + +MY_P="${PN}$(ver_rs 1- '')" + +DESCRIPTION="InterProlog is a Java front-end and enhancement for Prolog" +HOMEPAGE="https://declarativa.com/InterProlog/" +SRC_URI="https://declarativa.com/InterProlog/${MY_P}.zip" +S="${WORKDIR}"/${MY_P} + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND="app-arch/unzip" + +DEPEND=" + dev-java/junit:0 + >=virtual/jdk-1.8:* + || ( + dev-lang/xsb + dev-lang/swi-prolog + dev-lang/yap )" + +RDEPEND=">=virtual/jre-1.8:*" + +HTML_DOCS=( INSTALL.htm faq.htm prologAPI.htm ) +PATCHES=( + "${FILESDIR}"/${P}-java1.4.patch + "${FILESDIR}"/${P}-java17.patch +) + +JAVA_CLASSPATH_EXTRA="junit" +JAVA_RESOURCE_DIRS="res" +JAVA_SRC_DIR="com" + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean + rm -r htmldocs || die + mkdir res || die + find com -type f ! -name '*.java' \ + | xargs cp --parents -t res || die +} + +src_install() { + java-pkg-simple_src_install + + if use doc ; then + dodoc -r images + dodoc PaperEPIA01.doc + fi +} diff --git a/dev-lang/pico8/Manifest b/dev-lang/pico8/Manifest index 27cd84e2472b..e25fe4d5c9e3 100644 --- a/dev-lang/pico8/Manifest +++ b/dev-lang/pico8/Manifest @@ -1,5 +1,5 @@ -DIST pico-8_0.2.5g_amd64.zip 10812535 BLAKE2B 51d4c8d57db31d12aa767b59901d8058e20302f4082022ae9beab559b4ae83cc241a7785facacfe5f7798198905bedd3fc1d5db5fd2bf00f9991dcef34910ea6 SHA512 e8c1ce4a7840f417a064473a77b2b55ba100a9ae232e8c1af0c4d57687d4d55e209ed5a5c75a5853825cfbe6fb138f2d0f99a3025b0ff6f2f8789dc705aa3f11 -DIST pico-8_0.2.5g_i386.zip 10120868 BLAKE2B 0dd33df665128e0221d6d0200da37e77cfebb20d4af869c2dcbeec0cbb126936d7792821c1f131722ee3b63049764eaec9fc5c230042e0a4aa52ff7515da655a SHA512 1f1aeb1c1f8d0d33ef9e9fc0f9afdf1e3993a877b07178d3260f4608641cfceb601819f31b95cde1b8fcb7d441eb5126bed1e3bcdb8f368b6bcfe5963a089511 -DIST pico-8_0.2.5g_raspi.zip 14411901 BLAKE2B 3a35e40b05fe3d8fc678a3fc97a68db6e315d23475e66f25e1e357abb3fb5411a99db85d3ee0ab6d0385b992555570492a42383aefbe48c57523ca58ee144f91 SHA512 a1bc47618394767e14110a47dfd1346a0437917638d3edb8c17656d7cc49b886cc22c39cc48b5e642a7aad3665d30b1e1307f489d1b5552a178e5207a5616d04 -EBUILD pico8-0.2.5g.ebuild 1274 BLAKE2B 17d952674d214e7cc089a50da5a4a015c477358364a480d92a210e6525412963b1b1ca9f4f83b0703a14da31458bff5bb2d1ccb059035fcf3fd0fc69381315a6 SHA512 a494d3ca4f37fde99371f2518683dadedfaf3395169b280e2fda34e3a1fe7baff61ed1398d186bdd1247049fe8f35686b11ffc854a4be84fbec2e4962f726472 +DIST pico-8_0.2.6b_amd64.zip 12838053 BLAKE2B f7577397d32a3e71866782355cb12b17852beb80a4943e5ada4cb02b4c6ec8777a6a620afca99d98e3f423b82881480725c8dd7fc75eadf3a73b17ca750f9809 SHA512 30e4641138975c8f9f407491c18ab427b603d8986c4a65777dbedb43cef5416d1a8a196ca09230a9abcbc75003e5fd2716289327394d392b4e90c7796f68be9b +DIST pico-8_0.2.6b_i386.zip 12145587 BLAKE2B 3ae5be8bce3d845698e247bf8879d484325af4205d649ef55dd9854a8fce342a5b9744dd77cb0d9839e51e275dd02f19fdaadb06a1d960ea28f93c351ea6be83 SHA512 6982b58abb2d59719a197125e9c4499196a97ec8624b236c553ab6f4bac07b608b650b4d41836eac89651083f22dee819b5f43a57892ecd09adb6d6b3898b492 +DIST pico-8_0.2.6b_raspi.zip 16444282 BLAKE2B 897c8b2c6f2c15a03c297d7a13c61aa08d5c71792aa900f0074127a7f7474a60245751ab4ac759fc088dacae1bd0843ff6007e8c88c67568b50bc3d9546a6879 SHA512 9d46a536ccd34e3e4ff1d62cfcc00b4fe26051d4128c4865f4a252f146ea82c00dd8f8f55e06bea03dc34f49cfacaf8f8509a51b96531d3ef519b0f41eba0023 +EBUILD pico8-0.2.6b.ebuild 1273 BLAKE2B ed84026727a723b60b1e99ad298f74f47c4f2acb285e2437f102cc8c3c560219cf1c969c97cb46b0d787adab2debf7f0e0e3fdad0a5483abf433ad55f1e09708 SHA512 9a53e25711074b203da28502369f15616bf9d6ee54b12b2f450130f4d451e1dcd6e9424ee9aec30152a1b70648c774cffad660a5d2fd750e8ffadecb65ded4ab MISC metadata.xml 751 BLAKE2B 2650dc9ea8acf687d0b9e850485a76e9170e144e8202a0ac07657e919c3726c1106fa5b97a1be892ab53a0edcb63b2261c2d4df409e59b59f3f396b4227d07fb SHA512 32402627f0bed2ef654812fc536a50cd8ce2ae704f09d49f29dbf973da3b8053229791b773b9abd8ee29735a4db3500e3bfb519250abf93886022da8b829681c diff --git a/dev-lang/pico8/pico8-0.2.5g.ebuild b/dev-lang/pico8/pico8-0.2.5g.ebuild deleted file mode 100644 index 844d0a20198d..000000000000 --- a/dev-lang/pico8/pico8-0.2.5g.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit desktop xdg - -MY_PN="pico-8" -DESCRIPTION="Fantasy console for making and playing tiny games and other computer programs" -HOMEPAGE="https://www.lexaloffle.com/pico-8.php" -SRC_URI=" - amd64? ( ${MY_PN}_${PV}_amd64.zip ) - arm? ( ${MY_PN}_${PV}_raspi.zip ) - arm64? ( ${MY_PN}_${PV}_raspi.zip ) - x86? ( ${MY_PN}_${PV}_i386.zip ) -" -LICENSE="PICO-8 MIT BSD-2" -SLOT="0" -KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" -RESTRICT="bindist fetch" - -RDEPEND=" - media-libs/libsdl2[haptic,joystick,sound,video] - net-misc/wget -" - -BDEPEND="app-arch/unzip" - -S="${WORKDIR}/${MY_PN}" - -DIR="/opt/${PN}" -QA_PREBUILT="${DIR}/${PN}" - -pkg_nofetch() { - einfo "Please buy and download ${A} from one of:" - einfo " ${HOMEPAGE}" - einfo " https://lexaloffle.itch.io/${MY_PN}" - einfo "and move it to your distfiles directory." -} - -src_install() { - exeinto "${DIR}" - insinto "${DIR}" - - case ${ARCH} in - amd64|arm) newexe ${PN}_dyn ${PN} ;; - arm64) newexe ${PN}_64 ${PN} ;; - x86) newexe ${PN}_32bit_dyn ${PN} ;; - esac - - doins ${PN}.dat - dodoc ${MY_PN}_manual.txt - - dosym ../..${DIR}/${PN} /usr/bin/${PN} - doicon -s 128 lexaloffle-${PN}.png - make_desktop_entry ${PN} ${MY_PN^^} lexaloffle-${PN} -} diff --git a/dev-lang/pico8/pico8-0.2.6b.ebuild b/dev-lang/pico8/pico8-0.2.6b.ebuild new file mode 100644 index 000000000000..c9c1a8c0905c --- /dev/null +++ b/dev-lang/pico8/pico8-0.2.6b.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop xdg + +MY_PN="pico-8" +DESCRIPTION="Fantasy console for making and playing tiny games and other computer programs" +HOMEPAGE="https://www.lexaloffle.com/pico-8.php" +SRC_URI=" + amd64? ( ${MY_PN}_${PV}_amd64.zip ) + arm? ( ${MY_PN}_${PV}_raspi.zip ) + arm64? ( ${MY_PN}_${PV}_raspi.zip ) + x86? ( ${MY_PN}_${PV}_i386.zip ) +" +S="${WORKDIR}/${MY_PN}" +LICENSE="PICO-8 MIT BSD-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86" +RESTRICT="bindist fetch" + +RDEPEND=" + media-libs/libsdl2[haptic,joystick,sound,video] + net-misc/wget +" + +BDEPEND="app-arch/unzip" + +DIR="/opt/${PN}" +QA_PREBUILT="${DIR}/${PN}" + +pkg_nofetch() { + einfo "Please buy and download ${A} from one of:" + einfo " ${HOMEPAGE}" + einfo " https://lexaloffle.itch.io/${MY_PN}" + einfo "and move it to your distfiles directory." +} + +src_install() { + exeinto "${DIR}" + insinto "${DIR}" + + case ${ARCH} in + amd64|arm) newexe ${PN}_dyn ${PN} ;; + arm64) newexe ${PN}_64 ${PN} ;; + x86) newexe ${PN}_32bit_dyn ${PN} ;; + esac + + doins ${PN}.dat + dodoc ${MY_PN}_manual.txt + + dosym ../..${DIR}/${PN} /usr/bin/${PN} + doicon -s 128 lexaloffle-${PN}.png + make_desktop_entry ${PN} ${MY_PN^^} lexaloffle-${PN} +} diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 79052a1372bc..55a0e6fe1b12 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -22,41 +22,18 @@ DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f 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.12.4.tar.xz 6056 BLAKE2B 8e8caa52f5725aaed08e8442609bec45b11c63d5f29f8fdb302416716bf77ef1bb7fe5e9d14bab12517dabd01dc06172fe11b176326291b19785a8b1d74ee9b9 SHA512 d2fd747f81a3812f5d4a0d281ac336a43961abcf4a4e503564fa3b5d33c0312a6c7148c6f516f5c4c917432c63488615161a847ccb6539a457406b82f1661a24 DIST python-gentoo-patches-3.12.4_p1.tar.xz 7088 BLAKE2B 450b95539aaf7c8c052ca1bbcab3b1a8f1c33e8007b6c66cc290c33d88cac8bad346e13cf96508834599a59ccb6548e6dd8cbfb1e24d84539f502101b04299d0 SHA512 df874cb1d8d0f5df60fca82daa2a59cbcfeba6be72b021101a753306a09bb19ee268681b3fdb39659be923d868c727bf7aabbe8173cfd48a329c66f4727353c7 -DIST python-gentoo-patches-3.13.0b1_p1.tar.xz 5480 BLAKE2B 830370b56bd662b10dd4423f1e758da79c61d535a18b35496e09d864642873449a13738da8e042b94c58e8e300ac7c003088be69e27467dd024daf54b6a34c22 SHA512 d696c96263ca51f611d508ee644f7254d2607236e829946c35dc6a6977eafa98748fa807b36d40d5e32f278db3493876b2214b4e2bb1ceb4deaa1fbb8fb2c052 -DIST python-gentoo-patches-3.13.0b1_p2.tar.xz 9300 BLAKE2B 63179b01623c6677363c4d1c2f7890e81defd4ca451259b66eff79c92bee68a92a0a33893801fabd8af2e9f07fe1bbd985a494a9ac3fe4662f9db6dc346db418 SHA512 29b29975571abe7dc4269f8b758bf825b431adc7e72bceb42eb801d35bc2eea4f11adea96c8742a0cc273b718b3a632a1051bac1d2d45e40aa419d0f624cf1f6 DIST python-gentoo-patches-3.13.0b1_p3.tar.xz 11056 BLAKE2B ef932bac59d2316ee8fe638a3d34ce247ff587915546038627674cd4c03179998a58336f8ebae45f1fcc94c8059d61ff6f22693f25ace1462bce275f50bfb48f SHA512 956e3da7376d60d7a593af50fff9842016a3b193180e93ab8298756c9eedfb2aaf8c1287bb75111e6340b5bac20a12dcb00ef51ecf0e12ef9ae5c98202fb071b -DIST python-gentoo-patches-3.13.0b2.tar.xz 5276 BLAKE2B 047e0362c328ca7545d7b0a86476f95eeecb381b979284a779788c451000e9fe0e1d31461865cd8f818be203b72404f9d810e5baf479a89c6dccc6db7501719a SHA512 43d3ef8e558309d2d93ce6d473eaecfc5359515067a861303b0f085eeb741265d4d071112dcaf55c0d38707c27df35398d3e6310fc1e522debeaaa1e5e8b55b4 -DIST python-gentoo-patches-3.13.0b2_p1.tar.xz 9300 BLAKE2B 1aad8a19a5c237dc0dd67dd3f83116009e1d78f0e3d63780c463e418f22b5f1a4d50035fff8a80ac24b4d5fbcac281fc766fd3e86428d3c3041b5df3f5a518fc SHA512 bc09bdd4bc9716c83d580307af6d30f149894912ad2dbbf02274c88be82f67653aada0a8d16199d85418b1237ecff7c5e41352c759a31b807e7011089ebbbc20 -DIST python-gentoo-patches-3.13.0b2_p3.tar.xz 10216 BLAKE2B ecc5c82ab17a4874ac8f8694fd76bd9401926a164c8ba38578da3c153138921463d07788e5bbcd5a87bc1d31703c4f06b193003bdb098ff6f07ff93178299113 SHA512 79d19cad2b497a315ecd923e995a99b22b132fb13239592ab73716ff1c799da8d371106f57f597eac44a5958d13e5bc7ce4c8bf4c160b6b219ad59b23da99298 -DIST python-gentoo-patches-3.13.0b2_p5.tar.xz 10616 BLAKE2B e80e96270fcf5d102a1c9f71eae1917387776fdfd32495117cb8854778457e5443c6293fc6af139483ba8339503a7c7f8da8db50f6a95940892ae769f2661d9c SHA512 b281438577bf56a0e1518541d760d9ceaa3c5e5e5619a8a7692ba2ca6cd94ddde3b8fa0132e2c590165fddeb3df88971c1842bc72bace92484cacfa254c5ce86 -DIST python-gentoo-patches-3.13.0b2_p8.tar.xz 10932 BLAKE2B 8d9fb4253af8694f89582da91eeb6707ca5646f506f768da10a7a6b8b85b2d622bc4cec829cfe0b02939b94b725e905bfeef9a044f58598ce8fd97216d5d7d63 SHA512 01d85ec6eaf60eaaee6de6358a0d1498f72e236d800820c15a55423a97ac7579805f3045d82e398c9da914567df250afeb4a643acc12df8f1eabab5f350163fc DIST python-gentoo-patches-3.13.0b2_p9.tar.xz 11288 BLAKE2B e46bac845ce54e32446316b8a5e055905f023e88ad7fb9cfed101f0fccf6c0fef2fb9fd5b7dc4b15ec1e6c075ceaa9f07777c3cfede0f88412871beac0a54e47 SHA512 4148342d649acd98cce1f3d3c7bdbf4adad069ba555624882ddb69f00ee0e64641014086b5e60d97eac809ccb1e3e782a112eb58d7bb83bcfa3222811cbb8682 -DIST python-gentoo-patches-3.8.19_p1.tar.xz 35008 BLAKE2B 8771e3a2329577659a4ff64987f2500b7dc4f07f78677b823c8f11e7a9e7fc0369cc127e6ad1f1000986937b7811467bd22ba02129a754246658f99b7219a4a7 SHA512 470c125e8df23c1db358c2f7bbf5ac3b28e76fb843364f7fd5aa2fd399ac9b01a2ddfc2c1765f91236c71712941d19f273fb21f960239f79a0263b5b47081d46 DIST python-gentoo-patches-3.8.19_p2.tar.xz 35524 BLAKE2B a6b81e6ae907b60eea676cb65a9c693e62453dc44616baaadb294c5782a195c20eff6c2869b38ea110fe06e9e511468f4ab0c3d1811b16e0ab2833f9dc09b25b SHA512 9944c330b6062c2ac6e13fcfbc1c8835dfd078f6744cdfbc03ba787ae97c08bdae559cefadafe9dfe9be9c31f8c15ee895599b266d870f73c06a2f4b15c78dc3 -DIST python-gentoo-patches-3.9.19_p2.tar.xz 27684 BLAKE2B a69f00548c153da7b13dfeccb332d3d67ecf649fb5ae054590492f3e2fc2c84b78ebaf90bcf9738157c9022778e5bf2a6b4fb6a99e996dcb63859dcf6f84af23 SHA512 552a5f2d89307d4193d76df5a2cf1deb4bd5c8ad9ec81e6768987f1649f6571a318e68b92d8f8ecdba12bfe9c5f1a427a4cc577e6aaebf7748027cc50e412804 DIST python-gentoo-patches-3.9.19_p3.tar.xz 28240 BLAKE2B 35c70b1f9a590abe9a74795f478ab788cd72c96e9d84f2756685e61324dc4203148e71b00a236bb4af8fb8315e3582ecec255b39749a653e0511d4a9f9fef725 SHA512 6b8f4dab4aa7d4d646ee4091b5cf76bbc8896d4299a3623660a2c5fec06c0cf56c0a50ac87604885cd155141bc85e0e80acdbedb7b34a813901aad021b9b8ab2 EBUILD python-2.7.18_p16-r2.ebuild 8603 BLAKE2B 6a2ee7f1a5d0eae487cf0293fb2528c97679d0fb395cd51f00a08ede8abb473f3e16051c8b7b797a99c4462d520955c01b1b0d238caf0652a3166034bed60839 SHA512 e498d3f4904e2cf2de6a6d0beb8e573a462bc96970c861616bd12956434154146e1625ea36b44f984b82f3d6cc90b33860b71c4067002b7f96510eb5e632e572 EBUILD python-3.10.14_p1-r1.ebuild 14742 BLAKE2B 52b80ddc253a2c2d60422af667dd04519404b6b1ed979fa0992b95dd471449ec1dcac814f49aa38cc0d7fcf6af5ed40035f8801cd2fc988865b61430dd511461 SHA512 272d8889f14ed94e72140afbc650b502b7f5a881ff681c760e307b2eb873679ae105fd87af3097c69eaef2b4a396fe7673505e1a0fd6ea4220d40a6a589d00a1 -EBUILD python-3.10.14_p1.ebuild 14029 BLAKE2B a75f0cad3d531e041636974296d1fc2d9c8ec3f3032be20f32edfa4c2b0ab8fcceec9e144722f640e23e29e38fafd72810dfe37046c66b0a66ebc26a0f7280bb SHA512 a1885c8b00cf8a2542f971381dfe4de4ceef5773f00c33017eadff15e14fce4460bcd2b0f3106de0decb91b7613456eb3ee668a05d5db13e2d72dec8fe7d960c EBUILD python-3.11.9-r1.ebuild 15854 BLAKE2B f0c4576472eeea91a436eb64a0555a6db1125370bb0a586aa520e76047d8615603e23b8fb415fe86ed19ecd29038ae5bc7354e7d33c1bcd004ab82f62b5391dc SHA512 57cbe71b9d90e2fe06d28ad0fdee30da1d0ae9dbc4163e15b98f78069a7a7bb0a4312d8caa26fe23e74234c73f0b48409d77b28e40f47bf83667e7717d36fe32 -EBUILD python-3.11.9.ebuild 15141 BLAKE2B 26a6359f2ed875e5a9cb470868244b9f7fa66cb3b67b1c19e9f9b68a574651398868d47cf7e2cb05ffff3897b633adb97d7ef2facf8774f8f81c7a169da2d019 SHA512 2f3220403e8c21b2dbafb3c611e4d38bc22b75ee4b95eef8bc2247ed9781167e1c9e660bf09094f8301264319a9a6eb782e6070391e6a941ba1b07e591da37a2 EBUILD python-3.12.3-r1.ebuild 15415 BLAKE2B eccb47a2bea4df5bf3d1116afa348ddb87ed03f7031e5742ecf8e06cb875bb6a79f800313ca4ac7ed1cbae81de65f8aaf80616a1e423d8362480447b33860348 SHA512 4c9423cf3c24f4cc2dd095a7340277c0b119dcc95281cc08e23019ef6d9478af77b9b1961dedbac2709cc05923dcc6c1ac5ef1727106068431d21a9e8613aa21 -EBUILD python-3.12.3.ebuild 14702 BLAKE2B e4dbc9370a9d846754b89cf13ec6db2674364061080dbc6cfe60faa8350e70772b31502bf650ae31aad4204b907095de07db201431afe6dcdc1f2973ddf0b603 SHA512 5446caf7a5aaba96604b5de6424ff359d190ed850eea7f035a3412f816388140aca01cbaba65d245db493f38cd0f2ecdbb8bc39c34e3921657ec0e091977e77d -EBUILD python-3.12.4.ebuild 15505 BLAKE2B 5d39107bf5ab825d41cfae4e7285f85c13a3b80d7bba516902dd49ef13f6d155e86519de25a2ce209b9b009dc56822d71e9469d299d0ac8d25bed2a4e53a6cad SHA512 2f3fd4f68dba76f229b5baec5f929e612b7cad815d2711ade4cb3b51aeb3f701f2a6a41484934f92cfb16afb5d88edb12ee1da81453a82b9431be9413fcfc8b4 EBUILD python-3.12.4_p1.ebuild 14884 BLAKE2B 03c95778d4d3b4d9644f14ed57ee593517894a97b9640124b1a63eb8024644dbe45888a8f605f23647954df7e62b494e6c338a66ef6f00801c7daa97c28324cc SHA512 8dae142c2b98ca70061174f904fe3af1ff74fd3007c458a8126711130d4c527652a480645ea3b705f5eba81ac958adbcd70bf529ca079a69eef243dc709a7d7c -EBUILD python-3.13.0_beta1_p1.ebuild 15551 BLAKE2B 4c92847ac19dc66bf6093bb1207c4e83d821af861817b9b15794639d3dbbfa51991c64bd02edca652413aee31a1c663c50862564d563814d34a6a07922e2cb5a SHA512 1f0876376a13bd96f2e4c68b56ae6cf0155c6702609c532225c13c339dec79bf92a245d60230237c790f787814c48db1e3bffcc9b5eb0f46eb8ef590e906f22c -EBUILD python-3.13.0_beta1_p2.ebuild 16998 BLAKE2B 5b554cedf13960c02c8fb5b597a290471887475a1ace7063857f42f1c3dd32d9d3af777b054851968aefcec8ba3f82db479853365deec28884fafbef1b6bf155 SHA512 069a0df320ab10b36519bafd93388e82d828bc10084735f47da21b0f5480c48bb08f8b57d2b785dc38ecfa3a0ef2d1d65e87ccf4fff904290b0e81867e3d0c60 EBUILD python-3.13.0_beta1_p3.ebuild 17346 BLAKE2B 83266bc2fb4b68f001c6669b02c83909ec1eb2cb1dfc69f5a14a9a33fcbeba76c3bf6068f1b38a5ba8d3e64dfa9e04df896b4cdd51d149e94f843ffcd61d51e5 SHA512 0ba4fdd9d5531f045565c8da01e9e1a455160e4d1767b7e3f4a5f667cc300e8b1a9fb47023ca2f3b4b64a54b346648cdd56fd200bbd9be71712757de9680059d -EBUILD python-3.13.0_beta2.ebuild 17346 BLAKE2B 83266bc2fb4b68f001c6669b02c83909ec1eb2cb1dfc69f5a14a9a33fcbeba76c3bf6068f1b38a5ba8d3e64dfa9e04df896b4cdd51d149e94f843ffcd61d51e5 SHA512 0ba4fdd9d5531f045565c8da01e9e1a455160e4d1767b7e3f4a5f667cc300e8b1a9fb47023ca2f3b4b64a54b346648cdd56fd200bbd9be71712757de9680059d -EBUILD python-3.13.0_beta2_p1.ebuild 17346 BLAKE2B 83266bc2fb4b68f001c6669b02c83909ec1eb2cb1dfc69f5a14a9a33fcbeba76c3bf6068f1b38a5ba8d3e64dfa9e04df896b4cdd51d149e94f843ffcd61d51e5 SHA512 0ba4fdd9d5531f045565c8da01e9e1a455160e4d1767b7e3f4a5f667cc300e8b1a9fb47023ca2f3b4b64a54b346648cdd56fd200bbd9be71712757de9680059d -EBUILD python-3.13.0_beta2_p3.ebuild 16725 BLAKE2B 967a55ba5591c33be1b9b4d39ca0007be199067a0f5cfd623b569611d3313fff204cc6085ede9d9edf81f8fbe6db36720dd04620fd02a5ac42df198a80cb636b SHA512 bc292633c662c68a931f64d2c3ebd6dcc2cb9a75fe6e52c8af0df223be666116a2d6e8d8591159e86f5757d11e0a28060e2f0d9287083e12ec8da806cc64f0a9 -EBUILD python-3.13.0_beta2_p5.ebuild 17447 BLAKE2B d8c51797d0e8ac2fa406f619cafb4e5d4efdb7a42e27e134a5f3ad3c5ca5b5f319dce1fe8e7f91a9fc7c628e343a3539d94e6299a5404d0be29d0d9d3899e42f SHA512 ce63ffb70ca4dd1d0b0dc2f994118106aca6c8c1c11775e345c37c1a401e86e6a0c6e8aca67012414724e43c64e9fd633fb1d43e0cc90933fda02f529a127be2 -EBUILD python-3.13.0_beta2_p8.ebuild 17108 BLAKE2B 1f22231f8246ff3c78b119b3ff8b574efac464bf25a9a82ff7eedd7632acb52d4457b586b50d23f0c06e15618f733daf4691a08cf54db2ff700e4f39d85295fd SHA512 ca0b2941ea726c1d03cd39f7bd434ce994669d79fec7bdfd2a7d06c7fc8c620bd0fbbe8e78c7ac4ba4903c9d95058e2a397c2d7960f547248e35764785aad86a EBUILD python-3.13.0_beta2_p9.ebuild 17108 BLAKE2B 1f22231f8246ff3c78b119b3ff8b574efac464bf25a9a82ff7eedd7632acb52d4457b586b50d23f0c06e15618f733daf4691a08cf54db2ff700e4f39d85295fd SHA512 ca0b2941ea726c1d03cd39f7bd434ce994669d79fec7bdfd2a7d06c7fc8c620bd0fbbe8e78c7ac4ba4903c9d95058e2a397c2d7960f547248e35764785aad86a -EBUILD python-3.8.19_p1.ebuild 12170 BLAKE2B bb93535f4876869a58622df01f0c4d4ee4eead693604b9b195965d67933760e3911ab983b4cf1f75f5548b3b228b3353405b4e9029f1434e0e6a91bd01a00fee SHA512 69afe727c59cdb5f8a64c6d6c11ab45c28c8eefad53355d933558573fcdd8dbb6c69f658c5f8f85068bd42200a6f067ed85761afbe3260f45b77874b6761484c -EBUILD python-3.8.19_p2.ebuild 12223 BLAKE2B 1ae9ffccf733151b0bba3d57c06c3a826118aff93c2b0262f5b440867782c36ea96153aed359a97319d7291aaf3f7b1bce6b99460a284e83df5121092e79cdc6 SHA512 783f17579b95bfbfcd687577d481ed85cd2d6d63ed30fe351e280ffa156f99dca17175824feb09a4da725232e151cdb3a00b222ee988cf498e885de4170e82a7 -EBUILD python-3.9.19_p2.ebuild 13620 BLAKE2B 25ef087c8e4fccf9d2e52fb7b4ba08f3cfe6582d40ab820289a069f54cd06ab2b7a1ec20ff16283485834e73dca0651136d4206bf2ad7b6bbd316542d5ed82fd SHA512 98a73032aad45f9ca6058f7dcd88617554afb1083149b877a858d62d2f4085fdb675b9a22bbf7f08d0029dc6ef0bc1ad2f31c747b5800a65bb4a6b933c85e8d3 +EBUILD python-3.8.19_p2.ebuild 12217 BLAKE2B ff0dc6d1012257d77cdac44a2c3b022ec6c06564a4f2bbf871450efd17d9486ee36af14d57fd338adfc9fdf96d43b880cd5b12f4f73bf2008b52e34fbd0e7459 SHA512 d61c2155ee1332be4c0bc799a306efd7b2ea0655ab1ec957446c9711b798bbee0d4815c5e4fb9da325d1c20dbe820ff03f58b7ff4e825a770f78a00706754062 EBUILD python-3.9.19_p3.ebuild 13667 BLAKE2B c1579e1d0395e677834ce1891f4de07abf4b5156d1e150d2f04dfd5a5a21afa4dde9e5800dc7ba591c3c5d51267c64c60f4ece3b31f583bb320841ce89c649f4 SHA512 9df7d256591e73d71d6b8e3a637d737102ae809534c62d92b69a9fad8cb1ad693730398f5392f03fa5a194c7259143d1e83fdc6bcd872599f322269108af4e66 MISC metadata.xml 1562 BLAKE2B d89ba32e0a261cfa3f185881f83a8bd9434aba2029aca437419d625ed3d025fc3226d4440dfdc34c1c64c42448bb00f903b88d80ac06f2bddf8dd58a7aa66673 SHA512 3fb20f7648db7a5d7080bb9e439b39f90cd0f56bfa24d0b97b9d7966c1062951b9d9d1cea9ec557d7db065cbd53c8a394503616d807b2ea4c5a3ea2c806c0ff2 diff --git a/dev-lang/python/python-3.10.14_p1.ebuild b/dev-lang/python/python-3.10.14_p1.ebuild deleted file mode 100644 index c3099177affd..000000000000 --- a/dev-lang/python/python-3.10.14_p1.ebuild +++ /dev/null @@ -1,508 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit prefix python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~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 -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - valgrind? ( dev-debug/valgrind ) - test? ( app-arch/xz-utils ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - verify-sig? ( sec-keys/openpgp-keys-python ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # https://bugs.gentoo.org/850151 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs) - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 and bug #864911. - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross. - --without-lto - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. - PYTHON_DISABLE_MODULES+=" _ctypes _crypt" \ - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Avoid as many dependencies as possible for the cross build. - cat >> Makefile <<-EOF || die - MODULE_NIS=disabled - MODULE__DBM=disabled - MODULE__GDBM=disabled - MODULE__DBM=disabled - MODULE__SQLITE3=disabled - MODULE__HASHLIB=disabled - MODULE__SSL=disabled - MODULE__CURSES=disabled - MODULE__CURSES_PANEL=disabled - MODULE_READLINE=disabled - MODULE__TKINTER=disabled - MODULE_PYEXPAT=disabled - MODULE_ZLIB=disabled - EOF - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the Python it was pointed to - # immediately. - PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - export PYTHON_DISABLE_MODULES="${disable}" - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - -x test_gdb - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - ) - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-ffi - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # disable implicit optimization/debugging flags - local -x OPT= - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - if tc-is-cross-compiler ; then - build_cbuild_python - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}" - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - hprefixify setup.py - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - # Prevent using distutils bundled by setuptools. - # https://bugs.gentoo.org/823728 - export SETUPTOOLS_USE_DISTUTILS=stdlib - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.11.9.ebuild b/dev-lang/python/python-3.11.9.ebuild deleted file mode 100644 index 0b7d97cc23bc..000000000000 --- a/dev-lang/python/python-3.11.9.ebuild +++ /dev/null @@ -1,539 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit prefix python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~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 -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - verify-sig? ( sec-keys/openpgp-keys-python ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # https://bugs.gentoo.org/850151 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs) - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. - PYTHON_DISABLE_MODULES+=" _ctypes _crypt" \ - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Avoid as many dependencies as possible for the cross build. - cat >> Makefile <<-EOF || die - MODULE_NIS_STATE=disabled - MODULE__DBM_STATE=disabled - MODULE__GDBM_STATE=disabled - MODULE__DBM_STATE=disabled - MODULE__SQLITE3_STATE=disabled - MODULE__HASHLIB_STATE=disabled - MODULE__SSL_STATE=disabled - MODULE__CURSES_STATE=disabled - MODULE__CURSES_PANEL_STATE=disabled - MODULE_READLINE_STATE=disabled - MODULE__TKINTER_STATE=disabled - MODULE_PYEXPAT_STATE=disabled - MODULE_ZLIB_STATE=disabled - EOF - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - PYTHON_DISABLE_MODULES+=" _ctypes _crypt" emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - -x test_gdb - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - ) - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-ffi - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # disable implicit optimization/debugging flags - local -x OPT= - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - hprefixify setup.py - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # force-disable modules we don't want built - local disable_modules=( NIS ) - use gdbm || disable_modules+=( _GDBM _DBM ) - use sqlite || disable_modules+=( _SQLITE3 ) - use ssl || disable_modules+=( _HASHLIB _SSL ) - use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) - use readline || disable_modules+=( READLINE ) - use tk || disable_modules+=( _TKINTER ) - - local mod - for mod in "${disable_modules[@]}"; do - echo "MODULE_${mod}_STATE=disabled" - done >> Makefile || die - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - # Prevent using distutils bundled by setuptools. - # https://bugs.gentoo.org/823728 - export SETUPTOOLS_USE_DISTUTILS=stdlib - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.11.0_beta4-r2; then - ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.11 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.11/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.12.3.ebuild b/dev-lang/python/python-3.12.3.ebuild deleted file mode 100644 index 7e8fb832f57c..000000000000 --- a/dev-lang/python/python-3.12.3.ebuild +++ /dev/null @@ -1,537 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~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 -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - -x test_gdb - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - ) - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.11.0_beta4-r2; then - ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.11 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.11/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.12.4.ebuild b/dev-lang/python/python-3.12.4.ebuild deleted file mode 100644 index f7e54652dedc..000000000000 --- a/dev-lang/python/python-3.12.4.ebuild +++ /dev/null @@ -1,574 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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 -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - -x test_gdb - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - ) - - # musl-specific skips - use elibc_musl && profile_task_flags+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # musl-specific skips - use elibc_musl && test_opts+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -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.13.0_beta1_p1.ebuild b/dev-lang/python/python-3.13.0_beta1_p1.ebuild deleted file mode 100644 index 2b6b7179aa75..000000000000 --- a/dev-lang/python/python-3.13.0_beta1_p1.ebuild +++ /dev/null @@ -1,566 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +debug +ensurepip examples gdbm +gil jit libedit - +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - -x test_gdb - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addwrite "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.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.13.0_beta1_p2.ebuild b/dev-lang/python/python-3.13.0_beta1_p2.ebuild deleted file mode 100644 index 54b95e896355..000000000000 --- a/dev-lang/python/python-3.13.0_beta1_p2.ebuild +++ /dev/null @@ -1,643 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - big-endian bluetooth build +debug +ensurepip examples gdbm +gil jit - libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - -x test_gdb - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${ARCH} in - hppa) - profile_task_flags+=( - -x test_descr - -x test_exceptions # bug 931908 - -x test_os - ) - ;; - ia64) - profile_task_flags+=( - -x test_ctypes - -x test_external_inspection # partial PGO only (flaky in src_test) - -x test_signal # PGO only - ) - ;; - mips) - profile_task_flags+=( - -x test_ctypes # partial PGO only (more fails) - -x test_external_inspection # PGO only - -x test_statistics - ) - ;; - ppc64) - if use big-endian; then - profile_task_flags+=( - -x test_descr - -x test_exceptions # PGO only, bug 931908 - ) - fi - ;; - riscv) - profile_task_flags+=( - -x test_statistics - -x test_urllib2 - ) - ;; - sparc) - profile_task_flags+=( - -x test_ctypes - -x test_descr - -x test_exceptions # bug 931908 - ) - ;; - esac - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addwrite "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${ARCH} in - ia64) - test_opts+=( - -x test_ctypes - -x test_external_inspection - ) - ;; - mips) - test_opts+=( - -x test_ctypes - -x test_external_inspection - -x test_statistics - ) - ;; - ppc64) - if use big-endian; then - test_opts+=( -x test_descr ) - fi - ;; - riscv) - test_opts+=( - -x test_urllib2 - ) - ;; - sparc) - test_opts+=( - # bug 788022 - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - - -x test_ctypes - -x test_descr - -x test_exceptions # bug 931908 - ) - ;; - esac - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.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.13.0_beta2.ebuild b/dev-lang/python/python-3.13.0_beta2.ebuild deleted file mode 100644 index c7e6f46cf053..000000000000 --- a/dev-lang/python/python-3.13.0_beta2.ebuild +++ /dev/null @@ -1,668 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +debug +ensurepip examples gdbm +gil jit - libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - # Set baseline test skip flags. - COMMON_TEST_SKIPS=( - # failures - -x test_concurrent_futures - -x test_gdb - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - COMMON_TEST_SKIPS+=( - -x test_builtin - -x test_capi - -x test_cmath - -x test_float - # timeout - -x test_free_threading - -x test_math - -x test_numeric_tower - -x test_random - -x test_statistics - # bug 653850 - -x test_resource - -x test_strtod - ) - ;; - ia64*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - ) - ;; - mips*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - -x test_statistics - ) - ;; - powerpc64-*) # big endian - COMMON_TEST_SKIPS+=( - -x test_descr - ) - ;; - riscv*) - COMMON_TEST_SKIPS+=( - -x test_urllib2 - ) - ;; - sparc*) - COMMON_TEST_SKIPS+=( - # bug 788022 - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - - -x test_ctypes - -x test_descr - # bug 931908 - -x test_exceptions - ) - ;; - esac - - # musl-specific skips - use elibc_musl && COMMON_TEST_SKIPS+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - "${COMMON_TEST_SKIPS[@]}" - - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - profile_task_flags+=( - -x test_os - ) - ;; - hppa*) - profile_task_flags+=( - -x test_descr - # bug 931908 - -x test_exceptions - -x test_os - ) - ;; - ia64*) - profile_task_flags+=( - -x test_signal - ) - ;; - powerpc64-*) # big endian - profile_task_flags+=( - # bug 931908 - -x test_exceptions - ) - ;; - riscv*) - profile_task_flags+=( - -x test_statistics - ) - ;; - esac - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addwrite "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - "${COMMON_TEST_SKIPS[@]}" - ) - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.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.13.0_beta2_p1.ebuild b/dev-lang/python/python-3.13.0_beta2_p1.ebuild deleted file mode 100644 index c7e6f46cf053..000000000000 --- a/dev-lang/python/python-3.13.0_beta2_p1.ebuild +++ /dev/null @@ -1,668 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +debug +ensurepip examples gdbm +gil jit - libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - # Set baseline test skip flags. - COMMON_TEST_SKIPS=( - # failures - -x test_concurrent_futures - -x test_gdb - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - COMMON_TEST_SKIPS+=( - -x test_builtin - -x test_capi - -x test_cmath - -x test_float - # timeout - -x test_free_threading - -x test_math - -x test_numeric_tower - -x test_random - -x test_statistics - # bug 653850 - -x test_resource - -x test_strtod - ) - ;; - ia64*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - ) - ;; - mips*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - -x test_statistics - ) - ;; - powerpc64-*) # big endian - COMMON_TEST_SKIPS+=( - -x test_descr - ) - ;; - riscv*) - COMMON_TEST_SKIPS+=( - -x test_urllib2 - ) - ;; - sparc*) - COMMON_TEST_SKIPS+=( - # bug 788022 - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - - -x test_ctypes - -x test_descr - # bug 931908 - -x test_exceptions - ) - ;; - esac - - # musl-specific skips - use elibc_musl && COMMON_TEST_SKIPS+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - "${COMMON_TEST_SKIPS[@]}" - - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - profile_task_flags+=( - -x test_os - ) - ;; - hppa*) - profile_task_flags+=( - -x test_descr - # bug 931908 - -x test_exceptions - -x test_os - ) - ;; - ia64*) - profile_task_flags+=( - -x test_signal - ) - ;; - powerpc64-*) # big endian - profile_task_flags+=( - # bug 931908 - -x test_exceptions - ) - ;; - riscv*) - profile_task_flags+=( - -x test_statistics - ) - ;; - esac - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addwrite "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - "${COMMON_TEST_SKIPS[@]}" - ) - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.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.13.0_beta2_p3.ebuild b/dev-lang/python/python-3.13.0_beta2_p3.ebuild deleted file mode 100644 index e8eb51fbd999..000000000000 --- a/dev-lang/python/python-3.13.0_beta2_p3.ebuild +++ /dev/null @@ -1,652 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +debug +ensurepip examples gdbm +gil jit - libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - # Set baseline test skip flags. - COMMON_TEST_SKIPS=( - # failures - -x test_concurrent_futures - -x test_gdb - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - COMMON_TEST_SKIPS+=( - -x test_builtin - -x test_capi - -x test_cmath - -x test_float - # timeout - -x test_free_threading - -x test_math - -x test_numeric_tower - -x test_random - -x test_statistics - # bug 653850 - -x test_resource - -x test_strtod - ) - ;; - ia64*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - ) - ;; - mips*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - -x test_statistics - ) - ;; - powerpc64-*) # big endian - COMMON_TEST_SKIPS+=( - -x test_descr - ) - ;; - riscv*) - COMMON_TEST_SKIPS+=( - -x test_urllib2 - ) - ;; - sparc*) - COMMON_TEST_SKIPS+=( - # bug 788022 - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - - -x test_ctypes - -x test_descr - # bug 931908 - -x test_exceptions - ) - ;; - esac - - # musl-specific skips - use elibc_musl && COMMON_TEST_SKIPS+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - "${COMMON_TEST_SKIPS[@]}" - - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - profile_task_flags+=( - -x test_os - ) - ;; - hppa*) - profile_task_flags+=( - -x test_descr - # bug 931908 - -x test_exceptions - -x test_os - ) - ;; - ia64*) - profile_task_flags+=( - -x test_signal - ) - ;; - powerpc64-*) # big endian - profile_task_flags+=( - # bug 931908 - -x test_exceptions - ) - ;; - riscv*) - profile_task_flags+=( - -x test_statistics - ) - ;; - esac - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addwrite "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - "${COMMON_TEST_SKIPS[@]}" - ) - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.13.0_beta2_p5.ebuild b/dev-lang/python/python-3.13.0_beta2_p5.ebuild deleted file mode 100644 index 6317aef17bca..000000000000 --- a/dev-lang/python/python-3.13.0_beta2_p5.ebuild +++ /dev/null @@ -1,671 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +debug +ensurepip examples gdbm +gil jit - libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - # Set baseline test skip flags. - COMMON_TEST_SKIPS=( - # failures - -x test_concurrent_futures - -x test_gdb - # test_asyncio_repl_is_ok is flaky - # https://github.com/python/cpython/issues/119909 - -x test_repl - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - COMMON_TEST_SKIPS+=( - -x test_builtin - -x test_capi - -x test_cmath - -x test_float - # timeout - -x test_free_threading - -x test_math - -x test_numeric_tower - -x test_random - -x test_statistics - # bug 653850 - -x test_resource - -x test_strtod - ) - ;; - ia64*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - ) - ;; - mips*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - -x test_statistics - ) - ;; - powerpc64-*) # big endian - COMMON_TEST_SKIPS+=( - -x test_descr - ) - ;; - riscv*) - COMMON_TEST_SKIPS+=( - -x test_urllib2 - ) - ;; - sparc*) - COMMON_TEST_SKIPS+=( - # bug 788022 - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - - -x test_ctypes - -x test_descr - # bug 931908 - -x test_exceptions - ) - ;; - esac - - # musl-specific skips - use elibc_musl && COMMON_TEST_SKIPS+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - "${COMMON_TEST_SKIPS[@]}" - - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - profile_task_flags+=( - -x test_os - ) - ;; - hppa*) - profile_task_flags+=( - -x test_descr - # bug 931908 - -x test_exceptions - -x test_os - ) - ;; - ia64*) - profile_task_flags+=( - -x test_signal - ) - ;; - powerpc64-*) # big endian - profile_task_flags+=( - # bug 931908 - -x test_exceptions - ) - ;; - riscv*) - profile_task_flags+=( - -x test_statistics - ) - ;; - esac - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addwrite "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - "${COMMON_TEST_SKIPS[@]}" - ) - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.13.0_beta2; then - ewarn "Python 3.13.0b2 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.13 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.13/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.13.0_beta2_p8.ebuild b/dev-lang/python/python-3.13.0_beta2_p8.ebuild deleted file mode 100644 index 87d11b2c5374..000000000000 --- a/dev-lang/python/python-3.13.0_beta2_p8.ebuild +++ /dev/null @@ -1,659 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -LLVM_COMPAT=( 18 ) -LLVM_OPTIONAL=1 -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic llvm-r1 multiprocessing -inherit pax-utils python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build +debug +ensurepip examples gdbm +gil jit - libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-libs/mpdecimal:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-pip ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( - app-arch/xz-utils - dev-python/ensurepip-pip - dev-python/ensurepip-setuptools - dev-python/ensurepip-wheel - ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - jit? ( - $(llvm_gen_dep ' - sys-devel/clang:${LLVM_SLOT} - sys-devel/llvm:${LLVM_SLOT} - ') - ) - verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" -if [[ ${PV} != *_alpha* ]]; then - RDEPEND+=" - dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] - " -fi - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend - - if ! use gil || use jit; then - ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" - ewarn "them could lead to unexpected breakage, including race conditions" - ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" - ewarn "you can reproduce the problem with dev-lang/python[gil,-jit]. Instead," - ewarn "please consider reporting freethreading / JIT problems upstream." - fi -} - -pkg_setup() { - use jit && llvm-r1_pkg_setup - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - # TODO: Makefile has annoying deps on expat headers - #rm -r Modules/expat || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die - - # breaks tests when using --with-wheel-pkg-dir - rm -r Lib/test/wheeldata || die - - eautoreconf -} - -build_cbuild_python() { - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --prefix="${BROOT}"/usr - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross to satisfy --with-build-python. - --without-lto - --without-readline - --disable-optimizations - ) - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - - # Avoid as many dependencies as possible for the cross build. - mkdir Modules || die - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - _dbm _gdbm - _sqlite3 - _hashlib _ssl - _curses _curses_panel - readline - _tkinter - pyexpat - zlib - # We disabled these for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. This should be rechecked for the pure Makefile approach, - # and uncommented if needed. - #_ctypes _crypt - EOF - - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - emake - popd &> /dev/null || die -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - # Set baseline test skip flags. - COMMON_TEST_SKIPS=( - # failures - -x test_concurrent_futures - -x test_gdb - # test_asyncio_repl_is_ok is flaky - # https://github.com/python/cpython/issues/119909 - -x test_repl - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - COMMON_TEST_SKIPS+=( - -x test_builtin - -x test_capi - -x test_cmath - -x test_float - # timeout - -x test_free_threading - -x test_math - -x test_numeric_tower - -x test_random - -x test_statistics - # bug 653850 - -x test_resource - -x test_strtod - ) - ;; - ia64*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - ) - ;; - mips*) - COMMON_TEST_SKIPS+=( - -x test_ctypes - -x test_external_inspection - -x test_statistics - ) - ;; - powerpc64-*) # big endian - COMMON_TEST_SKIPS+=( - -x test_descr - ) - ;; - riscv*) - COMMON_TEST_SKIPS+=( - -x test_urllib2 - ) - ;; - sparc*) - COMMON_TEST_SKIPS+=( - # bug 788022 - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - - -x test_ctypes - -x test_descr - # bug 931908 - -x test_exceptions - ) - ;; - esac - - # musl-specific skips - use elibc_musl && COMMON_TEST_SKIPS+=( - # various musl locale deficiencies - -x test__locale - -x test_c_locale_coercion - -x test_locale - -x test_re - - # known issues with find_library on musl - # https://bugs.python.org/issue21622 - -x test_ctypes - - # fpathconf, ttyname errno values - -x test_os - ) - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - --verbose3 - -u-network - - # We use a timeout because of how often we've had hang issues - # here. It also matches the default upstream PROFILE_TASK. - --timeout 1200 - - "${COMMON_TEST_SKIPS[@]}" - - -x test_dtrace - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - - # Fails in profiling run, passes in src_test(). - -x test_capi - ) - - # Arch-specific skips. See #931888 for a collection of these. - case ${CHOST} in - alpha*) - profile_task_flags+=( - -x test_os - ) - ;; - hppa*) - profile_task_flags+=( - -x test_descr - # bug 931908 - -x test_exceptions - -x test_os - ) - ;; - ia64*) - profile_task_flags+=( - -x test_signal - ) - ;; - powerpc64-*) # big endian - profile_task_flags+=( - # bug 931908 - -x test_exceptions - ) - ;; - riscv*) - profile_task_flags+=( - -x test_statistics - ) - ;; - esac - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --without-static-libpython - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-libmpdec - --with-platlibdir=lib - --with-pkg-config=yes - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable gil) - $(use_enable jit experimental-jit) - $(use_enable pgo optimizations) - $(use_with readline readline "$(usex libedit editline readline)") - $(use_with valgrind) - ) - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - # Force-disable modules we don't want built. - # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. - cat > Modules/Setup.local <<-EOF || die - *disabled* - nis - $(usev !gdbm '_gdbm _dbm') - $(usev !sqlite '_sqlite3') - $(usev !ssl '_hashlib _ssl') - $(usev !ncurses '_curses _curses_panel') - $(usev !readline 'readline') - $(usev !tk '_tkinter') - EOF - - # disable implicit optimization/debugging flags - local -x OPT= - - if tc-is-cross-compiler ; then - build_cbuild_python - myeconfargs+=( - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python - ) - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - # Gentoo hack to disable accessing system site-packages - export GENTOO_CPYTHON_BUILD=1 - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - --verbose3 - -u-network - -j "$(makeopts_jobs)" - "${COMMON_TEST_SKIPS[@]}" - ) - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # pydoc - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.13.0_beta2; then - ewarn "Python 3.13.0b2 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.13 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.13/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.8.19_p1.ebuild b/dev-lang/python/python-3.8.19_p1.ebuild deleted file mode 100644 index 35dce04267d9..000000000000 --- a/dev-lang/python/python-3.8.19_p1.ebuild +++ /dev/null @@ -1,430 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils -inherit prefix python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE=" - bluetooth build debug +ensurepip examples gdbm +ncurses pgo - +readline +sqlite +ssl test tk valgrind -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - verify-sig? ( sec-keys/openpgp-keys-python ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # https://bugs.gentoo.org/850151 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs) - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - rm Lib/distutils/command/wininst*.exe || die - - eautoreconf -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - export PYTHON_DISABLE_MODULES="${disable}" - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-ffi - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_with valgrind) - ) - - # disable implicit optimization/debugging flags - local -x OPT= - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - if tc-is-cross-compiler ; then - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 and bug #864911. - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross. - --without-lto - --disable-optimizations - ) - - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}" - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. - PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Avoid as many dependencies as possible for the cross build. - cat >> Makefile <<-EOF || die - MODULE_NIS=disabled - MODULE__DBM=disabled - MODULE__GDBM=disabled - MODULE__DBM=disabled - MODULE__SQLITE3=disabled - MODULE__HASHLIB=disabled - MODULE__SSL=disabled - MODULE__CURSES=disabled - MODULE__CURSES_PANEL=disabled - MODULE_READLINE=disabled - MODULE__TKINTER=disabled - MODULE_PYEXPAT=disabled - MODULE_ZLIB=disabled - EOF - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the Python it was pointed to - # immediately. - PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake - popd &> /dev/null || die - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - hprefixify setup.py - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - # Prevent using distutils bundled by setuptools. - # https://bugs.gentoo.org/823728 - export SETUPTOOLS_USE_DISTUTILS=stdlib - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.8.19_p2.ebuild b/dev-lang/python/python-3.8.19_p2.ebuild index 58a211df31ee..9019d3f2755b 100644 --- a/dev-lang/python/python-3.8.19_p2.ebuild +++ b/dev-lang/python/python-3.8.19_p2.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 +ncurses pgo +readline +sqlite +ssl test tk valgrind diff --git a/dev-lang/python/python-3.9.19_p2.ebuild b/dev-lang/python/python-3.9.19_p2.ebuild deleted file mode 100644 index 2fac75e39220..000000000000 --- a/dev-lang/python/python-3.9.19_p2.ebuild +++ /dev/null @@ -1,490 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils -inherit prefix python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - ) -" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE=" - bluetooth build debug +ensurepip examples gdbm +ncurses pgo - +readline +sqlite +ssl test tk valgrind -" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND=" - app-arch/bzip2:= - app-arch/xz-utils:= - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( >=dev-libs/openssl-1.1.1:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) -" -# bluetooth requires headers from bluez -DEPEND=" - ${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils ) - valgrind? ( dev-debug/valgrind ) -" -# autoconf-archive needed to eautoreconf -BDEPEND=" - dev-build/autoconf-archive - app-alternatives/awk - virtual/pkgconfig - verify-sig? ( sec-keys/openpgp-keys-python ) -" -RDEPEND+=" - !build? ( app-misc/mime-types ) -" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -QA_PKGCONFIG_VERSION=${PYVER} -# false positives -- functions specific to *BSD -QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat and libffi are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - # https://bugs.gentoo.org/850151 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die - - # force the correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs) - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - # disable automagic bluetooth headers detection - if ! use bluetooth; then - local -x ac_cv_header_bluetooth_bluetooth_h=no - fi - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - export PYTHON_DISABLE_MODULES="${disable}" - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - append-flags -fwrapv - filter-flags -malign-double - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - # PKG_CONFIG needed for cross. - tc-export CXX PKG_CONFIG - - local dbmliborder= - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - if use pgo; then - local profile_task_flags=( - -m test - "-j$(makeopts_jobs)" - --pgo-extended - -x test_gdb - -x test_dtrace - -u-network - - # All of these seem to occasionally hang for PGO inconsistently - # They'll even hang here but be fine in src_test sometimes. - # bug #828535 (and related: bug #788022) - -x test_asyncio - -x test_concurrent_futures - -x test_httpservers - -x test_logging - -x test_multiprocessing_fork - -x test_socket - -x test_xmlrpc - - # Hangs (actually runs indefinitely executing itself w/ many cpython builds) - # bug #900429 - -x test_tools - ) - - if has_version "app-arch/rpm" ; then - # Avoid sandbox failure (attempts to write to /var/lib/rpm) - profile_task_flags+=( - -x test_distutils - ) - fi - local -x PROFILE_TASK="${profile_task_flags[*]}" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - --enable-ipv6 - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --without-lto - --with-system-expat - --with-system-ffi - --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip - - $(use_with debug assertions) - $(use_enable pgo optimizations) - $(use_with valgrind) - ) - - # disable implicit optimization/debugging flags - local -x OPT= - - # https://bugs.gentoo.org/700012 - if tc-is-lto; then - append-cflags $(test-flags-CC -ffat-lto-objects) - myeconfargs+=( - --with-lto - ) - fi - - if tc-is-cross-compiler ; then - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - # - # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) - local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" - local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} - local -x CFLAGS= LDFLAGS= - local -x BUILD_CFLAGS="${CFLAGS_NODIST}" - local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} - - # We need to build our own Python on CBUILD first, and feed it in. - # bug #847910 and bug #864911. - local myeconfargs_cbuild=( - "${myeconfargs[@]}" - - --libdir="${cbuild_libdir:2}" - - # Avoid needing to load the right libpython.so. - --disable-shared - - # As minimal as possible for the mini CBUILD Python - # we build just for cross. - --without-lto - --disable-optimizations - ) - - # Point the imminent CHOST build to the Python we just - # built for CBUILD. - export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}" - - mkdir "${WORKDIR}"/${P}-${CBUILD} || die - pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die - # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. - PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Avoid as many dependencies as possible for the cross build. - cat >> Makefile <<-EOF || die - MODULE_NIS=disabled - MODULE__DBM=disabled - MODULE__GDBM=disabled - MODULE__DBM=disabled - MODULE__SQLITE3=disabled - MODULE__HASHLIB=disabled - MODULE__SSL=disabled - MODULE__CURSES=disabled - MODULE__CURSES_PANEL=disabled - MODULE_READLINE=disabled - MODULE__TKINTER=disabled - MODULE_PYEXPAT=disabled - MODULE_ZLIB=disabled - EOF - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the Python it was pointed to - # immediately. - PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake - popd &> /dev/null || die - fi - - # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get - # propagated to sysconfig for built extensions - local -x CFLAGS_NODIST=${CFLAGS} - local -x LDFLAGS_NODIST=${LDFLAGS} - local -x CFLAGS= LDFLAGS= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - hprefixify setup.py - econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi - - # install epython.py as part of stdlib - echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - # Prevent using distutils bundled by setuptools. - # https://bugs.gentoo.org/823728 - export SETUPTOOLS_USE_DISTUTILS=stdlib - - # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't - # end up writing bytecode & violating sandbox. - # bug #831897 - local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} - - if use pgo ; then - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - addpredict "/usr/lib/python${PYVER}/site-packages" - fi - - # also need to clear the flags explicitly here or they end up - # in _sysconfigdata* - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Restore saved value from above. - local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_concurrent_futures - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax-kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/dev/null - ) - newins Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local EPYTHON=python${PYVER} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest index 1d53c7e322bb..25109f911f4d 100644 --- a/dev-lang/tuprolog/Manifest +++ b/dev-lang/tuprolog/Manifest @@ -2,4 +2,5 @@ AUX build-3.x.xml 2968 BLAKE2B e403d134a62504c396842f2fad71cf2aec1786c5d7902d7d0 DIST tuprolog-3.2.0-gentoo-patchset-0.tar.gz 1813 BLAKE2B 4ed7ffbb752a821a2b2842cfdbc1f4ec92d14b35a1c5a722207b45ec9dbdc44588acc010fb6386e8ed2e7d30d3bc8d425f0f74e8cc953cb7afad8305904e1499 SHA512 454757fc01f3f697510426e7a2a41b57350c1e3f980e381e197616e10eaf88339155226096f1d417397b9bc6f4964a45b3d547c6794ad23a4a014b06212b08f0 DIST tuprolog-3.2.0.tar.gz 6242286 BLAKE2B 77a3d3f886673aca72fffd9bb60657efcbe7ea5bb0f84eea7a72df513295d572c8116472f8d544240fac676ac9a6a0fcecfc3166e6426ef7d8af80eac4ba8d85 SHA512 e27bd989d66bae26c646cb69670fb75232ebdd18d1dbb9d600f9847921ecd56d17221736b3ec15c087857509272ce89af8bc44924130430db3860870a06bb499 EBUILD tuprolog-3.2.0-r2.ebuild 1400 BLAKE2B f8ea3a222f28a32ff069f832701869b567b3f312649071a5e19d59e59125866acf3d159a107e53e0323c254284da3fbf7f5acecdaadfb276677b9814e3fb1318 SHA512 b1b008e92aeb7f3f3dd12fed5a3d0ba201fa21b41fd69e6db45883909e0df607489ca266fd90dd456172032a47fd9740e26316f1c1c3e3b29c70a422e291a83a +EBUILD tuprolog-3.2.0-r3.ebuild 1779 BLAKE2B da40558dc9582fd63b021b34558300f501e109aa19c4ed3e11e1bdfbbbda17d103fd843fd2a5e2045d1c35a83049d63e708dc47ef5f584bb067f74c7145dff11 SHA512 198758efda408a2455bb9f61574e0d1644a97775546437cbf97973c56d02d7422b7aa9729197dd4b72b8d4b76c7588be80bbbe75864b54f00a263483dcd69002 MISC metadata.xml 319 BLAKE2B ca131e483438742de5ab07f1e8c3891664ecf893ef477c917688fab8968cc5a790be3512f70027c86cfa03372d1234da3b737a1d68351c95e8902bd0eff59020 SHA512 5ed1bafbb0e39e5e97b32be26dbcb18f32063f60ed0db7ec99d08cd37d36dea037f257df5e3f63ff0dfa4bb8af2b41615d0f7bb1f937fa1449ef245d652eb5df diff --git a/dev-lang/tuprolog/tuprolog-3.2.0-r3.ebuild b/dev-lang/tuprolog/tuprolog-3.2.0-r3.ebuild new file mode 100644 index 000000000000..5a6aa37f8183 --- /dev/null +++ b/dev-lang/tuprolog/tuprolog-3.2.0-r3.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc examples source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +PATCHSET_VER="0" + +DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures" +HOMEPAGE="http://tuprolog.unibo.it/" +SRC_URI="https://dev.gentoo.org/~keri/distfiles/tuprolog/${P}.tar.gz + https://dev.gentoo.org/~keri/distfiles/tuprolog/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz" +S="${WORKDIR}"/${P} + +LICENSE="LGPL-3 BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +CP_DEPEND=" + dev-java/commons-lang:3.6 + dev-java/gson:0 + dev-java/javassist:3 +" + +DEPEND="${CP_DEPEND} + virtual/jdk:1.8 + test? ( + dev-java/hamcrest:0 + dev-java/junit:4 + ) +" + +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.8:* +" + +PATCHES=( "${WORKDIR}/${PV}" ) + +JAVA_GENTOO_CLASSPATH_EXTRA="lib/autocomplete.jar" +JAVA_GENTOO_CLASSPATH=" + commons-lang-3.6 + gson + javassist-3 +" +JAVA_RESOURCE_DIRS="res/src" +JAVA_SRC_DIR="src" +JAVA_TEST_GENTOO_CLASSPATH=" + hamcrest + javassist-3 + junit-4 +" +JAVA_TEST_RESOURCE_DIRS="test" +JAVA_TEST_RUN_ONLY=( + alice.tuprolog.TuPrologTestSuite + alice.tuprolog.ExceptionsTestSuite +) +JAVA_TEST_SRC_DIR="test/unit/alice" + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + + mkdir res || die + find src -type f ! -name '*.java' \ + | xargs cp --parents -t res || die + + # unpack for bundling in 2p.jar + jar xf lib/autocomplete.jar || die + jar xf lib/rsyntaxtextarea.jar || die +} + +src_install() { + java-pkg-simple_src_install + cp {tuprolog,2p}.jar || die + + # these were bundled already in previous revision + jar uf 2p.jar -C . org theme.dtd || die + java-pkg_dojar 2p.jar + + if use examples ; then + docinto examples + dodoc doc/examples/*.pl + fi +} -- cgit v1.2.3