# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs PYVER=$(ver_cut 1-2) PATCHSET_PV=$(ver_cut 3-) PYPY_PV=${PATCHSET_PV%_p*} MY_P="pypy${PYVER}-v${PYPY_PV/_}" PATCHSET="pypy${PYVER}-gentoo-patches-${PATCHSET_PV/_rc/rc}" DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language" HOMEPAGE=" https://pypy.org/ https://github.com/pypy/pypy/ " SRC_URI=" https://downloads.python.org/pypy/${MY_P}-src.tar.bz2 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="${PYVER}/pypy310-pp73-384" KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" IUSE="+ensurepip gdbm +jit ncurses sqlite +symlink +test-install tk" # many tests are failing upstream # see https://buildbot.pypy.org/summary?branch=py${PYVER} RESTRICT="test" RDEPEND=" || ( >=dev-python/pypy3_10-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?] >=dev-python/pypy3_10-exe-bin-${PYPY_PV}:${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= ) !dev-python/pypy3_10 symlink? ( ! 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/pypy${PYVER}" LIBDIR "${EPREFIX}/usr/$(get_libdir)" TZPATH "${EPREFIX}/usr/share/zoneinfo" WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip" ) "./pypy${PYVER}-c" -m sysconfig --generate-posix-vars "${overrides[@]}" || die local outdir outdir=$(