commit:     f7ef866a84bacbcd370fcda8bbabc60374b8ebbd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  5 14:48:35 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov  5 16:22:58 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7ef866a

dev-python/pypy-bin: Sync to dev-python/pypy

 dev-python/pypy-bin/pypy-bin-5.9.0.ebuild | 82 ++++++++++++++++---------------
 1 file changed, 42 insertions(+), 40 deletions(-)

diff --git a/dev-python/pypy-bin/pypy-bin-5.9.0.ebuild 
b/dev-python/pypy-bin/pypy-bin-5.9.0.ebuild
index b528c67b35d..0ebeca4356f 100644
--- a/dev-python/pypy-bin/pypy-bin-5.9.0.ebuild
+++ b/dev-python/pypy-bin/pypy-bin-5.9.0.ebuild
@@ -99,9 +99,44 @@ src_compile() {
        mv pypy/module/cpyext/include/* include/ || die
        mv pypy/module/cpyext/parse/*.h include/ || die
 
-       use doc && emake -C pypy/doc/ html
-       #needed even without jit :( also needed in both compile and install 
phases
        pax-mark m pypy-c libpypy-c.so
+
+       use doc && emake -C pypy/doc html
+
+       einfo "Generating caches and CFFI modules ..."
+
+       # Generate Grammar and PatternGrammar pickles.
+       ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; 
lib2to3.patcomp.PatternCompiler()" \
+               || die "Generation of Grammar and PatternGrammar pickles failed"
+
+       # Generate cffi modules
+       # Please keep in sync with pypy/tool/build_cffi_imports.py!
+#cffi_build_scripts = {
+#    "sqlite3": "_sqlite3_build.py",
+#    "audioop": "_audioop_build.py",
+#    "tk": "_tkinter/tklib_build.py",
+#    "curses": "_curses_build.py" if sys.platform != "win32" else None,
+#    "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
+#    "gdbm": "_gdbm_build.py"  if sys.platform != "win32" else None,
+#    "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
+#    "resource": "_resource_build.py" if sys.platform != "win32" else None,
+       cffi_targets=( audioop curses syslog pwdgrp resource )
+       use gdbm && cffi_targets+=( gdbm )
+       use sqlite && cffi_targets+=( sqlite3 )
+       use tk && cffi_targets+=( tkinter/tklib )
+
+       local t
+       # all modules except tkinter output to .
+       # tkinter outputs to the correct dir ...
+       cd lib_pypy || die
+       for t in "${cffi_targets[@]}"; do
+               # tkinter doesn't work via -m
+               ../pypy-c "_${t}_build.py" || die "Failed to build CFFI 
bindings for ${t}"
+       done
+
+       # Cleanup temporary objects
+       find -name "_cffi_*.[co]" -delete || die
+       find -type d -empty -delete || die
 }
 
 src_test() {
@@ -114,10 +149,11 @@ src_test() {
 src_install() {
        local dest=/usr/$(get_libdir)/pypy
        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)/pypy/pypy-c /usr/bin/pypy
        dodoc README.rst
 
@@ -139,10 +175,7 @@ src_install() {
        # Install docs
        use doc && dodoc -r pypy/doc/_build/html
 
-       einfo "Generating caches and byte-compiling ..."
-
        local -x PYTHON=${ED%/}${dest}/pypy-c
-       local -x LD_LIBRARY_PATH="${ED%/}${dest}"
        # we can't use eclass function since PyPy is dumb and always gives
        # paths relative to the interpreter
        local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages
@@ -151,38 +184,7 @@ src_install() {
        echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 
-       # Generate Grammar and PatternGrammar pickles.
-       "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; 
lib2to3.patcomp.PatternCompiler()" \
-               || die "Generation of Grammar and PatternGrammar pickles failed"
-
-       # Generate cffi modules
-       # Please keep in sync with pypy/tool/build_cffi_imports.py!
-#cffi_build_scripts = {
-#    "sqlite3": "_sqlite3_build.py",
-#    "audioop": "_audioop_build.py",
-#    "tk": "_tkinter/tklib_build.py",
-#    "curses": "_curses_build.py" if sys.platform != "win32" else None,
-#    "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
-#    "gdbm": "_gdbm_build.py"  if sys.platform != "win32" else None,
-#    "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
-#    "resource": "_resource_build.py" if sys.platform != "win32" else None,
-       cffi_targets=( audioop curses syslog pwdgrp resource )
-       use gdbm && cffi_targets+=( gdbm )
-       use sqlite && cffi_targets+=( sqlite3 )
-       use tk && cffi_targets+=( tkinter/tklib )
-
-       local t
-       # all modules except tkinter output to .
-       # tkinter outputs to the correct dir ...
-       cd "${ED%/}${dest}"/lib_pypy || die
-       for t in "${cffi_targets[@]}"; do
-               # tkinter doesn't work via -m
-               "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI 
bindings for ${t}"
-       done
-
-       # Cleanup temporary objects
-       find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
-       find "${ED%/}${dest}" -type d -empty -delete || die
+       einfo "Byte-compiling Python standard library..."
 
        # compile the installed modules
        python_optimize "${ED%/}${dest}"

Reply via email to