1 |
commit: be2d45b56ea9f903e544af2ea50bb8be62f264eb |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 1 15:08:49 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 1 16:04:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be2d45b5 |
7 |
|
8 |
dev-python/pypy3-exe: Fix using pypy for build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild | 19 +++++++++++-------- |
13 |
1 file changed, 11 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild |
16 |
index e92be6d6a81..baed59372e8 100644 |
17 |
--- a/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild |
18 |
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.0.ebuild |
19 |
@@ -4,7 +4,7 @@ |
20 |
EAPI=7 |
21 |
|
22 |
# pypy3 needs to be built using python 2 |
23 |
-PYTHON_COMPAT=( python2_7 pypy ) |
24 |
+PYTHON_COMPAT=( python2_7 ) |
25 |
inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
26 |
|
27 |
MY_P=pypy3.6-v${PV/_/} |
28 |
@@ -25,7 +25,8 @@ RDEPEND=">=sys-libs/zlib-1.1.3:0= |
29 |
bzip2? ( app-arch/bzip2:0= ) |
30 |
ncurses? ( sys-libs/ncurses:0= ) |
31 |
!dev-python/pypy3-exe-bin:${PV}" |
32 |
-DEPEND="${RDEPEND} |
33 |
+DEPEND="${RDEPEND}" |
34 |
+BDEPEND=" |
35 |
low-memory? ( dev-python/pypy ) |
36 |
!low-memory? ( |
37 |
|| ( |
38 |
@@ -59,16 +60,18 @@ pkg_setup() { |
39 |
|
40 |
# unset to allow forcing pypy below :) |
41 |
use low-memory && local EPYTHON= |
42 |
- if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then |
43 |
+ if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] && |
44 |
+ { has_version -b dev-python/pypy || |
45 |
+ has_version -b dev-python/pypy-bin; } |
46 |
+ then |
47 |
einfo "Using PyPy to perform the translation." |
48 |
- local EPYTHON=pypy |
49 |
+ EPYTHON=pypy |
50 |
else |
51 |
einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" |
52 |
einfo "recommends using PyPy for that. If you wish to do so, please install" |
53 |
einfo "dev-python/pypy and ensure that EPYTHON variable is unset." |
54 |
+ python-any-r1_pkg_setup |
55 |
fi |
56 |
- |
57 |
- python-any-r1_pkg_setup |
58 |
fi |
59 |
} |
60 |
|
61 |
@@ -120,10 +123,10 @@ src_configure() { |
62 |
) |
63 |
done |
64 |
|
65 |
- local interp=( "${PYTHON}" ) |
66 |
+ local interp=( "${EPYTHON}" ) |
67 |
if use low-memory; then |
68 |
interp=( env PYPY_GC_MAX_DELTA=200MB |
69 |
- "${PYTHON}" --jit loop_longevity=300 ) |
70 |
+ "${EPYTHON}" --jit loop_longevity=300 ) |
71 |
fi |
72 |
|
73 |
# translate into the C sources |