summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-01-01 16:08:49 +0100
committerMichał Górny <mgorny@gentoo.org>2020-01-01 17:04:12 +0100
commitbe2d45b56ea9f903e544af2ea50bb8be62f264eb (patch)
tree8dab71a487fa5c1add1e1beb3ac4f185ffb8b63a /dev-python/pypy3-exe
parentdev-python/pypy-exe: Fix using pypy for build (diff)
downloadgentoo-be2d45b56ea9f903e544af2ea50bb8be62f264eb.tar.gz
gentoo-be2d45b56ea9f903e544af2ea50bb8be62f264eb.tar.bz2
gentoo-be2d45b56ea9f903e544af2ea50bb8be62f264eb.zip
dev-python/pypy3-exe: Fix using pypy for build
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pypy3-exe')
-rw-r--r--dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild19
1 files changed, 11 insertions, 8 deletions
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild
index e92be6d6a81c..baed59372e8d 100644
--- a/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild
@@ -4,7 +4,7 @@
EAPI=7
# pypy3 needs to be built using python 2
-PYTHON_COMPAT=( python2_7 pypy )
+PYTHON_COMPAT=( python2_7 )
inherit check-reqs pax-utils python-any-r1 toolchain-funcs
MY_P=pypy3.6-v${PV/_/}
@@ -25,7 +25,8 @@ RDEPEND=">=sys-libs/zlib-1.1.3:0=
bzip2? ( app-arch/bzip2:0= )
ncurses? ( sys-libs/ncurses:0= )
!dev-python/pypy3-exe-bin:${PV}"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
low-memory? ( dev-python/pypy )
!low-memory? (
|| (
@@ -59,16 +60,18 @@ pkg_setup() {
# unset to allow forcing pypy below :)
use low-memory && local EPYTHON=
- if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
+ if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] &&
+ { has_version -b dev-python/pypy ||
+ has_version -b dev-python/pypy-bin; }
+ then
einfo "Using PyPy to perform the translation."
- local EPYTHON=pypy
+ EPYTHON=pypy
else
einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
einfo "recommends using PyPy for that. If you wish to do so, please install"
einfo "dev-python/pypy and ensure that EPYTHON variable is unset."
+ python-any-r1_pkg_setup
fi
-
- python-any-r1_pkg_setup
fi
}
@@ -120,10 +123,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