-# 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/_/}
!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
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
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
}
)
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