commit: 8ed3be6de5ac0784775ed652587c93de957cddf0
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 28 07:22:14 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 28 09:08:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ed3be6d
dev-python/pypy-exe: Fix CPython bootstrap
Reuse the pycparser copy bundled with cffi to avoid depending
on external pycparser package, and therefore fix the build when it is
not available anymore.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pypy-exe/pypy-exe-7.3.2.ebuild | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/dev-python/pypy-exe/pypy-exe-7.3.2.ebuild
b/dev-python/pypy-exe/pypy-exe-7.3.2.ebuild
index 73059311188..961ae14ae10 100644
--- a/dev-python/pypy-exe/pypy-exe-7.3.2.ebuild
+++ b/dev-python/pypy-exe/pypy-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
)
)"
@@ -140,8 +137,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"