From 4c51ef39a9b443061a7071e002d7daa2a4d16141 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 29 Jan 2023 14:55:22 +0000 Subject: gentoo auto-resync : 29:01:2023 - 14:55:22 --- dev-python/pypy3/pypy3-7.3.11-r1.ebuild | 205 ++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 dev-python/pypy3/pypy3-7.3.11-r1.ebuild (limited to 'dev-python/pypy3/pypy3-7.3.11-r1.ebuild') diff --git a/dev-python/pypy3/pypy3-7.3.11-r1.ebuild b/dev-python/pypy3/pypy3-7.3.11-r1.ebuild new file mode 100644 index 000000000000..d0f7918e6b5f --- /dev/null +++ b/dev-python/pypy3/pypy3-7.3.11-r1.ebuild @@ -0,0 +1,205 @@ +# Copyright 1999-2023 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= + dev-python/gentoo-common + 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 sysconfig data + local host_gnu_type=$(sh pypy/tool/release/config.guess) + local overrides=( + HOST_GNU_TYPE "${host_gnu_type:-unknown}" + INCLUDEPY "${EPREFIX}/usr/include/pypy3.9" + LIBDIR "${EPREFIX}/usr/$(get_libdir)" + TZPATH "${EPREFIX}/usr/share/zoneinfo" + WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip" + ) + ./pypy3.9-c -m sysconfig --generate-posix-vars "${overrides[@]}" || die + local outdir + outdir=$(