From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1ED7D139694 for ; Wed, 8 Mar 2017 11:32:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57C9021C072; Wed, 8 Mar 2017 11:32:53 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1F2EF21C088 for ; Wed, 8 Mar 2017 11:32:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6F66A3416B6 for ; Wed, 8 Mar 2017 11:32:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D836360FF for ; Wed, 8 Mar 2017 11:32:49 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1488972764.890fe16c41e02c0df1de61c6813ae27aeae28e0b.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy3/pypy3-5.5.0_alpha.ebuild dev-python/pypy3/pypy3-9999.ebuild X-VCS-Directories: dev-python/pypy3/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 890fe16c41e02c0df1de61c6813ae27aeae28e0b X-VCS-Branch: master Date: Wed, 8 Mar 2017 11:32:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bc533126-de4a-4cad-8de6-96b6e15d9e9d X-Archives-Hash: 78f743d9a741435b37e7f4aeb4799584 commit: 890fe16c41e02c0df1de61c6813ae27aeae28e0b Author: Michał Górny gentoo org> AuthorDate: Wed Mar 8 10:56:27 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Mar 8 11:32:44 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=890fe16c 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. dev-python/pypy3/pypy3-5.5.0_alpha.ebuild | 29 ++++++++++++++++++----------- dev-python/pypy3/pypy3-9999.ebuild | 25 ++++++++++++++++++------- 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 53fc3868981..1a436991436 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 9c486a55bf3..b399af1a9d4 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