summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-28 09:22:14 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-28 11:08:24 +0200
commit8ed3be6de5ac0784775ed652587c93de957cddf0 (patch)
treeee0d4029da4ea9db223c98691521ebedfe842206 /dev-python/pypy-exe
parentmedia-gfx/qrencode: Bump to 4.1.1 (diff)
downloadgentoo-8ed3be6de5ac0784775ed652587c93de957cddf0.tar.gz
gentoo-8ed3be6de5ac0784775ed652587c93de957cddf0.tar.bz2
gentoo-8ed3be6de5ac0784775ed652587c93de957cddf0.zip
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@gentoo.org>
Diffstat (limited to 'dev-python/pypy-exe')
-rw-r--r--dev-python/pypy-exe/pypy-exe-7.3.2.ebuild15
1 files 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"