diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-01-01 16:00:32 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-01-01 17:04:11 +0100 |
commit | e4ab61354585af32f432b167bd17c9faffee3b88 (patch) | |
tree | ba5f41e318198f7210020224feb39881c42f4eae /dev-python/pypy-exe | |
parent | dev-python/pypy3-exe: Remove dead USE=sandbox (diff) | |
download | gentoo-e4ab61354585af32f432b167bd17c9faffee3b88.tar.gz gentoo-e4ab61354585af32f432b167bd17c9faffee3b88.tar.bz2 gentoo-e4ab61354585af32f432b167bd17c9faffee3b88.zip |
dev-python/pypy-exe: Fix using pypy for build
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 <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pypy-exe')
-rw-r--r-- | dev-python/pypy-exe/pypy-exe-7.3.0.ebuild | 28 |
1 files 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 |