Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy-exe/
Date: Wed, 01 Jan 2020 16:04:24
Message-Id: 1577894651.e4ab61354585af32f432b167bd17c9faffee3b88.mgorny@gentoo
1 commit: e4ab61354585af32f432b167bd17c9faffee3b88
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 1 15:00:32 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 1 16:04:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4ab6135
7
8 dev-python/pypy-exe: Fix using pypy for build
9
10 Now that pypy target is removed, we can't use it via eclass. Make
11 the ebuild call it directly instead.
12
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 dev-python/pypy-exe/pypy-exe-7.3.0.ebuild | 28 +++++++++++++++++-----------
16 1 file changed, 17 insertions(+), 11 deletions(-)
17
18 diff --git a/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild b/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild
19 index c8701c10e59..0b1e0997bb9 100644
20 --- a/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild
21 +++ b/dev-python/pypy-exe/pypy-exe-7.3.0.ebuild
22 @@ -1,9 +1,9 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 +# Copyright 1999-2020 Gentoo Authors
25 # Distributed under the terms of the GNU General Public License v2
26
27 EAPI=7
28
29 -PYTHON_COMPAT=( python2_7 pypy )
30 +PYTHON_COMPAT=( python2_7 )
31 inherit check-reqs pax-utils python-any-r1 toolchain-funcs
32
33 MY_P=pypy2.7-v${PV/_/}
34 @@ -26,7 +26,8 @@ RDEPEND=">=sys-libs/zlib-1.1.3:0=
35 !dev-python/pypy-exe-bin:${PV}"
36 # don't enforce the dep on pypy with USE=low-memory since it's going
37 # to cause either collisions or circular dep on itself
38 -DEPEND="${RDEPEND}
39 +DEPEND="${RDEPEND}"
40 +BDEPEND="
41 !low-memory? (
42 || (
43 dev-python/pypy
44 @@ -39,7 +40,9 @@ DEPEND="${RDEPEND}
45
46 check_env() {
47 if use low-memory; then
48 - if ! python_is_installed pypy; then
49 + if ! has_version -b dev-python/pypy &&
50 + ! has_version -b dev-python/pypy-bin
51 + then
52 eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy"
53 eerror "being installed. Please install it using e.g.:"
54 eerror
55 @@ -67,18 +70,21 @@ pkg_setup() {
56 if [[ ${MERGE_TYPE} != binary ]]; then
57 check_env
58
59 - if python_is_installed pypy; then
60 - if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then
61 + if has_version -b dev-python/pypy ||
62 + has_version -b dev-python/pypy-bin
63 + then
64 + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] ||
65 + use low-memory
66 + then
67 einfo "Using already-installed PyPy to perform the translation."
68 - local EPYTHON=pypy
69 + EPYTHON=pypy
70 else
71 einfo "Using ${EPYTHON} to perform the translation. Please note that upstream"
72 einfo "recommends using PyPy for that. If you wish to do so, please unset"
73 einfo "the EPYTHON variable."
74 + python-any-r1_pkg_setup
75 fi
76 fi
77 -
78 - python-any-r1_pkg_setup
79 fi
80 }
81
82 @@ -130,10 +136,10 @@ src_configure() {
83 )
84 done
85
86 - local interp=( "${PYTHON}" )
87 + local interp=( "${EPYTHON}" )
88 if use low-memory; then
89 interp=( env PYPY_GC_MAX_DELTA=200MB
90 - "${PYTHON}" --jit loop_longevity=300 )
91 + "${EPYTHON}" --jit loop_longevity=300 )
92 fi
93
94 # translate into the C sources