diff options
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/Manifest.gz | bin | 261176 -> 261190 bytes | |||
-rw-r--r-- | dev-python/pypy-exe-bin/Manifest | 9 | ||||
-rw-r--r-- | dev-python/pypy-exe-bin/pypy-exe-bin-7.3.10.ebuild | 79 | ||||
-rw-r--r-- | dev-python/pypy-exe/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pypy-exe/pypy-exe-7.3.10.ebuild | 177 | ||||
-rw-r--r-- | dev-python/pypy/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pypy/pypy-7.3.10.ebuild | 302 | ||||
-rw-r--r-- | dev-python/pypy3-exe-bin/Manifest | 9 | ||||
-rw-r--r-- | dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.10.ebuild | 80 | ||||
-rw-r--r-- | dev-python/pypy3-exe/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pypy3-exe/pypy3-exe-7.3.10.ebuild | 126 | ||||
-rw-r--r-- | dev-python/pypy3/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pypy3/pypy3-7.3.10.ebuild | 189 |
13 files changed, 983 insertions, 0 deletions
diff --git a/dev-python/Manifest.gz b/dev-python/Manifest.gz Binary files differindex 42d4a8e40de7..0662e3d64991 100644 --- a/dev-python/Manifest.gz +++ b/dev-python/Manifest.gz diff --git a/dev-python/pypy-exe-bin/Manifest b/dev-python/pypy-exe-bin/Manifest index 9ed520002b12..44a14c7f17cf 100644 --- a/dev-python/pypy-exe-bin/Manifest +++ b/dev-python/pypy-exe-bin/Manifest @@ -1,3 +1,11 @@ +DIST pypy-exe-7.3.10-1.amd64-musl.gpkg.tar 13107200 BLAKE2B 5b54930b2504e063839ca0e2017f6e0150ec3815c4ae783ceb97cbd11900e97edf3791bd998f686e3d16b122bb4e3f6f5abb387490af8589472c31170bc0f033 SHA512 9ee7998b391b0ff2d244346b8aef730b0c3cd5028e3a6c7dbcac77d248335eba3a01c6d1b478a21f1fca674d7ff6d2dd72df13ced5919b70b6eceb4b7991070f +DIST pypy-exe-7.3.10-1.amd64.gpkg.tar 13107200 BLAKE2B be6846f99504d5b7e80b6316e3164a9e46ce0510fc31daee429aa97800b734c21e751d205e1d93046fd4e4e008ca48b4738167249551052cb7bfffde50197af6 SHA512 eb1b01aae999ada190409ae087500ec6a3d03328da17625fe77cd7af3568275b43df158e06c6e7f595690aff539ab4ee61c67379bd7e8360403aaeb509a62de8 +DIST pypy-exe-7.3.10-1.arm64-musl.gpkg.tar 10956800 BLAKE2B 484123a23d5f39a976672cda199b405fcd144e5943328f1723d267e6918ef39b9f7cc0196d09287171046a2feaa15a9b80d5ec121f8f1cbe86d18d8aede678d7 SHA512 a8f46284f0e5ff822183f5a6ccb306a5e26adcf50e53dfa4e5e6f3d6418617935a9d92da092f4303adc2a10013860209a7011cf10da4c85dd77efe2bcf28123d +DIST pypy-exe-7.3.10-1.arm64.gpkg.tar 10885120 BLAKE2B 4d9a64cf4e63de1614b670fdbe8561681f4b6620ccfe3d3cb0ce72f7db986e85436323f074864c18c96722fb57d6909d2531867b0e8bed59afa8294fe482f6a2 SHA512 659c4e9b24c517c64f0d64580da99387aab0fec3bf5dbbc9ce663b111f0b339583ec1b4f8c808490c02ef71e09b9c08b29e02f9ad671dfe29a74489d72283ad4 +DIST pypy-exe-7.3.10-1.ppc64le-musl.gpkg.tar 6686720 BLAKE2B 8e740fc4a4244622c93a872537060f81daede6872e509654500b06b87904d2d396fc4ff7c3fe82eff3a0d523a8047e419223869f65779385c25f7cb68dae92a1 SHA512 267a7c771d09d40e28525683a85d539722584c88c5d007f6bdf2fe573d8bc46b199098ab176422b49bddc3d857d0c9376d4cb920a670c8959034950b9b4ed3a5 +DIST pypy-exe-7.3.10-1.ppc64le.gpkg.tar 11089920 BLAKE2B 9d2f551a2d3f797ac9afef0b2f5eec626f64c50225d53b5e0abc740abe8fe8f70165fa3fdcad43d3bfd04a456459a9fcfcfe5d0e61969ebb64f20b44b0c2de06 SHA512 c592463cb8d50a15723e74151e1327abf2e1cfb68524f588cb4e841e88177837198695afb073835ef2411b8a1d4dc7b9bf515106de876a6a6607cc4a0fbea7d7 +DIST pypy-exe-7.3.10-1.x86-musl.gpkg.tar 9707520 BLAKE2B 635e25ba163c1edd34eddaf5b2ddcac10b68385772b40e77fbbb2b901ab4301b0952d6da0743fd209e06f9d683d438e8849a0d26052c331edcb0f91aa90fe0b3 SHA512 0819fcdcfb88b4bfbac61932f887bdad6a456816d670b5844bca2164ecfff9a581a766e0e478b5799d7459b0a094515af3de444ca88318359fdda268f9bbdc9d +DIST pypy-exe-7.3.10-1.x86.gpkg.tar 9707520 BLAKE2B 53592d7991b5f5565f4aa1cb8de25658245c516c1ff042c0dce611abce35d9496bd048b2aeab748f16f11a89129894fc44b693c385bb8fea6ee1934e5970fd9e SHA512 458fabfcaabf6e225d5dbb45b11d301dd4655a85a3d00bf33c5a7c4c9ab1eeae25bfe059434f92303aaf0a0fa631494d51b37e17a7db9582de8eb1e19509d93b DIST pypy-exe-7.3.9-2.amd64-musl.gpkg.tar 13762560 BLAKE2B 88364dc5677adb1e8307f6744920c7bc13b5794917b7141f7548a53306ecd7fa63dc457932b079b9688f5fde8753e8f859dbf069d569903776306e790f92f09c SHA512 be77ac5c76cbb4c6ad020f2e091ad5a32acf9473668f8cf9b4bbec448bcaa3343e6b722e446c229891ae24a688044eb8ea627bad89f9585f94197c64bf85d2ee DIST pypy-exe-7.3.9-2.arm64-musl.gpkg.tar 11601920 BLAKE2B 53485ceaf63841f98ccd62716b75ab1e5839d7239ac398b49c8e60810e3a69c17a3510d10668719c8b4fa52489639dfa4e9b669d216a6969c9f2f98a76696aa3 SHA512 c0c8258604ff2f54fdbc165f1a4e03bb40cc768341584ee7d6dcdc102dc7ac8b940a17ed4b22dd77f76b58258533ba2401997e9a4fdfab0cd743e1f287b56654 DIST pypy-exe-7.3.9-2.arm64.gpkg.tar 11612160 BLAKE2B 6906372980c3ac890de90b0a80d44fa7e3a8a5be8640ec46155c4736ae289ea9b1dc06caec8546bc881d658770baeb1a5522634e2f29df85f1793508b3c39d2e SHA512 7dce7086856373e2548054af41409eb13d871b2ea42477ab03b2ea0264ee13e97c96544115964a638e535dc6213f0c6d026ed4bf30bd245824db573f171efed5 @@ -6,5 +14,6 @@ DIST pypy-exe-7.3.9-2.ppc64le.gpkg.tar 11704320 BLAKE2B 06dfad8882e037a03cbe24ac DIST pypy-exe-7.3.9-2.x86-musl.gpkg.tar 10178560 BLAKE2B 93a239c7f02f5d057aade56762fdb0919acf63215ba52e1076dc62758ce743bca549d174c220471016a121a72efe22c58f547a43d2253865635fb126857aa9bd SHA512 0d463e9d563e3510967dbdcde3057bd4ec86a2dd0d8cd7743ff131120493116f71e253354195c2fa2f2ac209ed136ba10381fd8bd568150dc44d2d778bf13b84 DIST pypy-exe-7.3.9-3.amd64.gpkg.tar 13701120 BLAKE2B 1c0b10906adcbdfb9893a097577193b89ecaf54c8c3ab5f5907cd51b75d6f26ab31afa0369015db007ef25e0aee7669015e870a554940177b9332a79d7b8ff0b SHA512 8cd53261f035ad0d6ad3dc7f13f29d54304ed02a339bbbc565a541b4e3b9ce0ff4734f3877e286e018da2b77468287fb11e499cc5fff4fc73f6a7bc1a602daf6 DIST pypy-exe-7.3.9-3.x86.gpkg.tar 10147840 BLAKE2B 8cb0c136c95b89178dcab3684e76fd3399ec9af2ff314ac39927bc3431b46a330746331ee142590239f44fcfd943f0d0766d462d91cf47886d7badeec429a786 SHA512 0df2f09c1934b44561c12e514ac84377b3718c2f0e5912c0f36a95100911abb692a659b384c6ea9746e11494dff6f780996725b7783f6d0dc875e8e6652051fc +EBUILD pypy-exe-bin-7.3.10.ebuild 1949 BLAKE2B 94aab13ef57d61e9f12cd918a7595f48b605c2efb8e7e6a2c9ad54df0a016c77ead00a9cb9069c0da0c0c7d58882a2559416323a1f69590b5d33d85747596289 SHA512 c385b837715846a9aa28535989638b695dfe2077329c21c876cc07704cf307680c64b7b29626483b84e564cce72db963f0a257304064b4bb59b37293b7389ed6 EBUILD pypy-exe-bin-7.3.9-r4.ebuild 1977 BLAKE2B 91ce17e7e4699fa83a4a004d28c5bd9f3bb0ae314bf868b5079b9794f4ff620462dada6e6749cff352cdaeedbfda3fd9d61a76d1ad85f61eb8928d7130c2d60a SHA512 6540a562f4bc696f2dde67aec97dc2ec5acfb14cae44fdde84190a883d3b8739b3aec40c61d3e82c141fdaa0c085adaafd52eb61e9bba0ad7c53aa18f5e84c27 MISC metadata.xml 241 BLAKE2B 4f18c355c71824c25df283b2d463a5abbf2295446e74b960e868dd78d4910ac066725450478087567a6e66b7a8948d99e053f13a7e58dbf2b89fdaf5c2f3436c SHA512 c46e70ffd66754ad84c64806f2bbff25ba9a688f035176a4565afc95351ce10fffba64bbde89965501460b05978c7e59b3d84db6a8cb6efff4055d4b7a5ab5d8 diff --git a/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.10.ebuild b/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.10.ebuild new file mode 100644 index 000000000000..26726bf419c3 --- /dev/null +++ b/dev-python/pypy-exe-bin/pypy-exe-bin-7.3.10.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils unpacker + +MY_P=pypy-exe-${PV}-1 +DESCRIPTION="PyPy executable (pre-built version)" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + elibc_glibc? ( + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.amd64.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.arm64.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.ppc64le.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.x86.gpkg.tar + ) + ) + elibc_musl? ( + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64-musl/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.amd64-musl.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64-musl/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.arm64-musl.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le-musl/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.ppc64le-musl.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86-musl/pypy/dev-python/pypy-exe/${MY_P}.gpkg.tar + -> ${MY_P}.x86-musl.gpkg.tar + ) + ) +" +S="${WORKDIR}" + +LICENSE="MIT" +SLOT="${PV%_p*}" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" + +# sys-devel/gcc for libgcc_s.so +RDEPEND=" + app-arch/bzip2:0/1 + dev-libs/expat:0/0 + dev-libs/libffi:0/8 + sys-libs/ncurses:0/6 + >=sys-libs/zlib-1.1.3:0/1 + virtual/libintl:0/0 + elibc_glibc? ( + sys-devel/gcc + >=sys-libs/glibc-2.35 + ) + !dev-python/pypy-exe:${SLOT} +" + +QA_PREBUILT=" + usr/lib/pypy2.7/pypy-c-${SLOT} +" + +src_install() { + insinto / + doins -r */image/usr + fperms +x "/usr/lib/pypy2.7/pypy-c-${SLOT}" + pax-mark m "${ED}/usr/lib/pypy2.7/pypy-c-${SLOT}" +} diff --git a/dev-python/pypy-exe/Manifest b/dev-python/pypy-exe/Manifest index 7fe192da559b..cea60b3f3f6c 100644 --- a/dev-python/pypy-exe/Manifest +++ b/dev-python/pypy-exe/Manifest @@ -1,7 +1,10 @@ +DIST pypy2.7-gentoo-patches-7.3.10.tar.xz 5312 BLAKE2B 3ca6d3a01914ae92d93fbd185705dae6bebfd4869a818f4a8058c9df3ea243fd9f1e5b962351f8d07a9679e8020499e81b7d1114d4f1b7493dc1d34c8c04409e SHA512 6758894f6d66dc99a13471cf373c5a2d2bbf37ac561e8d7c4f57ec2f1a9653cf9859547d9a7a80e7f0f7df16078030a4b1cee69536958176f0261da49493310e DIST pypy2.7-gentoo-patches-7.3.10rc3.tar.xz 5324 BLAKE2B 83675b7d2aa0eaace337308e9d818e1d745471a72bd67f269265b06b40a2fb62e26aedd2489ceaf02eb15dd655277dcf8fc3fe280d83d636afb0a69eb2b35795 SHA512 7fdf4fc2f7fdd8accd8af6f8713c6db55510be7a129e608ef0a7c30cd8db74f2711ded41daae3d2d698e394a146996cf699d87147a5d433a2321bcb7682c15b7 DIST pypy2.7-gentoo-patches-7.3.9_p1.tar.xz 7832 BLAKE2B d04fc46ab9dc8b212ed3783c1ce49d72f96dfde754da67cc97ea0c193e7ad7f5f8fdd68561b93ef0b22dde86ec3f848ee8ec8a3d78d925b6d96abd2d88d34c14 SHA512 b9d2ccccab34a5027f68e1429ff6862a0172cf8cc9eaef5e4eaa3eb091d9c2751701dbe1f61481fd84d08cb3d5bafb40a5c753906c17dc2a57bfc28acd673e1a +DIST pypy2.7-v7.3.10-src.tar.bz2 19865458 BLAKE2B 0ba83b873daf99b20bd38ee63734c7ceb47b6a7e9cb4bdab1ebbd5672767411f0bf926a19a7074cbfc154a8d83e3679c98fe38c5b6e00c1a4a3fab5424b5ba5d SHA512 750427ce03fdc39f8b6df528f5a2b17f33429433f583a7c46a6b9564f7e398616ae61efb635a4bc0a1f8916ca1881bf1f6347a7ea1748c09ae02e4d88315986d DIST pypy2.7-v7.3.10rc3-src.tar.bz2 19776339 BLAKE2B a6866a0ff7a7b4bb3e1815fdc741cc95ff7945f6271e0189b6d16d1efc64c72a75a1400c3859a5b8c5f5b176217463a446b3449093572df59e13df15a207828f SHA512 097d57862728197e648cf38380ce4a60d6192bc9f2c0c2cf6840717af0320acd8cf42e344513428be60f60e136d830a0bb5d6295e7909cd7f3a42bac992c780a DIST pypy2.7-v7.3.9-src.tar.bz2 23328628 BLAKE2B 50d015439b6a6f15dd24eb4524726a2054f0d8e7ef209b54dc4eb9365b41b333f3dad525422316af3ff19e6ffb5866859db4455e05fc1529a81ce3b6e7c621db SHA512 8d7513d4efe924f2456dd65a45a82dd16171f7962c81ba90f2a168c332cdad78ceffa3ed1af379c09e61082b39d5c2a8385cd77c89b698c47cc75e9df1bb4d2a +EBUILD pypy-exe-7.3.10.ebuild 4062 BLAKE2B 0ab485e4deac6ffccc91c221e30c639a2ad1e3ad873af0c36a7102c07cbed14cce9215902475e51898f791d5da52648c26f19559d4c238e159c1c8b25b2ae9f1 SHA512 7dbb28927cfb82952a30536d8acffe1d4352dee4126b286fec5b6aa9969f6942cd572ac060e984d2ea844e05025837ca42e5c7adcfa01fdf97a0e53fb56d25eb EBUILD pypy-exe-7.3.10_rc3.ebuild 4013 BLAKE2B 2a9d85d52eb27a3f580d59451ecccc2fa8e341bfd27b8a38d6e138082e916ad994c5b0e7acf3bde679697d78735ba1b971bcfa69bac891180f46e7befe1751ba SHA512 f5087eec35a09ed46f3f5a427741d7a0635b30750a77ac8c1f47ca268812e8f765c5fcfce67e90279b356fd9cb0008de4b1b599ad1436268fc515074f5ec3516 EBUILD pypy-exe-7.3.9.ebuild 4317 BLAKE2B ac746e40592066d98eef14f51360fda83e94395feeb2681fa833dfd9136d9e526d9939c1448f59674e1eb744bd95e19215199fcfdc7095f9419ec5dda832981b SHA512 78d8dd56fb7722f3e5bde06e5c2e9079198258912c1657d7bee0e2f013ca4963018b8978c0faeb2a674ea3c743b82d1aa2dcae39b76ee6737bf1545023d282cd MISC metadata.xml 498 BLAKE2B 8dbcdb7c3a4a2fa5d1a922fd5197fb5e3337adcaec1e7d382f25f8696c80726e5b79843477bf8e5ce131aecde6e2c4c283548c5b337e54cb58aaa066013c445a SHA512 8a9bb514bbf3bf328aa63734e1fdc106f6aaf5ccb88c29ad8a686ab2724f3d1f4727163500013dd16e7b34232b881cf47d2f174212b5428ee076af27cf43628d diff --git a/dev-python/pypy-exe/pypy-exe-7.3.10.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.10.ebuild new file mode 100644 index 000000000000..16adc0e787e0 --- /dev/null +++ b/dev-python/pypy-exe/pypy-exe-7.3.10.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs pax-utils toolchain-funcs + +PYPY_PV=${PV%_p*} +MY_P=pypy2.7-v${PYPY_PV/_} +PATCHSET="pypy2.7-gentoo-patches-${PV/_}" + +DESCRIPTION="PyPy executable (build from source)" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +SLOT="${PYPY_PV}" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" + +DEPEND=" + >=sys-libs/zlib-1.1.3:0= + dev-libs/libffi:0= + virtual/libintl:0= + dev-libs/expat:0= + bzip2? ( app-arch/bzip2:0= ) + ncurses? ( sys-libs/ncurses:0= ) +" +RDEPEND=" + ${DEPEND} + !dev-python/pypy-exe-bin:${PYPY_PV} +" +# don't enforce the dep on dev-python/pypy with USE=low-memory +# since it's going to cause circular dep with unhelpful error message +BDEPEND=" + !low-memory? ( + || ( + dev-python/pypy + dev-lang/python:2.7 + ) + ) +" + +check_env() { + if ! has_version -b dev-python/pypy; then + if use low-memory; then + eerror "USE=low-memory requires (a prior version of) dev-python/pypy" + eerror "installed." + else + ewarn "CPython 2.7 will be used to perform the translation. Upstream" + ewarn "recommends using (a prior version of) dev-python/pypy instead." + fi + elog "You can install a prebuilt version of PyPy first using e.g.:" + elog " $ emerge -1v dev-python/pypy dev-python/pypy-exe-bin" + + if use low-memory; then + die "dev-python/pypy needs to be installed for USE=low-memory" + fi + fi + + if use low-memory; then + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" + fi + + check-reqs_pkg_pretend +} + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && check_env +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && check_env +} + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + default +} + +src_configure() { + tc-export CC + + local jit_backend + if use jit; then + jit_backend='--jit-backend=' + + # We only need the explicit sse2 switch for x86. + # On other arches we can rely on autodetection which uses + # compiler macros. Plus, --jit-backend= doesn't accept all + # the modern values... + + if use x86; then + if use cpu_flags_x86_sse2; then + jit_backend+=x86 + else + jit_backend+=x86-without-sse2 + fi + else + jit_backend+=auto + fi + fi + + local args=( + --no-shared + $(usex jit -Ojit -O2) + + ${jit_backend} + + pypy/goal/targetpypystandalone + ) + + # Avoid linking against libraries disabled by use flags + local opts=( + bzip2:bz2 + ncurses:_minimal_curses + ) + + local opt + for opt in "${opts[@]}"; do + local flag=${opt%:*} + local mod=${opt#*:} + + args+=( + $(usex ${flag} --withmod --withoutmod)-${mod} + ) + done + + local interp + if use low-memory || has_version -b dev-python/pypy; then + einfo "Using already-installed PyPy to perform the translation." + interp=( pypy ) + if use low-memory; then + local -x PYPY_GC_MAX_DELTA=200MB + interp+=( --jit loop_longevity=300 ) + fi + else + einfo "Using CPython 2.7 to perform the translation." + interp=( python2.7 ) + + # reuse bundled pycparser to avoid external dep + mkdir -p "${T}"/pymod/cffi || die + : > "${T}"/pymod/cffi/__init__.py || die + cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die + local -x PYTHONPATH=${T}/pymod:${PYTHONPATH} + fi + + # translate into the C sources + # we're going to build them ourselves since otherwise pypy does not + # free up the unneeded memory before spawning the compiler + set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" + echo -e "\033[1m${@}\033[0m" + "${@}" || die "translation failed" +} + +src_compile() { + emake -C "${T}"/usession*-0/testing_1 +} + +src_install() { + local dest=/usr/lib/pypy2.7 + exeinto "${dest}" + newexe "${T}"/usession*-0/testing_1/pypy-c pypy-c-${PYPY_PV} + insinto "${dest}"/include/${PYPY_PV} + doins include/pypy_* + pax-mark m "${ED}${dest}/pypy-c-${PYPY_PV}" +} diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest index 8e46d97feab0..fb6c9494f644 100644 --- a/dev-python/pypy/Manifest +++ b/dev-python/pypy/Manifest @@ -1,7 +1,10 @@ +DIST pypy2.7-gentoo-patches-7.3.10.tar.xz 5312 BLAKE2B 3ca6d3a01914ae92d93fbd185705dae6bebfd4869a818f4a8058c9df3ea243fd9f1e5b962351f8d07a9679e8020499e81b7d1114d4f1b7493dc1d34c8c04409e SHA512 6758894f6d66dc99a13471cf373c5a2d2bbf37ac561e8d7c4f57ec2f1a9653cf9859547d9a7a80e7f0f7df16078030a4b1cee69536958176f0261da49493310e DIST pypy2.7-gentoo-patches-7.3.10rc3.tar.xz 5324 BLAKE2B 83675b7d2aa0eaace337308e9d818e1d745471a72bd67f269265b06b40a2fb62e26aedd2489ceaf02eb15dd655277dcf8fc3fe280d83d636afb0a69eb2b35795 SHA512 7fdf4fc2f7fdd8accd8af6f8713c6db55510be7a129e608ef0a7c30cd8db74f2711ded41daae3d2d698e394a146996cf699d87147a5d433a2321bcb7682c15b7 DIST pypy2.7-gentoo-patches-7.3.9.tar.xz 7428 BLAKE2B 0a42e3c04ac0e560d56ce7218db81fa55f74ad45a4a033ccda8c5fba34e3a0b1f06587b5b18e947170cc635bd44e5a7799daeec9319c6a09165a73b32554a4b6 SHA512 3a52d40ccf8d77f3493a763b51e4bf86a808f6478191ed4eeaa4f2c2ce8b75769c3880d07cbc7614d8af5573f3e8edfe694be41626b947f3d06c321cf4f59abd +DIST pypy2.7-v7.3.10-src.tar.bz2 19865458 BLAKE2B 0ba83b873daf99b20bd38ee63734c7ceb47b6a7e9cb4bdab1ebbd5672767411f0bf926a19a7074cbfc154a8d83e3679c98fe38c5b6e00c1a4a3fab5424b5ba5d SHA512 750427ce03fdc39f8b6df528f5a2b17f33429433f583a7c46a6b9564f7e398616ae61efb635a4bc0a1f8916ca1881bf1f6347a7ea1748c09ae02e4d88315986d DIST pypy2.7-v7.3.10rc3-src.tar.bz2 19776339 BLAKE2B a6866a0ff7a7b4bb3e1815fdc741cc95ff7945f6271e0189b6d16d1efc64c72a75a1400c3859a5b8c5f5b176217463a446b3449093572df59e13df15a207828f SHA512 097d57862728197e648cf38380ce4a60d6192bc9f2c0c2cf6840717af0320acd8cf42e344513428be60f60e136d830a0bb5d6295e7909cd7f3a42bac992c780a DIST pypy2.7-v7.3.9-src.tar.bz2 23328628 BLAKE2B 50d015439b6a6f15dd24eb4524726a2054f0d8e7ef209b54dc4eb9365b41b333f3dad525422316af3ff19e6ffb5866859db4455e05fc1529a81ce3b6e7c621db SHA512 8d7513d4efe924f2456dd65a45a82dd16171f7962c81ba90f2a168c332cdad78ceffa3ed1af379c09e61082b39d5c2a8385cd77c89b698c47cc75e9df1bb4d2a +EBUILD pypy-7.3.10.ebuild 7012 BLAKE2B 239681a700f238f19d34510fa321a4db23be9efe98feb29dc5c13dd12099a5b6860aaa543593566dd8aaee827ccdc86856c01d3f01f71e6e9970d0f84bca0cfb SHA512 470826074d92472f837e1014259a29757ae61d93ace35d3a198707ddf878e96dbe30bf41873b48f2e738171a2403006a716cac40d1c2246d69ad1bd1a98d729f EBUILD pypy-7.3.10_rc3.ebuild 6963 BLAKE2B bb3c04857ccef66389c31193819f76c10f05ed61b619cd1f43746b74ab46cdd99cc2501cbeb600aea5d607eb354b5c6b45a665626a3757c77c722fc6d6226e7d SHA512 6f57796586aa91642ca91fe24f1567d321c4d496edbeee0daaaaf471e9956b24ddbe38713bb85d4fd3dccedfda13efa937ed1d7e3c2177ccc037151d6cc7a9ef EBUILD pypy-7.3.9-r2.ebuild 7010 BLAKE2B 182abe818f1bf4c5446e541633f71a15472e36dd4ccbc1d9cde67f2cd52fb6d7eb75e8391f8d067a76a7065c90d6bb00f53ea535b22dcdced98a920cd3ec20a0 SHA512 c4067b8baae7cf1bf7803bee808c6c8175fa2c160bbb98f7f325b98e819b67c359c8927313bdac84fa772d70b52b15285c7ad9102f17907ccc4b05ff3ffd5230 MISC metadata.xml 565 BLAKE2B 956a62e9d3632a7ab9ade67527bae54fe0b58d79a6c2f26dc7017a6b8d337f7e5a155b747f24b98f345eb9e1d15c3f38d8530212ad16cfa5292d6cb1ecbf3e91 SHA512 6dd5bc7712533a926b7efdba10c3bea32c813d703916f6bf152ff14f7561cdc466354c8fdbb9640afe415daa3cf2d9365351261e89b8aadfae7b74afd48ae061 diff --git a/dev-python/pypy/pypy-7.3.10.ebuild b/dev-python/pypy/pypy-7.3.10.ebuild new file mode 100644 index 000000000000..bc21aa76af5e --- /dev/null +++ b/dev-python/pypy/pypy-7.3.10.ebuild @@ -0,0 +1,302 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils python-utils-r1 + +PYPY_PV=${PV%_p*} +MY_P=pypy2.7-v${PYPY_PV/_} +PATCHSET="pypy2.7-gentoo-patches-${PV/_rc/rc}" + +DESCRIPTION="A fast, compliant alternative implementation of the Python language" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' +SLOT="0/73" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="bzip2 full-stdlib gdbm +jit ncurses sqlite tk" +RESTRICT="!full-stdlib? ( test )" + +RDEPEND=" + || ( + >=dev-python/pypy-exe-${PYPY_PV}:${PYPY_PV}[bzip2?,ncurses?] + >=dev-python/pypy-exe-bin-${PYPY_PV}:${PYPY_PV} + ) + dev-libs/openssl:0= + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !<dev-python/pypy-bin-7.3.0:0 +" +DEPEND=" + ${RDEPEND} +" + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + default +} + +src_compile() { + # copy over to make sys.prefix happy + cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PYPY_PV} pypy-c || die + cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/* include/ || die + # (not installed by pypy) + rm pypy/module/cpyext/include/_numpypy/numpy/README || die + mv pypy/module/cpyext/include/* include/ || die + mv pypy/module/cpyext/parse/*.h include/ || die + pax-mark m pypy-c + + # verify the subslot + local soabi=$( + ./pypy-c - <<-EOF + import sysconfig + print sysconfig.get_config_var("SOABI") + EOF + ) + [[ ${soabi#pypy-} == ${SLOT#*/} ]] || die "update subslot to ${soabi}" + + einfo "Generating caches and CFFI modules ..." + + if use full-stdlib; then + # Generate Grammar and PatternGrammar pickles. + ./pypy-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed" + import lib2to3.pygram + import lib2to3.patcomp + lib2to3.patcomp.PatternCompiler() + EOF + + # Generate cffi modules + # Please keep in sync with pypy/tool/build_cffi_imports.py! + cffi_targets=( pypy_util ssl audioop syslog pwdgrp resource ) + use gdbm && cffi_targets+=( gdbm ) + use ncurses && cffi_targets+=( curses ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + + # Verify that CFFI module list is up-to-date + local expected_cksum=2d3acf18 + local local_cksum=$( + ../pypy-c - <<-EOF + import binascii + import json + from pypy_tools.build_cffi_imports import cffi_build_scripts as x + print("%08x" % (binascii.crc32(json.dumps(x)),)) + EOF + ) + if [[ ${local_cksum} != ${expected_cksum} ]]; then + die "Please verify cffi_targets and update checksum to ${local_cksum}" + fi + + # Cleanup temporary objects + find -name "_cffi_*.[co]" -delete || die + find -type d -empty -delete || die + fi +} + +src_test() { + # (unset) + local -x PYTHONDONTWRITEBYTECODE= + local -x COLUMNS=80 + + local ignored_tests=( + # network + --ignore=lib-python/2.7/test/test_urllibnet.py + --ignore=lib-python/2.7/test/test_urllib2net.py + # lots of free space + --ignore=lib-python/2.7/test/test_zipfile64.py + + # broken by expat-2.4.5 + --ignore=lib-python/2.7/test/test_minidom.py + --ignore=lib-python/2.7/test/test_xml_etree.py + --ignore=lib-python/2.7/test/test_xml_etree_c.py + ) + + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ + "${ignored_tests[@]}" lib-python || die +} + +src_install() { + local dest=/usr/lib/pypy2.7 + einfo "Installing PyPy ..." + dosym pypy-c-${PYPY_PV} "${dest}/pypy-c" + insinto "${dest}" + # preserve mtimes to avoid obsoleting caches + insopts -p + if use full-stdlib; then + doins -r include lib_pypy lib-python + + # replace copied headers with symlinks + for x in "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/*; do + dosym "${PYPY_PV}/${x##*/}" "${dest}/include/${x##*/}" + done + + if ! use gdbm; then + rm -r "${ED}${dest}"/lib_pypy/gdbm.py \ + "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die + fi + if ! use sqlite; then + rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \ + "${ED}${dest}"/lib_pypy/_sqlite3.py \ + "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ + "${ED}${dest}"/lib_pypy/_tkinter \ + "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die + fi + else + # install only the absolutely minimal subset of modules needed + # for pypy3 build + local lib_py_modules=( + # base modules needed to even start pypy (and import site) + codecs.py + copy_reg.py + encodings + genericpath.py + linecache.py + os.py + pkgutil.py + posixpath.py + re.py + runpy.py + site.py + sre_compile.py + sre_constants.py + sre_parse.py + stat.py + string.py + sysconfig.py + traceback.py + warnings.py + UserDict.py + + # needed for python_optimize + compileall.py + getopt.py + py_compile.py + struct.py + + # needed for rpython + argparse.py + atexit.py + base64.py + bdb.py + bisect.py + cmd.py + code.py + codeop.py + collections.py + colorsys.py + contextlib.py + copy.py + ctypes + dis.py + fnmatch.py + functools.py + gettext.py + hashlib.py + heapq.py + inspect.py + io.py + json + keyword.py + locale.py + logging + new.py + opcode.py + optparse.py + pdb.py + pickle.py + platform.py + pprint.py + random.py + repr.py + shlex.py + shutil.py + StringIO.py + subprocess.py + tempfile.py + textwrap.py + threading.py + tokenize.py + weakref.py + zipfile.py + ) + + local distutils_modules=( + # needed by site + __init__.py + errors.py + sysconfig.py + sysconfig_cpython.py + sysconfig_pypy.py + ) + + local lib_pypy_modules=( + # needed by site + _sysconfigdata.py + + # needed by rpython + cffi + _ctypes + _ffi.py + _functools.py + _sha.py + _sha256.py + _sha512.py + + # NB: we're deliberately skipping _hashlib to avoid some deps + ) + + cd lib-python/2.7 || die + insinto "${dest}/lib-python/2.7" + doins -r "${lib_py_modules[@]}" + cd - >/dev/null || die + + cd lib-python/2.7/distutils || die + insinto "${dest}/lib-python/2.7/distutils" + doins -r "${distutils_modules[@]}" + cd - >/dev/null || die + + cd lib_pypy || die + insinto "${dest}/lib_pypy" + doins -r "${lib_pypy_modules[@]}" + cd - >/dev/null || die + fi + + dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy + dodoc README.rst + + local -x EPYTHON=pypy + local -x PYTHON=${ED}${dest}/pypy-c-${PYPY_PV} + # temporarily copy to build tree to facilitate module builds + cp -p "${BROOT}${dest}/pypy-c-${PYPY_PV}" "${PYTHON}" || die + + einfo "Byte-compiling Python standard library..." + python_optimize "${ED}${dest}" + + # remove to avoid collisions + rm "${PYTHON}" || die +} diff --git a/dev-python/pypy3-exe-bin/Manifest b/dev-python/pypy3-exe-bin/Manifest index c52e4227046a..d9a6b830b716 100644 --- a/dev-python/pypy3-exe-bin/Manifest +++ b/dev-python/pypy3-exe-bin/Manifest @@ -1,3 +1,11 @@ +DIST pypy3-exe-7.3.10-1.amd64-musl.gpkg.tar 11888640 BLAKE2B 89fc1c3216c1597e61814406d1d2ef536f204262f9de364277ec237037eff0cb915cb78d40ad108632c52e82ddeeafd13941fc5c487c3c1792ca76d11e308458 SHA512 f74bee3c7d263aee4c6c32637c21bb1d0737d0d9a8159e60c37a772bc533d387574add2942fc45c7ec3fc4750c784b8485d905c1773986874fca64bb491e8cc4 +DIST pypy3-exe-7.3.10-1.amd64.gpkg.tar 11878400 BLAKE2B 2d272f67006eace22d4ea97383282adb19be6a088cc6469f5b1ffeb099f89a0126807faeba3c3c8c33a0d775ab26b2bd7831978f58cded1bb06e68bb8baa808a SHA512 9b0747e25731de36ce59b92a66c1ff40c9619e8d3b05d3eeee617eee7248bfdb75a46afb9c344916aef3cbda529448aef44c3fbd2ea32938983e9163bfcf6d71 +DIST pypy3-exe-7.3.10-1.arm64-musl.gpkg.tar 9922560 BLAKE2B 29dc6797c895e00fed7aa40e85e37b94c206f26f2720b6de2d558fc287516df798ce42b6a7c5c308b92dba51fa582be8a961aabc428c1cac346676d3490ce632 SHA512 5354e1b7adce22911aea916f9dd7ded71ada036e016d02094a4143c7f2428a88d74e1273cfdd19d0b68075975168a1f465181b86f97c5441bfa8085b3784a6be +DIST pypy3-exe-7.3.10-1.arm64.gpkg.tar 9871360 BLAKE2B bc6dd237a3d7179d7f7bc5a0f1e52c21dbeb939850222e371e9deb3bf1c6eb539509505c4077310c71d664e7ef6c3349a1a16d10371abacae9b36b25eb144d16 SHA512 22bd3c7f13092d7e71b1f0d404171a0fd24395b97cc225f507479b2da2154112efadf26ad941fbbb85005bc9d41e553687e7211220858b3c9c12996e9e3dfbb9 +DIST pypy3-exe-7.3.10-1.ppc64le-musl.gpkg.tar 6451200 BLAKE2B e9d057934b329fa2bbad06d30b64ed9decf7d8cefce0e2ee75e077b6d720e3a6d06ef45dc5e70fbc2985fe654b79848725a3be81a95c596c8b2b6cfef807a382 SHA512 6b9bb88f3d29f755e04c693d44401b95f23f9947aeb4bf7e7c109727a64fb8da1eaf572212fbaac129eb81a6e48e52a6d1dcde1e2204d325cb27d0249f98299e +DIST pypy3-exe-7.3.10-1.ppc64le.gpkg.tar 10342400 BLAKE2B a915da1bc290b38f5a0be5c521c9df1fdf0c5290449e1cfc7ca77ba0f8050369b3e58b1828475109ecbc5729c143de9c7824edb7332169af76d57072786a875f SHA512 f9d0a55f30aea0f95c6749b5d20e6276868c53c070e74d38435d1d9112743a849885fdaf22391d94bff2b105440b7a2176b5d2d475a3e58b1c022468602188f3 +DIST pypy3-exe-7.3.10-1.x86-musl.gpkg.tar 8796160 BLAKE2B 87507b496c2ddbddf330132571eb7c0506f95727f19a541176ce3456267e847d7cb52ff73f0a840a250ca196b494ef1e43d5b3b50c9957f1b0b2aa1b4a499b15 SHA512 7a99fbd2f7e68c0f57829a77d744e74538070adc6ff8f2cdc99e9894dcb9fd6a1f2301aa9dfffc56e6f323b1d550eed8b55f13b362fa186860c66a80fad4d30d +DIST pypy3-exe-7.3.10-1.x86.gpkg.tar 8755200 BLAKE2B 2d059a08895299dd3b8fe5d3923060c5cf531c0ae46f08bcb47f2f8aae7b6c8c1ab28e50c79d0fc17942b5e893c8d9f56a49b7569c94c942ce6e4d95a3926375 SHA512 e4d141d716ccc1eb7572d3c570d5583d72f5406d5560a2c9b1818046a1a29a677c862e6695a4880ae12b44d69f8c7ef910a4a1c329ca2c0af390944f60b7387c DIST pypy3-exe-7.3.9_p3-2.amd64-musl.gpkg.tar 12472320 BLAKE2B dc59db0948774f3776d891dc1afbf457005928db8f3ec949e71538f29929f6dcbdd30af0e4f72ae050bc562864ada7a6f7603d85d92f622ff1830b2c4a009d46 SHA512 3f021c0db1c7c8eab50ee9029530aee41d490f467b626a7b22efabc19a0cc6220039134040b01a670352a977925b6ad31071dc30b5f6795c7128e1d889b0a6ff DIST pypy3-exe-7.3.9_p3-2.amd64.gpkg.tar 12451840 BLAKE2B 1c5d0c1698ee4b7051aea5bbd1a7430b2a120d58e65aba70897e00afd5965313bff5b8a4477924a94077660c6f28aac176a09d27f4f8c97a1cdfc80a454e8319 SHA512 e0fe433c026bdd0faca135f3f32e3f7754bc4d2d150deb775171c9de4fa493d3f5842c5c66a02acef7ca0ceb7907231f0070cd50db801d1b417523b438fa77fd DIST pypy3-exe-7.3.9_p3-2.arm64-musl.gpkg.tar 10547200 BLAKE2B 300371635148ef2af0746d7c1c4e896cfb4dc55967e1aa82dfa2081acd8e08c07b614b196ee8e34a0fb1f7407ef9cc556c58b8222bffba47780a277a8506cab5 SHA512 1d9e1b1714f16161c0d2dde26cd60d15c052e5c2426ae4a0073fb2dd7d795d75078cd1ac73e5943118ed7e44e4757b73e8737e5c6d12d78583644747dd253863 @@ -6,5 +14,6 @@ DIST pypy3-exe-7.3.9_p3-2.ppc64le-musl.gpkg.tar 6686720 BLAKE2B 5fa9a09765270494 DIST pypy3-exe-7.3.9_p3-2.ppc64le.gpkg.tar 10946560 BLAKE2B 0b63a9941cfac0d138e8e7781f13a184e03e0dbed45df812177f7a786dc59aee309bc1de5b20b83f6576005380a1a7af752b3de858e0c116eb8c8474b30442de SHA512 df8a4749135f44fe338945df1d867961af39ea8c08f0057c85fdca12f18bb1725c04ee78e3701d7982465ca0092b7640e376a9031bdd5ad50c326e8b86c5bf1b DIST pypy3-exe-7.3.9_p3-2.x86-musl.gpkg.tar 9236480 BLAKE2B 6e319fd0377192c147d4cc16fa5488e938e69c6c04180a9aa873cb9cd772e8f9deadc69fc6309df82a80b8cd58eaccf8b97c69442fbd96c656c907e78882348b SHA512 1c3b3a6cadb8f003172a98334abe24c7732d089c00c3b7c5bbcf1ddbaa908e75d74463fe98ee3f4c76d570860c7c98ff935d462595ae6456702eb10649744a5e DIST pypy3-exe-7.3.9_p3-2.x86.gpkg.tar 9216000 BLAKE2B 03fcb639ce59260a82a249bf60388a67ace5cab51a3d1d9d8c148d0350b483fbc12f3ecaa9d2582e7a31b84c5eea44068dbe589342376413e21ce315419f98a5 SHA512 a3964b1f364dcc0540d72e1364ccf1ed5cf3e5e053a2cfe69697de15586820646c404e931f0a6c08f49de45474ef007ec696484b515b857c29436d4196ec2e81 +EBUILD pypy3-exe-bin-7.3.10.ebuild 1980 BLAKE2B f0bc33b92d985b76d10f3994b77211dd745361da100f7c76c1c1fa57a901a8df7d51a63852560f9548a3068045a5bd36561bafa0a7eb5d446d602d1ccfe79ee5 SHA512 2446227825ea9b85c2a85fdadf1ad35f6c734eeed65a796c63ce4f92e26a92a76392a7456fa85b51ec89867527a082bb2d8ddd4fdd0f5bfcff065948dff19ff4 EBUILD pypy3-exe-bin-7.3.9_p3-r4.ebuild 1978 BLAKE2B f5ef3c09d4b6d67f560a4321f1bd9378f29282725d0e914edbe3cea38bcdc3aa811dd53ea2818a81744266fd5dc68fc0c6ac90f44eea0a4f35083458f75bf291 SHA512 ab7ac54070cfe77085a02fda09cef2e3953bd41480b29abe2dab696f5c4b64e73f48ad301c1fc76fcbdd1849c4719c9b6a4c5d2622d6ff9d2bf3cdb4383cc56c MISC metadata.xml 241 BLAKE2B 4f18c355c71824c25df283b2d463a5abbf2295446e74b960e868dd78d4910ac066725450478087567a6e66b7a8948d99e053f13a7e58dbf2b89fdaf5c2f3436c SHA512 c46e70ffd66754ad84c64806f2bbff25ba9a688f035176a4565afc95351ce10fffba64bbde89965501460b05978c7e59b3d84db6a8cb6efff4055d4b7a5ab5d8 diff --git a/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.10.ebuild b/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.10.ebuild new file mode 100644 index 000000000000..e7bb602c5789 --- /dev/null +++ b/dev-python/pypy3-exe-bin/pypy3-exe-bin-7.3.10.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils unpacker + +MY_P=pypy3-exe-${PV}-1 +DESCRIPTION="PyPy3 executable (pre-built version)" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + elibc_glibc? ( + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.amd64.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.arm64.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.ppc64le.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.x86.gpkg.tar + ) + ) + elibc_musl? ( + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64-musl/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.amd64-musl.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64-musl/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.arm64-musl.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le-musl/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.ppc64le-musl.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86-musl/pypy/dev-python/pypy3-exe/${MY_P}.gpkg.tar + -> ${MY_P}.x86-musl.gpkg.tar + ) + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="3.9-${PV%_p*}" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" + +# sys-devel/gcc for libgcc_s.so +RDEPEND=" + app-arch/bzip2:0/1 + dev-libs/expat:0/0 + dev-libs/libffi:0/8 + sys-libs/ncurses:0/6 + >=sys-libs/zlib-1.1.3:0/1 + virtual/libintl:0/0 + elibc_glibc? ( + sys-devel/gcc + >=sys-libs/glibc-2.35 + ) + !dev-python/pypy3-exe:${SLOT} +" + +PYPY_PV=${PV%_p*} +QA_PREBUILT=" + usr/bin/pypy3.9-c-${PYPY_PV} +" + +src_install() { + insinto / + doins -r image/usr + fperms +x "/usr/bin/pypy3.9-c-${PYPY_PV}" + pax-mark m "${ED}/usr/bin/pypy3.9-c-${PYPY_PV}" +} diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest index f3198aba5647..274a2c6bae7b 100644 --- a/dev-python/pypy3-exe/Manifest +++ b/dev-python/pypy3-exe/Manifest @@ -1,7 +1,10 @@ +DIST pypy3.9-gentoo-patches-7.3.10.tar.xz 10012 BLAKE2B 45186cf6e8608995af6c0d763a2d676d862ba886acb3a0e0f0056309123d0db75240a175ecf90e24889a139f228dffc788872a5ca84736f4ce0901eda0acb789 SHA512 e6c39666f34bb7e2db72f153fad2d89421b30c04de88812637027a7e8a73bccc7620a7296b2b205464ad7fd0c911bc7a7f0dc0fc504dc8d163f7087b8b0c61b3 DIST pypy3.9-gentoo-patches-7.3.10rc3.tar.xz 8712 BLAKE2B 65c5461b4830cd8ee29512d9ce5f7ac9e629710b5177a568f52657e92eefe7d7f1ba3321bd3ee91e94bbccd090ae9b14180617b059b761b0497b1825d66e65f6 SHA512 61fe98885fdd17c03c16316930f277f804dd6a2aa70a9c51ac5287d16c0b53eac58d0db2a55b28bdea1b0ac2a04d9a408343e321f44c57037b747dd76569d3a2 DIST pypy3.9-gentoo-patches-7.3.9_p6.tar.xz 13740 BLAKE2B 0200eb697f4efb0ee47f7ba053f5d8fe45cad317a665637cad8a429327f084e1d4366c44ead4eeb0c4ead1e3d284bee39b1f3b9665de5882004ca8b0f0b90a64 SHA512 961b79074fc1c37e13b8a6cd370b716103fbc942163e2030475317d966c3bedf73876b23751da82dbd759324ff64e06348a167a1ef84adb4b444b2ff1a5b742e +DIST pypy3.9-v7.3.10-src.tar.bz2 23416039 BLAKE2B 1b13e8bbe6c38c4b9183a632063aeed593986bc7906cfe527fa7534d29f9b1ae0f1e6d3795ff73be19f5737c3fd9d1b3cc2777f30d9237d853e4266bea60a5bb SHA512 1ed3fc9cdda7f3144141fc6a37b124e7141cb3f294ce8b5ca3c3aa30a3c58715e168879decaa796c890a9a287c82c2dbabb81db5f6b8d17f4215d7d3261fe9a8 DIST pypy3.9-v7.3.10rc3-src.tar.bz2 23453446 BLAKE2B eefedc5d49602f19c9d39f20f060ddb4f00bd49681fee64fa98a7c7a3856df7f4ae4e17e51a3fa37137d049b463855ce7e2c95abd9878665b66fc9b90a91ec6c SHA512 d831c8c716f40514e54845ec7ab6b3ecf1af74bc66504196dda251d66feff4e206c77535484ef1747dc390db2bdc2be38e9be3401831b321ea043016e42c2a27 DIST pypy3.9-v7.3.9-src.tar.bz2 26976726 BLAKE2B bf1ed21c575901abac020120aaff07ab57f1404713211b19cbd1eb4d6ffc675b7933be8c6fffc2b69ab467963d6598534cd5aa90c02feddad596611d2a6b6581 SHA512 83f8a6a2da351c190d2d224242cbc35e35529c7a8e8d842eaf5c945cbce2e172b02a340f32af3d49df8d5288370d794d5bc95fc12dd4a13d817c925abf06198a +EBUILD pypy3-exe-7.3.10.ebuild 2597 BLAKE2B 2f946a3d125fd578fe66489b0a250d51f1351237eee1ec2272a268031d0088ba96a8266939799df837f3e5e5fe2374c20ed6fd9e6d4771bb6fdeb671cca906c1 SHA512 aa74c5605f30303c554324dd99a1e37a339ac29f0d9f4f06c5a34eb340744e7b7c8694d7745db2f0c87b4210177db4423e0758e2f400575f0072e02e7a41bd17 EBUILD pypy3-exe-7.3.10_rc3.ebuild 2548 BLAKE2B c4d3f4739e11e940b1c04a803f96e66aa08e50949a0144149e6fa8bafc0f4f4242030d5da0276677261a1fa52cec36191368c6c5da863e204ae64ec567b0bd69 SHA512 f0a23c3aa75b7d4aafb5347240189a5b7c5dd168ae2d35a747f97ae42b7bf98930e278ce43feffb1fa473a20a48a3880585fcfbcd9e984f5afc598625e96740f EBUILD pypy3-exe-7.3.9_p3.ebuild 3586 BLAKE2B 6b9920e9197e2926e88c38244bf2a1280ec9492cc08317a109c3143e94e85c230599d31d795e8ea0b05a0be3fcaaaf6cb00b2a1282603e113f019f7ffbe72188 SHA512 d271c300a8af93854a396eb1ecc1c390887dc597a6956512ea77759a7abdad4245530d11ffb434d5511cd81319b18e301fc8c29399afc253b189192950f36a2c MISC metadata.xml 498 BLAKE2B 8dbcdb7c3a4a2fa5d1a922fd5197fb5e3337adcaec1e7d382f25f8696c80726e5b79843477bf8e5ce131aecde6e2c4c283548c5b337e54cb58aaa066013c445a SHA512 8a9bb514bbf3bf328aa63734e1fdc106f6aaf5ccb88c29ad8a686ab2724f3d1f4727163500013dd16e7b34232b881cf47d2f174212b5428ee076af27cf43628d diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.10.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.10.ebuild new file mode 100644 index 000000000000..b6be3f4fae2a --- /dev/null +++ b/dev-python/pypy3-exe/pypy3-exe-7.3.10.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs pax-utils toolchain-funcs + +PYPY_PV=${PV%_p*} +MY_P=pypy3.9-v${PYPY_PV/_} +PATCHSET="pypy3.9-gentoo-patches-${PV/_}" + +DESCRIPTION="PyPy3 executable (build from source)" +HOMEPAGE="https://www.pypy.org/" +SRC_URI=" + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +SLOT="3.9-${PYPY_PV}" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+jit low-memory ncurses cpu_flags_x86_sse2" + +RDEPEND=" + app-arch/bzip2:0= + dev-libs/expat:0= + dev-libs/libffi:0= + >=sys-libs/zlib-1.1.3:0= + virtual/libintl:0= + ncurses? ( sys-libs/ncurses:0= ) + !dev-python/pypy3-exe-bin:${SLOT} +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + dev-python/pypy +" + +check_env() { + if use low-memory; then + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" + fi + + check-reqs_pkg_pretend +} + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && check_env +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && check_env +} + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + default +} + +src_configure() { + tc-export CC + + local jit_backend + if use jit; then + jit_backend='--jit-backend=' + + # We only need the explicit sse2 switch for x86. + # On other arches we can rely on autodetection which uses + # compiler macros. Plus, --jit-backend= doesn't accept all + # the modern values... + + if use x86; then + if use cpu_flags_x86_sse2; then + jit_backend+=x86 + else + jit_backend+=x86-without-sse2 + fi + else + jit_backend+=auto + fi + fi + + local args=( + --no-shared + $(usex jit -Ojit -O2) + + ${jit_backend} + + pypy/goal/targetpypystandalone + --withmod-bz2 + $(usex ncurses --with{,out}mod-_minimal_curses) + ) + + local interp=( pypy ) + if use low-memory; then + local -x PYPY_GC_MAX_DELTA=200MB + interp+=( --jit loop_longevity=300 ) + fi + + # translate into the C sources + # we're going to build them ourselves since otherwise pypy does not + # free up the unneeded memory before spawning the compiler + set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" + echo -e "\033[1m${@}\033[0m" + "${@}" || die "translation failed" +} + +src_compile() { + emake -C "${T}"/usession*-0/testing_1 +} + +src_install() { + cd "${T}"/usession*-0 || die + newbin testing_1/pypy3.9-c pypy3.9-c-${PYPY_PV} + insinto /usr/include/pypy3.9/${PYPY_PV} + doins *.h + pax-mark m "${ED}/usr/bin/pypy3.9-c-${PYPY_PV}" +} diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest index 1eb7acdacf56..605df09d959c 100644 --- a/dev-python/pypy3/Manifest +++ b/dev-python/pypy3/Manifest @@ -1,7 +1,10 @@ +DIST pypy3.9-gentoo-patches-7.3.10.tar.xz 10012 BLAKE2B 45186cf6e8608995af6c0d763a2d676d862ba886acb3a0e0f0056309123d0db75240a175ecf90e24889a139f228dffc788872a5ca84736f4ce0901eda0acb789 SHA512 e6c39666f34bb7e2db72f153fad2d89421b30c04de88812637027a7e8a73bccc7620a7296b2b205464ad7fd0c911bc7a7f0dc0fc504dc8d163f7087b8b0c61b3 DIST pypy3.9-gentoo-patches-7.3.10rc3.tar.xz 8712 BLAKE2B 65c5461b4830cd8ee29512d9ce5f7ac9e629710b5177a568f52657e92eefe7d7f1ba3321bd3ee91e94bbccd090ae9b14180617b059b761b0497b1825d66e65f6 SHA512 61fe98885fdd17c03c16316930f277f804dd6a2aa70a9c51ac5287d16c0b53eac58d0db2a55b28bdea1b0ac2a04d9a408343e321f44c57037b747dd76569d3a2 DIST pypy3.9-gentoo-patches-7.3.9_p9.tar.xz 16508 BLAKE2B 30e61ebccb4949c5da6f1837df0e4474eda99c2b2262994b41ce9a5de58b543562010a28d20abb4d1c53c866d668c717802afd617efbcca142610a67cf1a48da SHA512 20d72fe0b7592f6f326faf8f989dacc4c6204203b270f033ff528bc845e68ea2092fa0a16176e91e882d028f549e6622c609e1566d3bc018b34178de76c48992 +DIST pypy3.9-v7.3.10-src.tar.bz2 23416039 BLAKE2B 1b13e8bbe6c38c4b9183a632063aeed593986bc7906cfe527fa7534d29f9b1ae0f1e6d3795ff73be19f5737c3fd9d1b3cc2777f30d9237d853e4266bea60a5bb SHA512 1ed3fc9cdda7f3144141fc6a37b124e7141cb3f294ce8b5ca3c3aa30a3c58715e168879decaa796c890a9a287c82c2dbabb81db5f6b8d17f4215d7d3261fe9a8 DIST pypy3.9-v7.3.10rc3-src.tar.bz2 23453446 BLAKE2B eefedc5d49602f19c9d39f20f060ddb4f00bd49681fee64fa98a7c7a3856df7f4ae4e17e51a3fa37137d049b463855ce7e2c95abd9878665b66fc9b90a91ec6c SHA512 d831c8c716f40514e54845ec7ab6b3ecf1af74bc66504196dda251d66feff4e206c77535484ef1747dc390db2bdc2be38e9be3401831b321ea043016e42c2a27 DIST pypy3.9-v7.3.9-src.tar.bz2 26976726 BLAKE2B bf1ed21c575901abac020120aaff07ab57f1404713211b19cbd1eb4d6ffc675b7933be8c6fffc2b69ab467963d6598534cd5aa90c02feddad596611d2a6b6581 SHA512 83f8a6a2da351c190d2d224242cbc35e35529c7a8e8d842eaf5c945cbce2e172b02a340f32af3d49df8d5288370d794d5bc95fc12dd4a13d817c925abf06198a +EBUILD pypy3-7.3.10.ebuild 5260 BLAKE2B 1d86ec12e9432ad288e5b5b746c17e0a31453889737aea169187fae168e26c5fefe4678e2cdf3385a45255bc15a3785a2f6efdc11be9368053123b0eea8be43f SHA512 833b6df29545457b443e84f91e6fb809b33a626c5d1b0e4a74047728d0eff7a80f1ed29e0cc4fbaa9b8615b9f24c0a5416a9cd59f974d4e7b90bb854e591dc17 EBUILD pypy3-7.3.10_rc3.ebuild 5211 BLAKE2B e1caa30615767809787d01dd5fc80e3d156dafb3dd2788a59e2ef61a4347ec45e810b29badaebf6a897d2dffa322d6db52475783d8d6952d62d2af41a1c6c75b SHA512 627fe1ad9af9023f202753222c43a3af1da5bdfdf34777ac9bae2f437721eaeb4a8f13144a2abd1b7d4419771065f7f875c6c27e225ea892cb74dd669ad9deb1 EBUILD pypy3-7.3.9_p9.ebuild 5730 BLAKE2B d9d2ae7ede9d548494c0d4f14d150e28a9ad921d82fa1d0ea39289a6e8090f66c7d72de5539cd3f5f8ad30a3b7a918e42c664e1426618fc611bc5193172082f8 SHA512 ae32e79948584725dfcf36df6098d9f17402f187f26dc1c6dbeaac50134907880776cc8ad48efb2222a8eeb22f7c8516b2d2e10c6c27cb05386c09416285a8be MISC metadata.xml 531 BLAKE2B 0f727c7ced9fb24ba0dc0b41d51c177b3711de33b838bf46cfdde5d8b751de9694873c13fe8153747f2cb533c078c54f004ee84b1c3c57b6f8d62128ffb9dba2 SHA512 331b66647a58047ded4bcf1529e3ca16b21cbb37afa82d8be0a4b6ad605e17bf3f1478fad1ea3b9c970bdf5162cb41e6adcb029a261fcbf894e807998b9219f6 diff --git a/dev-python/pypy3/pypy3-7.3.10.ebuild b/dev-python/pypy3/pypy3-7.3.10.ebuild new file mode 100644 index 000000000000..dcc68230be48 --- /dev/null +++ b/dev-python/pypy3/pypy3-7.3.10.ebuild @@ -0,0 +1,189 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils python-utils-r1 toolchain-funcs + +PYPY_PV=${PV%_p*} +MY_P=pypy3.9-v${PYPY_PV/_rc/rc} +PATCHSET="pypy3.9-gentoo-patches-${PV/_rc/rc}" + +DESCRIPTION="A fast, compliant alternative implementation of the Python (3.9) language" +HOMEPAGE=" + https://www.pypy.org/ + https://foss.heptapod.net/pypy/pypy/ +" +SRC_URI=" + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' +# also check pypy/interpreter/pycode.py -> pypy_incremental_magic +SLOT="0/pypy39-pp73-336" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+ensurepip gdbm +jit ncurses sqlite tk" +# many tests are failing upstream +# see https://buildbot.pypy.org/summary?branch=py3.9 +RESTRICT="test" + +RDEPEND=" + || ( + >=dev-python/pypy3-exe-${PYPY_PV}:3.9-${PYPY_PV}[bzip2(+),ncurses?] + >=dev-python/pypy3-exe-bin-${PYPY_PV}:3.9-${PYPY_PV} + ) + dev-lang/python-exec[python_targets_pypy3(-)] + dev-libs/openssl:0= + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) +" +DEPEND=" + ${RDEPEND} +" + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + default + + eapply_user +} + +src_configure() { + tc-export CC +} + +src_compile() { + mkdir bin || die + # switch to the layout expected for cffi module builds + mkdir include/pypy3.9 || die + # copy over to make sys.prefix happy + cp -p "${BROOT}"/usr/bin/pypy3.9-c-${PYPY_PV} pypy3.9-c || die + cp -p "${BROOT}"/usr/include/pypy3.9/${PYPY_PV}/* include/pypy3.9/ || die + # (not installed by pypy-exe) + rm pypy/module/cpyext/include/_numpypy/numpy/README || die + mv pypy/module/cpyext/include/* include/pypy3.9/ || die + mv pypy/module/cpyext/parse/*.h include/pypy3.9/ || die + pax-mark m pypy3.9-c + + # verify the subslot + local soabi=$( + ./pypy3.9-c - <<-EOF + import importlib.util + import sysconfig + soabi = sysconfig.get_config_var("SOABI") + magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff + print(f"{soabi}-{magic}") + EOF + ) + [[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}" + + # Add epython.py to the distribution + echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die + + einfo "Generating caches and CFFI modules ..." + + # Generate Grammar and PatternGrammar pickles. + ./pypy3.9-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed" + import lib2to3.pygram + import lib2to3.patcomp + lib2to3.patcomp.PatternCompiler() + EOF + + # Generate cffi modules + # Please keep in sync with pypy/tool/build_cffi_imports.py! + # (NB: we build CFFI modules first to avoid error log when importing + # build_cffi_imports). + cffi_targets=( pypy_util blake2/_blake2 sha3/_sha3 ssl + audioop syslog pwdgrp resource lzma posixshmem ) + use gdbm && cffi_targets+=( gdbm ) + use ncurses && cffi_targets+=( curses ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + ../pypy3.9-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + + # Verify that CFFI module list is up-to-date + local expected_cksum=63d4659f + local local_cksum=$( + ../pypy3.9-c - <<-EOF + import binascii + import json + from pypy_tools.build_cffi_imports import cffi_build_scripts as x + print("%08x" % (binascii.crc32(json.dumps(x).encode()),)) + EOF + ) + if [[ ${local_cksum} != ${expected_cksum} ]]; then + die "Please verify cffi_targets and update checksum to ${local_cksum}" + fi + + # Cleanup temporary objects + find -name "*_cffi.[co]" -delete || die + find -type d -empty -delete || die +} + +src_install() { + einfo "Installing PyPy ..." + dodir /usr/bin + dosym pypy3.9-c-${PYPY_PV} /usr/bin/pypy3.9 + dosym pypy3.9 /usr/bin/pypy3 + insinto /usr/lib/pypy3.9 + # preserve mtimes to avoid obsoleting caches + insopts -p + doins -r lib-python/3/. lib_pypy/. + insinto /usr/include + doins -r include/pypy3.9 + + # replace copied headers with symlinks + for x in "${BROOT}"/usr/include/pypy3.9/${PYPY_PV}/*; do + dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy3.9/${x##*/}" + done + + dodoc README.rst + + local dest=/usr/lib/pypy3.9 + rm -r "${ED}${dest}"/ensurepip/_bundled || die + if ! use ensurepip; then + rm -r "${ED}${dest}"/ensurepip || die + fi + if ! use gdbm; then + rm -r "${ED}${dest}"/_gdbm* || die + fi + if ! use sqlite; then + rm -r "${ED}${dest}"/sqlite3 \ + "${ED}${dest}"/_sqlite3* \ + "${ED}${dest}"/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED}${dest}"/{idlelib,tkinter} \ + "${ED}${dest}"/_tkinter \ + "${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die + fi + + local -x EPYTHON=pypy3 + local -x PYTHON=${ED}/usr/bin/pypy3.9-c-${PYPY_PV} + # temporarily copy to build tree to facilitate module builds + cp -p "${BROOT}/usr/bin/pypy3.9-c-${PYPY_PV}" "${PYTHON}" || die + + einfo "Byte-compiling Python standard library..." + python_optimize "${ED}${dest}" + + # remove to avoid collisions + rm "${PYTHON}" || die +} |