1 |
commit: fcf512ef660b1e59316da201058b267b2dbbd500 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 24 11:21:16 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 25 18:38:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcf512ef |
7 |
|
8 |
dev-python/pypy: Bump to 7.3.0 (now using split pypy-exe) |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy/Manifest | 2 + |
13 |
dev-python/pypy/pypy-7.3.0.ebuild | 169 ++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 171 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest |
17 |
index df43ead4e80..b4e2427cda1 100644 |
18 |
--- a/dev-python/pypy/Manifest |
19 |
+++ b/dev-python/pypy/Manifest |
20 |
@@ -1,3 +1,5 @@ |
21 |
DIST pypy2.7-v7.2.0-src.tar.bz2 20219532 BLAKE2B 225e2cebdfa3ceb310f2a047b1d9e1d375b181c10707822890f39fc0a5ec9e6ddd7a8cf6e073074067960b766a0a813294042513a08b8e7e02b011f612e17917 SHA512 8f724490f9fa06686c8e25ddd3592b260bbffae460395de4c7d29d983780ce9b8925fa87434aac6446aac2034381cc1a13074faf252f5d1ac466a252f219f1ae |
22 |
+DIST pypy2.7-v7.3.0-src.tar.bz2 20328540 BLAKE2B 7f71c98f436f11e8f4d248b6aeb3e2f81962cdeeaf3eb534473f1c6b5e8cd37d9abc047d7fa750a1ceeeaa63fab6eff6e5f1e60394b8104bbcd7e1fc47885c61 SHA512 05f039f090d837a72012db55f23d94da3f21c7458f18bd1e8ba632489248eb6486ced07b786d05e573abf2b3def2a68d96e7e1109e6d189d8e6c303c60ee3535 |
23 |
DIST pypy2.7-v7.3.0rc1-src.tar.bz2 20416611 BLAKE2B acb971ec6db423d32aba9691672ff04257d4188d73852577a924305238ac16c71370e23e4a8da38b309e3e280baeb58cfa21a94a5b7252c0a1e54db5fd27dd2b SHA512 f24de1766da15cdf98333c8ac1942c14ab1990de23df2910c2cb0e63f65bcd1c72545f6c9913175aea53a17e9a65dd302a80fd3d424665c99c372fb6bd179807 |
24 |
DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca |
25 |
+DIST python-gentoo-patches-2.7.17.tar.xz 13476 BLAKE2B 788688e2941d2d6d4f768168881b2c3639213a97e214557b3a93f8db44d81e2b6d70be847b7462e54e3786660ebee4ee331402081d92167d74ad149279c3f389 SHA512 1641737635d33607a77ed2ee2462854cec603be39737de3f81abb188702aaf46f039d1616f9dcd413da1f4a8040175c66a2883e496132c2e4ebe8f860b36f9f1 |
26 |
|
27 |
diff --git a/dev-python/pypy/pypy-7.3.0.ebuild b/dev-python/pypy/pypy-7.3.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..3293205904b |
30 |
--- /dev/null |
31 |
+++ b/dev-python/pypy/pypy-7.3.0.ebuild |
32 |
@@ -0,0 +1,169 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit pax-utils python-utils-r1 |
39 |
+ |
40 |
+# note: remember to update this to newest dev-lang/python:2.7 on bump |
41 |
+CPY_PATCHSET_VERSION="2.7.17" |
42 |
+MY_P=pypy2.7-v${PV/_/} |
43 |
+ |
44 |
+DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
45 |
+HOMEPAGE="https://pypy.org/" |
46 |
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
47 |
+ https://dev.gentoo.org/~mgorny/dist/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz" |
48 |
+S="${WORKDIR}/${MY_P}-src" |
49 |
+ |
50 |
+LICENSE="MIT" |
51 |
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
52 |
+SLOT="0/73" |
53 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
54 |
+IUSE="bzip2 gdbm +jit libressl ncurses sandbox sqlite tk" |
55 |
+ |
56 |
+RDEPEND=" |
57 |
+ || ( |
58 |
+ dev-python/pypy-exe:${PV}[bzip2?,ncurses?] |
59 |
+ dev-python/pypy-exe-bin:${PV} |
60 |
+ ) |
61 |
+ !libressl? ( dev-libs/openssl:0= ) |
62 |
+ libressl? ( dev-libs/libressl:0= ) |
63 |
+ gdbm? ( sys-libs/gdbm:0= ) |
64 |
+ sqlite? ( dev-db/sqlite:3= ) |
65 |
+ tk? ( |
66 |
+ dev-lang/tk:0= |
67 |
+ dev-tcltk/tix:0= |
68 |
+ ) |
69 |
+ !<dev-python/pypy-bin-7.3.0:0" |
70 |
+DEPEND="${RDEPEND}" |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
74 |
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
75 |
+ |
76 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
77 |
+ -i lib-python/2.7/distutils/command/install.py || die |
78 |
+ |
79 |
+ # apply CPython stdlib patches |
80 |
+ pushd lib-python/2.7 > /dev/null || die |
81 |
+ # TODO: cpy turkish locale patch now fixes C code |
82 |
+ # probably needs better port to pypy, if it is broken there |
83 |
+ eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
84 |
+ eapply -p2 "${WORKDIR}"/patches/0010-use_pyxml.patch |
85 |
+ popd > /dev/null || die |
86 |
+ |
87 |
+ eapply_user |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ # copy over to make sys.prefix happy |
92 |
+ cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PV} pypy-c || die |
93 |
+ cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PV}/* include/ || die |
94 |
+ # (not installed by pypy) |
95 |
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
96 |
+ mv pypy/module/cpyext/include/* include/ || die |
97 |
+ mv pypy/module/cpyext/parse/*.h include/ || die |
98 |
+ pax-mark m pypy-c |
99 |
+ |
100 |
+ einfo "Generating caches and CFFI modules ..." |
101 |
+ |
102 |
+ # Generate Grammar and PatternGrammar pickles. |
103 |
+ ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
104 |
+ || die "Generation of Grammar and PatternGrammar pickles failed" |
105 |
+ |
106 |
+ # Generate cffi modules |
107 |
+ # Please keep in sync with pypy/tool/build_cffi_imports.py! |
108 |
+#cffi_build_scripts = { |
109 |
+# "_ssl": "_ssl_build.py", |
110 |
+# "sqlite3": "_sqlite3_build.py", |
111 |
+# "audioop": "_audioop_build.py", |
112 |
+# "tk": "_tkinter/tklib_build.py", |
113 |
+# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
114 |
+# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
115 |
+# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
116 |
+# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
117 |
+# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
118 |
+ cffi_targets=( ssl audioop syslog pwdgrp resource ) |
119 |
+ use gdbm && cffi_targets+=( gdbm ) |
120 |
+ use ncurses && cffi_targets+=( curses ) |
121 |
+ use sqlite && cffi_targets+=( sqlite3 ) |
122 |
+ use tk && cffi_targets+=( tkinter/tklib ) |
123 |
+ |
124 |
+ local t |
125 |
+ # all modules except tkinter output to . |
126 |
+ # tkinter outputs to the correct dir ... |
127 |
+ cd lib_pypy || die |
128 |
+ for t in "${cffi_targets[@]}"; do |
129 |
+ # tkinter doesn't work via -m |
130 |
+ ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
131 |
+ done |
132 |
+ |
133 |
+ # Cleanup temporary objects |
134 |
+ find -name "_cffi_*.[co]" -delete || die |
135 |
+ find -type d -empty -delete || die |
136 |
+} |
137 |
+ |
138 |
+src_test() { |
139 |
+ # (unset) |
140 |
+ local -x PYTHONDONTWRITEBYTECODE= |
141 |
+ |
142 |
+ local ignored_tests=( |
143 |
+ # network |
144 |
+ --ignore=lib-python/2.7/test/test_urllibnet.py |
145 |
+ --ignore=lib-python/2.7/test/test_urllib2net.py |
146 |
+ # lots of free space |
147 |
+ --ignore=lib-python/2.7/test/test_zipfile64.py |
148 |
+ # no module named 'worker' -- a lot |
149 |
+ --ignore=lib-python/2.7/test/test_xpickle.py |
150 |
+ ) |
151 |
+ |
152 |
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
153 |
+ "${ignored_tests[@]}" lib-python || die |
154 |
+} |
155 |
+ |
156 |
+src_install() { |
157 |
+ local dest=/usr/lib/pypy2.7 |
158 |
+ einfo "Installing PyPy ..." |
159 |
+ dosym pypy-c-${PV} "${dest}/pypy-c" |
160 |
+ insinto "${dest}" |
161 |
+ # preserve mtimes to avoid obsoleting caches |
162 |
+ insopts -p |
163 |
+ doins -r include lib_pypy lib-python |
164 |
+ |
165 |
+ # replace copied headers with symlinks |
166 |
+ for x in "${BROOT}"/usr/lib/pypy2.7/include/${PV}/*; do |
167 |
+ dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
168 |
+ done |
169 |
+ |
170 |
+ dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy |
171 |
+ dodoc README.rst |
172 |
+ |
173 |
+ if ! use gdbm; then |
174 |
+ rm -r "${ED}${dest}"/lib_pypy/gdbm.py \ |
175 |
+ "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
176 |
+ fi |
177 |
+ if ! use sqlite; then |
178 |
+ rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \ |
179 |
+ "${ED}${dest}"/lib_pypy/_sqlite3.py \ |
180 |
+ "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
181 |
+ fi |
182 |
+ if ! use tk; then |
183 |
+ rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
184 |
+ "${ED}${dest}"/lib_pypy/_tkinter \ |
185 |
+ "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
186 |
+ fi |
187 |
+ |
188 |
+ local -x PYTHON=${ED}${dest}/pypy-c |
189 |
+ # we can't use eclass function since PyPy is dumb and always gives |
190 |
+ # paths relative to the interpreter |
191 |
+ local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy2.7/site-packages |
192 |
+ python_export pypy EPYTHON |
193 |
+ |
194 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
195 |
+ python_domodule epython.py |
196 |
+ |
197 |
+ einfo "Byte-compiling Python standard library..." |
198 |
+ |
199 |
+ # compile the installed modules |
200 |
+ python_optimize "${ED}${dest}" |
201 |
+} |