summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-28 11:07:35 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-28 11:08:25 +0200
commite50526ec58f29917484489ec5e69be5fa9157dec (patch)
tree629a4b41bf6f52674a2ed3b65639ce19006c0fd1 /dev-python/pypy3-exe
parentdev-python/pypy-exe: Fix CPython bootstrap (diff)
downloadgentoo-e50526ec58f29917484489ec5e69be5fa9157dec.tar.gz
gentoo-e50526ec58f29917484489ec5e69be5fa9157dec.tar.bz2
gentoo-e50526ec58f29917484489ec5e69be5fa9157dec.zip
dev-python/pypy3-exe: Fix CPython bootstrap
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.2.ebuild15
-rw-r--r--dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild15
2 files changed, 20 insertions, 10 deletions
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild
index b8f0cf85d05b..0e94bc1eae89 100644
--- a/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2.ebuild
@@ -31,10 +31,7 @@ BDEPEND="
!low-memory? (
|| (
dev-python/pypy
- (
- dev-lang/python:2.7
- dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
- )
+ dev-lang/python:2.7
)
)"
@@ -129,8 +126,16 @@ src_configure() {
"${EPYTHON}" --jit loop_longevity=300 )
fi
+ if [[ ${EPYTHON} != pypy ]]; then
+ # reuse bundled pycparser to avoid external dep
+ mkdir -p "${T}"/pymod/cffi || die
+ : > "${T}"/pymod/cffi/__init__.py || die
+ cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die
+ local -x PYTHONPATH=${T}/pymod:${PYTHONPATH}
+ fi
+
# translate into the C sources
- # we're going to make them ourselves since otherwise pypy does not
+ # we're going to build them ourselves since otherwise pypy does not
# free up the unneeded memory before spawning the compiler
set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
echo -e "\033[1m${@}\033[0m"
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
index ab30f5451bf1..652138b7c823 100644
--- a/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37.ebuild
@@ -32,10 +32,7 @@ BDEPEND="
!low-memory? (
|| (
dev-python/pypy
- (
- dev-lang/python:2.7
- dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
- )
+ dev-lang/python:2.7
)
)"
@@ -130,8 +127,16 @@ src_configure() {
"${EPYTHON}" --jit loop_longevity=300 )
fi
+ if [[ ${EPYTHON} != pypy ]]; then
+ # reuse bundled pycparser to avoid external dep
+ mkdir -p "${T}"/pymod/cffi || die
+ : > "${T}"/pymod/cffi/__init__.py || die
+ cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die
+ local -x PYTHONPATH=${T}/pymod:${PYTHONPATH}
+ fi
+
# translate into the C sources
- # we're going to make them ourselves since otherwise pypy does not
+ # we're going to build them ourselves since otherwise pypy does not
# free up the unneeded memory before spawning the compiler
set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
echo -e "\033[1m${@}\033[0m"