Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-bin/
Date: Sun, 05 Nov 2017 16:23:15
Message-Id: 1509898984.4f81065965bb531663dfa7f8d757d1ebd4393d2b.mgorny@gentoo
1 commit: 4f81065965bb531663dfa7f8d757d1ebd4393d2b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 5 16:10:07 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 5 16:23:04 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f810659
7
8 dev-python/pypy3-bin: Sync to dev-python/pypy3
9
10 dev-python/pypy3-bin/pypy3-bin-5.9.0.ebuild | 85 +++++++++++++++--------------
11 1 file changed, 45 insertions(+), 40 deletions(-)
12
13 diff --git a/dev-python/pypy3-bin/pypy3-bin-5.9.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-5.9.0.ebuild
14 index cea9bc9a319..55abb1af9ee 100644
15 --- a/dev-python/pypy3-bin/pypy3-bin-5.9.0.ebuild
16 +++ b/dev-python/pypy3-bin/pypy3-bin-5.9.0.ebuild
17 @@ -90,8 +90,47 @@ src_compile() {
18 mv pypy/module/cpyext/parse/*.h include/ || die
19
20 #use doc && emake -C pypy/doc/ html
21 - #needed even without jit :( also needed in both compile and install phases
22 pax-mark m pypy3-c libpypy3-c.so
23 +
24 + #use doc && emake -C pypy/doc html
25 +
26 + einfo "Generating caches and CFFI modules ..."
27 +
28 + # Generate Grammar and PatternGrammar pickles.
29 + "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
30 + || die "Generation of Grammar and PatternGrammar pickles failed"
31 +
32 + # Generate cffi modules
33 + # Please keep in sync with pypy/tool/build_cffi_imports.py!
34 +#cffi_build_scripts = {
35 +# "sqlite3": "_sqlite3_build.py",
36 +# "audioop": "_audioop_build.py",
37 +# "tk": "_tkinter/tklib_build.py",
38 +# "curses": "_curses_build.py" if sys.platform != "win32" else None,
39 +# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
40 +# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
41 +# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
42 +# "resource": "_resource_build.py" if sys.platform != "win32" else None,
43 +# "lzma": "_lzma_build.py",
44 +# "_decimal": "_decimal_build.py",
45 +# "ssl": "_ssl_build.py",
46 + cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl )
47 + use gdbm && cffi_targets+=( gdbm )
48 + use sqlite && cffi_targets+=( sqlite3 )
49 + use tk && cffi_targets+=( tkinter/tklib )
50 +
51 + local t
52 + # all modules except tkinter output to .
53 + # tkinter outputs to the correct dir ...
54 + cd lib_pypy || die
55 + for t in "${cffi_targets[@]}"; do
56 + # tkinter doesn't work via -m
57 + ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
58 + done
59 +
60 + # Cleanup temporary objects
61 + find -name "_cffi_*.[co]" -delete || die
62 + find -type d -empty -delete || die
63 }
64
65 src_test() {
66 @@ -106,10 +145,11 @@ src_test() {
67 src_install() {
68 local dest=/usr/$(get_libdir)/pypy3
69 einfo "Installing PyPy ..."
70 - insinto "${dest}"
71 - doins -r include lib_pypy lib-python pypy3-c libpypy3-c.so
72 - fperms a+x ${dest}/pypy3-c ${dest}/libpypy3-c.so
73 + exeinto "${dest}"
74 + doexe pypy3-c libpypy3-c.so
75 pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
76 + insinto "${dest}"
77 + doins -r include lib_pypy lib-python
78 dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
79 dodoc README.rst
80
81 @@ -133,7 +173,6 @@ src_install() {
82 einfo "Generating caches and byte-compiling ..."
83
84 local -x PYTHON=${ED%/}${dest}/pypy3-c
85 - local -x LD_LIBRARY_PATH="${ED%/}${dest}"
86 # we can't use eclass function since PyPy is dumb and always gives
87 # paths relative to the interpreter
88 local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
89 @@ -142,41 +181,7 @@ src_install() {
90 echo "EPYTHON='${EPYTHON}'" > epython.py || die
91 python_domodule epython.py
92
93 - # Generate Grammar and PatternGrammar pickles.
94 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
95 - || die "Generation of Grammar and PatternGrammar pickles failed"
96 -
97 - # Generate cffi modules
98 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
99 -#cffi_build_scripts = {
100 -# "sqlite3": "_sqlite3_build.py",
101 -# "audioop": "_audioop_build.py",
102 -# "tk": "_tkinter/tklib_build.py",
103 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
104 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
105 -# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
106 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
107 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
108 -# "lzma": "_lzma_build.py",
109 -# "_decimal": "_decimal_build.py",
110 -# "ssl": "_ssl_build.py",
111 - cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl )
112 - use gdbm && cffi_targets+=( gdbm )
113 - use sqlite && cffi_targets+=( sqlite3 )
114 - use tk && cffi_targets+=( tkinter/tklib )
115 -
116 - local t
117 - # all modules except tkinter output to .
118 - # tkinter outputs to the correct dir ...
119 - cd "${ED%/}${dest}"/lib_pypy || die
120 - for t in "${cffi_targets[@]}"; do
121 - # tkinter doesn't work via -m
122 - "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
123 - done
124 -
125 - # Cleanup temporary objects
126 - find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
127 - find "${ED%/}${dest}" -type d -empty -delete || die
128 + einfo "Byte-compiling Python standard library..."
129
130 # compile the installed modules
131 python_optimize "${ED%/}${dest}"