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/pypy3-exe/
Date: Mon, 28 Sep 2020 09:08:31
Message-Id: 1601284105.e50526ec58f29917484489ec5e69be5fa9157dec.mgorny@gentoo
1 commit: e50526ec58f29917484489ec5e69be5fa9157dec
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 28 09:07:35 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 28 09:08:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e50526ec
7
8 dev-python/pypy3-exe: Fix CPython bootstrap
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild | 15 ++++++++++-----
13 dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild | 15 ++++++++++-----
14 2 files changed, 20 insertions(+), 10 deletions(-)
15
16 diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild
17 index b8f0cf85d05..0e94bc1eae8 100644
18 --- a/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild
19 +++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild
20 @@ -31,10 +31,7 @@ BDEPEND="
21 !low-memory? (
22 || (
23 dev-python/pypy
24 - (
25 - dev-lang/python:2.7
26 - dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
27 - )
28 + dev-lang/python:2.7
29 )
30 )"
31
32 @@ -129,8 +126,16 @@ src_configure() {
33 "${EPYTHON}" --jit loop_longevity=300 )
34 fi
35
36 + if [[ ${EPYTHON} != pypy ]]; then
37 + # reuse bundled pycparser to avoid external dep
38 + mkdir -p "${T}"/pymod/cffi || die
39 + : > "${T}"/pymod/cffi/__init__.py || die
40 + cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die
41 + local -x PYTHONPATH=${T}/pymod:${PYTHONPATH}
42 + fi
43 +
44 # translate into the C sources
45 - # we're going to make them ourselves since otherwise pypy does not
46 + # we're going to build them ourselves since otherwise pypy does not
47 # free up the unneeded memory before spawning the compiler
48 set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
49 echo -e "\033[1m${@}\033[0m"
50
51 diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild
52 index ab30f5451bf..652138b7c82 100644
53 --- a/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild
54 +++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild
55 @@ -32,10 +32,7 @@ BDEPEND="
56 !low-memory? (
57 || (
58 dev-python/pypy
59 - (
60 - dev-lang/python:2.7
61 - dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
62 - )
63 + dev-lang/python:2.7
64 )
65 )"
66
67 @@ -130,8 +127,16 @@ src_configure() {
68 "${EPYTHON}" --jit loop_longevity=300 )
69 fi
70
71 + if [[ ${EPYTHON} != pypy ]]; then
72 + # reuse bundled pycparser to avoid external dep
73 + mkdir -p "${T}"/pymod/cffi || die
74 + : > "${T}"/pymod/cffi/__init__.py || die
75 + cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die
76 + local -x PYTHONPATH=${T}/pymod:${PYTHONPATH}
77 + fi
78 +
79 # translate into the C sources
80 - # we're going to make them ourselves since otherwise pypy does not
81 + # we're going to build them ourselves since otherwise pypy does not
82 # free up the unneeded memory before spawning the compiler
83 set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
84 echo -e "\033[1m${@}\033[0m"