From e4ab61354585af32f432b167bd17c9faffee3b88 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 1 Jan 2020 16:00:32 +0100 Subject: [PATCH] dev-python/pypy-exe: Fix using pypy for build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Now that pypy target is removed, we can't use it via eclass. Make the ebuild call it directly instead. Signed-off-by: Michał Górny --- dev-python/pypy-exe/pypy-exe-7.3.0.ebuild | 28 ++++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild index c8701c10e59c..0b1e0997bb91 100644 --- a/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild +++ b/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python2_7 pypy ) +PYTHON_COMPAT=( python2_7 ) inherit check-reqs pax-utils python-any-r1 toolchain-funcs MY_P=pypy2.7-v${PV/_/} @@ -26,7 +26,8 @@ RDEPEND=">=sys-libs/zlib-1.1.3:0= !dev-python/pypy-exe-bin:${PV}" # don't enforce the dep on pypy with USE=low-memory since it's going # to cause either collisions or circular dep on itself -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" !low-memory? ( || ( dev-python/pypy @@ -39,7 +40,9 @@ DEPEND="${RDEPEND} check_env() { if use low-memory; then - if ! python_is_installed pypy; then + if ! has_version -b dev-python/pypy && + ! has_version -b dev-python/pypy-bin + then eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" eerror "being installed. Please install it using e.g.:" eerror @@ -67,18 +70,21 @@ pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then check_env - if python_is_installed pypy; then - if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then + if has_version -b dev-python/pypy || + has_version -b dev-python/pypy-bin + then + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || + use low-memory + then einfo "Using already-installed PyPy to perform the translation." - local EPYTHON=pypy + EPYTHON=pypy else einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" einfo "recommends using PyPy for that. If you wish to do so, please unset" einfo "the EPYTHON variable." + python-any-r1_pkg_setup fi fi - - python-any-r1_pkg_setup fi } @@ -130,10 +136,10 @@ src_configure() { ) done - local interp=( "${PYTHON}" ) + local interp=( "${EPYTHON}" ) if use low-memory; then interp=( env PYPY_GC_MAX_DELTA=200MB - "${PYTHON}" --jit loop_longevity=300 ) + "${EPYTHON}" --jit loop_longevity=300 ) fi # translate into the C sources -- 2.26.2