summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-03-08 11:56:27 +0100
committerMichał Górny <mgorny@gentoo.org>2017-03-08 12:32:44 +0100
commit890fe16c41e02c0df1de61c6813ae27aeae28e0b (patch)
tree8220061961040ee6f7796327e34c5880ea0bcf40
parentdev-python/pypy3: Sync the live ebuild (diff)
downloadgentoo-890fe16c41e02c0df1de61c6813ae27aeae28e0b.tar.gz
gentoo-890fe16c41e02c0df1de61c6813ae27aeae28e0b.tar.bz2
gentoo-890fe16c41e02c0df1de61c6813ae27aeae28e0b.zip
dev-python/pypy3: Split translation and compile phases
Like in dev-python/pypy, use --source to disable auto-spawning compilation phase in rpython. Instead, run it manually in src_compile(). This way we reduce memory consumption (since rpython normally does not free the lots of memory it used during the translation while spawning the compiler), and make the process easier to resume.
-rw-r--r--dev-python/pypy3/pypy3-5.5.0_alpha.ebuild29
-rw-r--r--dev-python/pypy3/pypy3-9999.ebuild25
2 files changed, 36 insertions, 18 deletions
diff --git a/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild b/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
index 53fc3868981c..1a4369914362 100644
--- a/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
+++ b/dev-python/pypy3/pypy3-5.5.0_alpha.ebuild
@@ -94,7 +94,7 @@ src_prepare() {
epatch_user
}
-src_compile() {
+src_configure() {
tc-export CC
local jit_backend
@@ -151,16 +151,22 @@ src_compile() {
"${PYTHON}" --jit loop_longevity=300 )
fi
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}"
+ # translate into the C sources
+ # we're going to make 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"
- "${@}" || die "compile error"
+ "${@}" || die "translation failed"
+}
+
+src_compile() {
+ emake -C "${T}"/usession*-current/testing_1
- # Exception occurred:
- # File "/tmp/1/pypy3-2.4.0-src/pypy/config/makerestdoc.py", line 199, in config_role
- # assert txt.check()
- # AssertionError
- #use doc && emake -C pypy/doc/ html
+ # copy back to make sys.prefix happy
+ cp -p "${T}"/usession*-current/testing_1/{pypy-c,libpypy-c.so} . || die
pax-mark m pypy-c libpypy-c.so
+
+ #use doc && emake -C pypy/doc html
}
src_test() {
@@ -175,10 +181,11 @@ src_test() {
src_install() {
local dest=/usr/$(get_libdir)/pypy3
einfo "Installing PyPy ..."
- insinto "${dest}"
- doins -r include lib_pypy lib-python pypy-c libpypy-c.so
- fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
+ exeinto "${dest}"
+ doexe pypy-c libpypy-c.so
pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
+ insinto "${dest}"
+ doins -r include lib_pypy lib-python
dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
dodoc README.rst
diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index 9c486a55bf39..b399af1a9d49 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -103,7 +103,7 @@ src_prepare() {
epatch_user
}
-src_compile() {
+src_configure() {
tc-export CC
local jit_backend
@@ -160,12 +160,22 @@ src_compile() {
"${PYTHON}" --jit loop_longevity=300 )
fi
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}"
+ # translate into the C sources
+ # we're going to make 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"
- "${@}" || die "compile error"
+ "${@}" || die "translation failed"
+}
+
+src_compile() {
+ emake -C "${T}"/usession*-current/testing_1
- #use doc && emake -C pypy/doc/ html
+ # copy back to make sys.prefix happy
+ cp -p "${T}"/usession*-current/testing_1/{pypy-c,libpypy-c.so} . || die
pax-mark m pypy-c libpypy-c.so
+
+ #use doc && emake -C pypy/doc html
}
src_test() {
@@ -180,10 +190,11 @@ src_test() {
src_install() {
local dest=/usr/$(get_libdir)/pypy3
einfo "Installing PyPy ..."
- insinto "${dest}"
- doins -r include lib_pypy lib-python pypy-c libpypy-c.so
- fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
+ exeinto "${dest}"
+ doexe pypy-c libpypy-c.so
pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
+ insinto "${dest}"
+ doins -r include lib_pypy lib-python
dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
dodoc README.rst