1 |
commit: 64acf094486c22d682426e56019c5f1cc8e3ec7f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 17 14:02:36 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 17 16:56:16 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64acf094 |
7 |
|
8 |
dev-python/pypy3: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3/Manifest | 3 - |
13 |
dev-python/pypy3/files/7.0.0-gentoo-path.patch | 52 ---- |
14 |
dev-python/pypy3/pypy3-7.3.0.ebuild | 219 --------------- |
15 |
dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild | 352 ------------------------- |
16 |
dev-python/pypy3/pypy3-7.3.2_rc1.ebuild | 202 -------------- |
17 |
5 files changed, 828 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest |
20 |
index 45dd21d0c51..39001d40e36 100644 |
21 |
--- a/dev-python/pypy3/Manifest |
22 |
+++ b/dev-python/pypy3/Manifest |
23 |
@@ -1,6 +1,3 @@ |
24 |
-DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 |
25 |
DIST pypy3.6-v7.3.1-src.tar.bz2 22712809 BLAKE2B 4250b3fe98c611b9635319c106b80e88ab469eab5f883babb738e175e7b7adc22c85f8ef3fdce1cdc127b521beef8d6c7862e188d8c8889c39f90136d6bbe374 SHA512 f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 |
26 |
-DIST pypy3.6-v7.3.2rc1-src.tar.bz2 22730858 BLAKE2B 41a0702d0077c0f546998b858bc8b76226fe8903f4819497aa284231edcb32bc8b047b0a2a35bacfb18ea11fb85de98b95998276c22a3f0dc716b16871b35a3a SHA512 1a6f93f7e767b0db5c40c1e06cadd781c6ddfb02ec86aa61a37f649fe1aa5cd71f7857052e5b48092e3bf8b5cbef6d6401097bf4c4e80c62f7dbdffcd20b70c0 |
27 |
DIST pypy3.6-v7.3.2rc2-src.tar.bz2 22750248 BLAKE2B 6a8a3c4306cb5c796ee89f3d9ece61f5d669515ae9edf4961f43c7779123554cda0f3b433f8264d3d08e531ef5fe660b494135321a11f441ae1de97ce0abb332 SHA512 a89184314d04bad646cf2e2151e2d5f27ca23a68f25e22b5c2e4f07745671e70c71d869be1c61248ee839632f7151b597fe79eb5af814967a1ae97f2c2cdb8ee |
28 |
-DIST pypy3.7-v7.3.2rc1-src.tar.bz2 24805791 BLAKE2B 7b16ba9f0b33d572facdf009701712fe1b2c1eb5a4187c3a9197973ef4da140c7704b3409c7c336e1027f89df340fcefc9e52c6ccac75b251aa79d67c98e49c4 SHA512 d2a5c02a541c0ae79cf8c8e1a38299351f9dd81d1a17724d9fe346d8eb4311e2566a319cf1b8a90d393bffdc11657f6fa2f6475441634e57701b00e74899baa0 |
29 |
DIST pypy3.7-v7.3.2rc2-src.tar.bz2 25066853 BLAKE2B 286ec0909d4b9ba9039cd9ca234a90832e99369f5e7e36a486d219661631efac186e02146dd5bc5a51521fcfdd0047c3fa5a6dbffd20cebe8ff7c209d02fec53 SHA512 c8e5dc5ded2989aa3a6b635e040c23bb8e2812101ce22a104f251e0abaa3320b61f2f611ece58d6b8a8ae9f1cbc8ca22c920f3491dd5653bcb0e05264fd54a4f |
30 |
|
31 |
diff --git a/dev-python/pypy3/files/7.0.0-gentoo-path.patch b/dev-python/pypy3/files/7.0.0-gentoo-path.patch |
32 |
deleted file mode 100644 |
33 |
index 135e496f253..00000000000 |
34 |
--- a/dev-python/pypy3/files/7.0.0-gentoo-path.patch |
35 |
+++ /dev/null |
36 |
@@ -1,52 +0,0 @@ |
37 |
-From 44c16c344f137cc91a145294c4124174fc25ad16 Mon Sep 17 00:00:00 2001 |
38 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
39 |
-Date: Fri, 27 Nov 2015 17:02:42 +0100 |
40 |
-Subject: [PATCH] Gentoo: override paths for system-wide install based on |
41 |
- sys.prefix |
42 |
- |
43 |
-Override all default distutils install paths to ones suitable for |
44 |
-system-wide install when sys.prefix indicates we're running the Gentoo |
45 |
-system-wide install of PyPy with no prefix overrides (e.g. virtualenv). |
46 |
- |
47 |
-Fixes: https://bugs.gentoo.org/462306 |
48 |
-Fixes: https://bugs.gentoo.org/465546 |
49 |
- |
50 |
-[updated for 7.0.0] |
51 |
---- |
52 |
- lib-python/3/distutils/command/install.py | 13 ++++++++++++- |
53 |
- 1 file changed, 12 insertions(+), 1 deletion(-) |
54 |
- |
55 |
-diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py |
56 |
-index 77a1827d4b..255603967f 100644 |
57 |
---- a/lib-python/3/distutils/command/install.py |
58 |
-+++ b/lib-python/3/distutils/command/install.py |
59 |
-@@ -50,6 +50,13 @@ INSTALL_SCHEMES = { |
60 |
- 'scripts': '$base/bin', |
61 |
- 'data' : '$base', |
62 |
- }, |
63 |
-+ 'gentoo': { |
64 |
-+ 'purelib': '$base/site-packages', |
65 |
-+ 'platlib': '$base/site-packages', |
66 |
-+ 'headers': '$base/include', |
67 |
-+ 'scripts': '@EPREFIX@/usr/bin', |
68 |
-+ 'data' : '@EPREFIX@/usr', |
69 |
-+ }, |
70 |
- } |
71 |
- |
72 |
- # user site schemes |
73 |
-@@ -461,7 +468,11 @@ class install(Command): |
74 |
- # it's the caller's problem if they supply a bad name! |
75 |
- if (hasattr(sys, 'pypy_version_info') and |
76 |
- not name.endswith(('_user', '_home'))): |
77 |
-- name = 'pypy' |
78 |
-+ if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.6'): |
79 |
-+ # override paths for system-wide install |
80 |
-+ name = 'gentoo' |
81 |
-+ else: |
82 |
-+ name = 'pypy' |
83 |
- scheme = INSTALL_SCHEMES[name] |
84 |
- for key in SCHEME_KEYS: |
85 |
- attrname = 'install_' + key |
86 |
--- |
87 |
-2.21.0.rc1 |
88 |
- |
89 |
|
90 |
diff --git a/dev-python/pypy3/pypy3-7.3.0.ebuild b/dev-python/pypy3/pypy3-7.3.0.ebuild |
91 |
deleted file mode 100644 |
92 |
index 83c31b2ebd9..00000000000 |
93 |
--- a/dev-python/pypy3/pypy3-7.3.0.ebuild |
94 |
+++ /dev/null |
95 |
@@ -1,219 +0,0 @@ |
96 |
-# Copyright 1999-2020 Gentoo Authors |
97 |
-# Distributed under the terms of the GNU General Public License v2 |
98 |
- |
99 |
-EAPI=7 |
100 |
- |
101 |
-PYTHON_COMPAT=( python2_7 ) |
102 |
-inherit pax-utils python-any-r1 |
103 |
- |
104 |
-MY_P=pypy3.6-v${PV/_/} |
105 |
- |
106 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language" |
107 |
-HOMEPAGE="https://pypy.org/" |
108 |
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2" |
109 |
-S="${WORKDIR}/${MY_P}-src" |
110 |
- |
111 |
-LICENSE="MIT" |
112 |
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
113 |
-SLOT="0/pypy36-pp73" |
114 |
-KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux" |
115 |
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk" |
116 |
-RESTRICT="!test? ( test )" |
117 |
- |
118 |
-RDEPEND=" |
119 |
- || ( |
120 |
- dev-python/pypy3-exe:${PV}[bzip2?,ncurses?] |
121 |
- dev-python/pypy3-exe-bin:${PV} |
122 |
- ) |
123 |
- !libressl? ( dev-libs/openssl:0= ) |
124 |
- libressl? ( dev-libs/libressl:0= ) |
125 |
- gdbm? ( sys-libs/gdbm:0= ) |
126 |
- sqlite? ( dev-db/sqlite:3= ) |
127 |
- tk? ( |
128 |
- dev-lang/tk:0= |
129 |
- dev-tcltk/tix:0= |
130 |
- ) |
131 |
- !<dev-python/pypy3-bin-7.3.0:0" |
132 |
-DEPEND="${RDEPEND} |
133 |
- test? ( |
134 |
- ${PYTHON_DEPS} |
135 |
- !!dev-python/pytest-forked |
136 |
- )" |
137 |
- |
138 |
-pkg_setup() { |
139 |
- use test && python-any-r1_pkg_setup |
140 |
-} |
141 |
- |
142 |
-src_prepare() { |
143 |
- eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
144 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
145 |
- eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch |
146 |
- |
147 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
148 |
- -i lib-python/3/distutils/command/install.py || die |
149 |
- |
150 |
- # apply CPython stdlib patches |
151 |
- pushd lib-python/3 > /dev/null || die |
152 |
- eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
153 |
- popd > /dev/null || die |
154 |
- |
155 |
- # tests are copied from cpython and apparently not adjusted to pypy3 |
156 |
- # or marked XFAIL |
157 |
- sed -i -e 's:test_runeval_step:_&:' \ |
158 |
- lib-python/3/test/test_bdb.py || die |
159 |
- sed -i -e 's:test_set_nomemory:_&:' \ |
160 |
- -e '/class PyMemDebugTests/i@××××××××.skip("Broken on pypy3")' \ |
161 |
- lib-python/3/test/test_capi.py || die |
162 |
- sed -i -e 's:test_crashing_decode_handler:_&:' \ |
163 |
- lib-python/3/test/test_codeccallbacks.py || die |
164 |
- sed -i -e 's:test_unicode:_&:' \ |
165 |
- lib-python/3/test/test_dbm_gnu.py || die |
166 |
- sed -i -e 's:test_jumpy:_&:' \ |
167 |
- lib-python/3/test/test_dis.py || die |
168 |
- sed -i -e 's:test_generator_doesnt_retain_old_exc:_&:' \ |
169 |
- -e 's:test_generator_finalizing_and_exc_info:_&:' \ |
170 |
- -e 's:test_generator_leaking:_&:' \ |
171 |
- lib-python/3/test/test_exceptions.py || die |
172 |
- sed -i -e 's:test_locale:_&:' \ |
173 |
- lib-python/3/test/test_format.py || die |
174 |
- sed -i -e 's:test_ast_line_numbers:_&:' \ |
175 |
- -e 's:test_backslashes_in_string_part:_&:' \ |
176 |
- lib-python/3/test/test_fstring.py || die |
177 |
- sed -i -e 's:test_decompressor_bug_28275:_&:' \ |
178 |
- lib-python/3/test/test_lzma.py || die |
179 |
- sed -i -e 's:test_listdir_bytes_like:_&:' \ |
180 |
- -e 's:test_putenv:_&:' \ |
181 |
- lib-python/3/test/test_posix.py || die |
182 |
- sed -i -e 's:test_auto_history:_&:' \ |
183 |
- -e 's:test_history_size:_&:' \ |
184 |
- lib-python/3/test/test_readline.py || die |
185 |
- sed -i -e 's:CheckDMLDoesNotAutoCommitBefore:_&:' \ |
186 |
- -e 's:CheckImmediateTransactionalDDL:_&:' \ |
187 |
- -e 's:CheckTransactionalDDL:_&:' \ |
188 |
- lib-python/3/sqlite3/test/transactions.py || die |
189 |
- sed -i -e 's:test_pha_optional:_&:' \ |
190 |
- -e 's:test_pha_required:_&:' \ |
191 |
- lib-python/3/test/test_ssl.py || die |
192 |
- sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \ |
193 |
- -e 's:test_eval_str_invalid_escape:_&:' \ |
194 |
- lib-python/3/test/test_string_literals.py || die |
195 |
- # the first one's broken by sandbox, the second by our env |
196 |
- sed -i -e 's:test_empty_env:_&:' \ |
197 |
- -e 's:test_executable:_&:' \ |
198 |
- lib-python/3/test/test_subprocess.py || die |
199 |
- sed -i -e 's:test_jump_out_of_async_for_block:_&:' \ |
200 |
- -e 's:test_jump_over_async_for_block_before_else:_&:' \ |
201 |
- -e 's:test_no_jump_.*wards_into_async_for_block:_&:' \ |
202 |
- -e 's:test_no_jump_into_async_for_block_before_else:_&:' \ |
203 |
- -e 's:test_no_jump_from_yield:_&:' \ |
204 |
- lib-python/3/test/test_sys_settrace.py || die |
205 |
- sed -i -e 's:test_circular_imports:_&:' \ |
206 |
- lib-python/3/test/test_threaded_import.py || die |
207 |
- |
208 |
- eapply_user |
209 |
-} |
210 |
- |
211 |
-src_compile() { |
212 |
- # copy over to make sys.prefix happy |
213 |
- cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die |
214 |
- cp -p "${BROOT}"/usr/lib/pypy3.6/include/${PV}/* include/ || die |
215 |
- # (not installed by pypy) |
216 |
- rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
217 |
- mv pypy/module/cpyext/include/* include/ || die |
218 |
- mv pypy/module/cpyext/parse/*.h include/ || die |
219 |
- pax-mark m pypy3-c |
220 |
- |
221 |
- einfo "Generating caches and CFFI modules ..." |
222 |
- |
223 |
- # Generate Grammar and PatternGrammar pickles. |
224 |
- ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
225 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
226 |
- |
227 |
- # Generate cffi modules |
228 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
229 |
-#cffi_build_scripts = { |
230 |
-# "_blake2": "_blake2/_blake2_build.py", |
231 |
-# "_ssl": "_ssl_build.py", |
232 |
-# "sqlite3": "_sqlite3_build.py", |
233 |
-# "audioop": "_audioop_build.py", |
234 |
-# "tk": "_tkinter/tklib_build.py", |
235 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
236 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
237 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
238 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
239 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
240 |
-# "lzma": "_lzma_build.py", |
241 |
-# "_decimal": "_decimal_build.py", |
242 |
-# "_sha3": "_sha3/_sha3_build.py", |
243 |
- cffi_targets=( blake2/_blake2 sha3/_sha3 ssl |
244 |
- audioop syslog pwdgrp resource lzma decimal ) |
245 |
- use gdbm && cffi_targets+=( gdbm ) |
246 |
- use ncurses && cffi_targets+=( curses ) |
247 |
- use sqlite && cffi_targets+=( sqlite3 ) |
248 |
- use tk && cffi_targets+=( tkinter/tklib ) |
249 |
- |
250 |
- local t |
251 |
- # all modules except tkinter output to . |
252 |
- # tkinter outputs to the correct dir ... |
253 |
- cd lib_pypy || die |
254 |
- for t in "${cffi_targets[@]}"; do |
255 |
- # tkinter doesn't work via -m |
256 |
- ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
257 |
- done |
258 |
- |
259 |
- # Cleanup temporary objects |
260 |
- find -name "_cffi_*.[co]" -delete || die |
261 |
- find -type d -empty -delete || die |
262 |
-} |
263 |
- |
264 |
-src_test() { |
265 |
- # (unset) |
266 |
- local -x PYTHONDONTWRITEBYTECODE= |
267 |
- local -x COLUMNS=80 |
268 |
- |
269 |
- # Test runner requires Python 2 too. However, it spawns PyPy3 |
270 |
- # internally so that we end up testing the correct interpreter. |
271 |
- "${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die |
272 |
-} |
273 |
- |
274 |
-src_install() { |
275 |
- local dest=/usr/lib/pypy3.6 |
276 |
- einfo "Installing PyPy ..." |
277 |
- dosym pypy3-c-${PV} "${dest}/pypy3-c" |
278 |
- insinto "${dest}" |
279 |
- # preserve mtimes to avoid obsoleting caches |
280 |
- insopts -p |
281 |
- doins -r include lib_pypy lib-python |
282 |
- |
283 |
- # replace copied headers with symlinks |
284 |
- for x in "${BROOT}"/usr/lib/pypy3.6/include/${PV}/*; do |
285 |
- dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
286 |
- done |
287 |
- |
288 |
- dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3 |
289 |
- dodoc README.rst |
290 |
- |
291 |
- if ! use gdbm; then |
292 |
- rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die |
293 |
- fi |
294 |
- if ! use sqlite; then |
295 |
- rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \ |
296 |
- "${ED}${dest}"/lib_pypy/_sqlite3* \ |
297 |
- "${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die |
298 |
- fi |
299 |
- if ! use tk; then |
300 |
- rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
301 |
- "${ED}${dest}"/lib_pypy/_tkinter \ |
302 |
- "${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
303 |
- fi |
304 |
- |
305 |
- local -x EPYTHON=pypy3 |
306 |
- local -x PYTHON=${ED}${dest}/pypy3-c |
307 |
- |
308 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
309 |
- python_moduleinto /usr/lib/pypy3.6/site-packages |
310 |
- python_domodule epython.py |
311 |
- |
312 |
- einfo "Byte-compiling Python standard library..." |
313 |
- python_optimize "${ED}${dest}" |
314 |
-} |
315 |
|
316 |
diff --git a/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild b/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild |
317 |
deleted file mode 100644 |
318 |
index 2ba33e2c40c..00000000000 |
319 |
--- a/dev-python/pypy3/pypy3-7.3.2_rc1-r100.ebuild |
320 |
+++ /dev/null |
321 |
@@ -1,352 +0,0 @@ |
322 |
-# Copyright 1999-2020 Gentoo Authors |
323 |
-# Distributed under the terms of the GNU General Public License v2 |
324 |
- |
325 |
-EAPI=7 |
326 |
- |
327 |
-PYTHON_COMPAT=( python2_7 ) |
328 |
-inherit pax-utils python-any-r1 toolchain-funcs |
329 |
- |
330 |
-MY_P=pypy3.7-v${PV/_/} |
331 |
- |
332 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.7) language" |
333 |
-HOMEPAGE="https://pypy.org/" |
334 |
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2" |
335 |
-S="${WORKDIR}/${MY_P}-src" |
336 |
- |
337 |
-LICENSE="MIT" |
338 |
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
339 |
-SLOT="0/pypy37-pp73" |
340 |
-KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
341 |
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk" |
342 |
-RESTRICT="!test? ( test )" |
343 |
- |
344 |
-RDEPEND=" |
345 |
- || ( |
346 |
- dev-python/pypy3-exe:${PV}-py37[bzip2?,ncurses?] |
347 |
- dev-python/pypy3-exe-bin:${PV}-py37 |
348 |
- ) |
349 |
- !libressl? ( dev-libs/openssl:0= ) |
350 |
- libressl? ( dev-libs/libressl:0= ) |
351 |
- gdbm? ( sys-libs/gdbm:0= ) |
352 |
- sqlite? ( dev-db/sqlite:3= ) |
353 |
- tk? ( |
354 |
- dev-lang/tk:0= |
355 |
- dev-tcltk/tix:0= |
356 |
- ) |
357 |
- !<dev-python/pypy3-bin-7.3.0:0" |
358 |
-DEPEND="${RDEPEND} |
359 |
- test? ( |
360 |
- ${PYTHON_DEPS} |
361 |
- !!dev-python/pytest-forked |
362 |
- )" |
363 |
- |
364 |
-pkg_setup() { |
365 |
- use test && python-any-r1_pkg_setup |
366 |
-} |
367 |
- |
368 |
-src_prepare() { |
369 |
- eapply "${FILESDIR}/7.3.1-gentoo-path.patch" |
370 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
371 |
- eapply "${FILESDIR}/7.3.2-py37-distutils-cxx.patch" |
372 |
- |
373 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
374 |
- -i lib-python/3/distutils/command/install.py || die |
375 |
- |
376 |
- # apply CPython stdlib patches |
377 |
- pushd lib-python/3 > /dev/null || die |
378 |
- eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
379 |
- popd > /dev/null || die |
380 |
- |
381 |
- # see http://buildbot.pypy.org/summary?branch=py3.7&builder=pypy-c-jit-linux-x86-64 |
382 |
- sed -i -e 's:test_snippets(:_&:' \ |
383 |
- lib-python/3/test/test_ast.py || die |
384 |
- sed -i -e 's:testConstructorErrorMessages(:_&:' \ |
385 |
- lib-python/3/test/test_class.py || die |
386 |
- sed -i -e 's:test_pythonmalloc(:_&:' \ |
387 |
- -e 's:test_sys_flags_set(:_&:' \ |
388 |
- -e 's:test_unbuffered_output(:_&:' \ |
389 |
- -e 's:test_xdev(:_&:' \ |
390 |
- -e 's:test_ignore_PYTHONHASHSEED(:_&:' \ |
391 |
- lib-python/3/test/test_cmd_line.py || die |
392 |
- sed -i -e 's:test_consistent_sys_path_for_module_execution(:_&:' \ |
393 |
- -e 's:test_issue8202(:_&:' \ |
394 |
- -e 's:test_issue8202_dash_m_file_ignored(:_&:' \ |
395 |
- -e 's:test_module_in_package(:_&:' \ |
396 |
- -e 's:test_module_in_package_in_zipfile(:_&:' \ |
397 |
- -e 's:test_module_in_subpackage_in_zipfile(:_&:' \ |
398 |
- -e 's:test_nonexisting_script(:_&:' \ |
399 |
- -e 's:test_package(:_&:' \ |
400 |
- -e 's:test_package_compiled(:_&:' \ |
401 |
- -e 's:test_script_compiled(:_&:' \ |
402 |
- lib-python/3/test/test_cmd_line_script.py || die |
403 |
- sed -i -e 's:test_incremental_errors(:_&:' \ |
404 |
- lib-python/3/test/test_codecs.py || die |
405 |
- sed -i -e 's:test_ressources_gced_in_workers(:_&:' \ |
406 |
- -e 's:test_submit_after_interpreter_shutdown(:_&:' \ |
407 |
- lib-python/3/test/test_concurrent_futures.py || die |
408 |
- sed -i -e 's:test_for_3(:_&:' \ |
409 |
- -e 's:test_func_4(:_&:' \ |
410 |
- lib-python/3/test/test_coroutines.py || die |
411 |
- sed -i -e 's:test_strftime(:_&:' \ |
412 |
- -e 's:test_more_strftime(:_&:' \ |
413 |
- lib-python/3/test/datetimetester.py || die |
414 |
- sed -i -e 's:test_info(:_&:' \ |
415 |
- -e 's:test_code_info(:_&:' \ |
416 |
- -e 's:test_show_code(:_&:' \ |
417 |
- -e 's:test_disassemble_recursive(:_&:' \ |
418 |
- -e 's:test_disassemble_str(:_&:' \ |
419 |
- -e 's:test_jumpy(:_&:' \ |
420 |
- lib-python/3/test/test_dis.py || die |
421 |
- sed -i -e 's:test_generator_doesnt_retain_old_exc2(:_&:' \ |
422 |
- -e 's:test_attributes(:_&:' \ |
423 |
- lib-python/3/test/test_exceptions.py || die |
424 |
- sed -i -e 's:test_frozen(:_&:' \ |
425 |
- lib-python/3/test/test_frozen.py || die |
426 |
- sed -i -e 's:test_ssl_raises(:_&:' \ |
427 |
- -e 's:test_ssl_verified(:_&:' \ |
428 |
- lib-python/3/test/test_imaplib.py || die |
429 |
- sed -i -e 's:test_script_compiled(:_&:' \ |
430 |
- lib-python/3/test/test_multiprocessing_main_handling.py || die |
431 |
- sed -i -e 's:test_execve_invalid_env(:_&:' \ |
432 |
- lib-python/3/test/test_os.py || die |
433 |
- sed -i -e 's:test_get_and_set_scheduler_and_param(:_&:' \ |
434 |
- lib-python/3/test/test_posix.py || die |
435 |
- sed -i -e 's:test_copying(:_&:' \ |
436 |
- -e 's:test_re_split(:_&:' \ |
437 |
- -e 's:test_zerowidth(:_&:' \ |
438 |
- -e 's:test_locale_caching(:_&:' \ |
439 |
- -e 's:test_locale_compiled(:_&:' \ |
440 |
- -e 's:test_match_repr(:_&:' \ |
441 |
- -e 's:test_qualified_re_split(:_&:' \ |
442 |
- -e 's:test_scoped_flags(:_&:' \ |
443 |
- lib-python/3/test/test_re.py || die |
444 |
- sed -i -e 's:test_auto_history_disabled(:_&:' \ |
445 |
- -e 's:test_auto_history_enabled(:_&:' \ |
446 |
- -e 's:test_history_size(:_&:' \ |
447 |
- lib-python/3/test/test_readline.py || die |
448 |
- sed -i -e 's:test_multiprocess(:_&:' \ |
449 |
- lib-python/3/test/test_regrtest.py || die |
450 |
- sed -i -e 's:test_warn_on_full_buffer(:_&:' \ |
451 |
- lib-python/3/test/test_signal.py || die |
452 |
- sed -i -e 's:test_get_path(:_&:' \ |
453 |
- lib-python/3/test/test_site.py || die |
454 |
- sed -i -e 's:test_check_hostname(:_&:' \ |
455 |
- -e 's:test_npn_protocols(:_&:' \ |
456 |
- -e 's:test_sni_callback(:_&:' \ |
457 |
- -e 's:test_sni_callback_raising(:_&:' \ |
458 |
- lib-python/3/test/test_ssl.py || die |
459 |
- sed -i -e 's:test_invalid_placeholders(:_&:' \ |
460 |
- lib-python/3/test/test_string.py || die |
461 |
- sed -i -e 's:test_eval_bytes_invalid_escape(:_&:' \ |
462 |
- -e 's:test_eval_str_invalid_escape(:_&:' \ |
463 |
- lib-python/3/test/test_string_literals.py || die |
464 |
- sed -i -e 's:test_boundary_error_message_with_large_offset(:_&:' \ |
465 |
- lib-python/3/test/test_struct.py || die |
466 |
- sed -i -e 's:test_restore_signals(:_&:' \ |
467 |
- lib-python/3/test/test_subprocess.py || die |
468 |
- sed -i -e 's:test_jump_out_of_async_for_block_backwards(:_&:' \ |
469 |
- -e 's:test_jump_out_of_async_for_block_forwards(:_&:' \ |
470 |
- -e 's:test_jump_over_async_for_block_before_else(:_&:' \ |
471 |
- -e 's:test_no_jump_backwards_into_async_for_block(:_&:' \ |
472 |
- -e 's:test_no_jump_forwards_into_async_for_block(:_&:' \ |
473 |
- -e 's:test_no_jump_into_async_for_block_before_else(:_&:' \ |
474 |
- -e 's:test_no_jump_from_yield(:_&:' \ |
475 |
- lib-python/3/test/test_sys_settrace.py || die |
476 |
- sed -i -e 's:test_install_schemes(:_&:' \ |
477 |
- lib-python/3/test/test_sysconfig_pypy.py || die |
478 |
- sed -i -e 's:test_circular_imports(:_&:' \ |
479 |
- lib-python/3/test/test_threaded_import.py || die |
480 |
- sed -i -e 's:test_main_milliseconds(:_&:' \ |
481 |
- -e 's:test_main_verbose(:_&:' \ |
482 |
- -e 's:test_main_very_verbose(:_&:' \ |
483 |
- -e 's:test_main_with_time_unit(:_&:' \ |
484 |
- lib-python/3/test/test_timeit.py || die |
485 |
- sed -i -e 's:test_cannot_subclass(:_&:' \ |
486 |
- lib-python/3/test/test_typing.py || die |
487 |
- sed -i -e 's:test_warnings(:_&:' \ |
488 |
- lib-python/3/unittest/test/test_runner.py || die |
489 |
- sed -i -e 's:test_cmd_line(:_&:' \ |
490 |
- -e 's:test_env_var(:_&:' \ |
491 |
- -e 's:test_locale_getpreferredencoding(:_&:' \ |
492 |
- -e 's:test_posix_locale(:_&:' \ |
493 |
- -e 's:test_stdio(:_&:' \ |
494 |
- -e 's:test_xoption(:_&:' \ |
495 |
- lib-python/3/test/test_utf8_mode.py || die |
496 |
- sed -i -e 's:test_asyncgen_finalization_by_gc(:_&:' \ |
497 |
- -e 's:test_asyncgen_finalization_by_gc_in_other_thread(:_&:' \ |
498 |
- -e 's:test_create_connection_ipv6_scope(:_&:' \ |
499 |
- lib-python/3/test/test_asyncio/test_base_events.py || die |
500 |
- sed -i -e 's:test_buffered_proto_create_connection(:_&:' \ |
501 |
- lib-python/3/test/test_asyncio/test_buffered_proto.py || die |
502 |
- sed -i -e 's:test_create_connection_memory_leak(:_&:' \ |
503 |
- -e 's:test_handshake_timeout(:_&:' \ |
504 |
- -e 's:test_start_tls_client_reg_proto_1(:_&:' \ |
505 |
- lib-python/3/test/test_asyncio/test_sslproto.py || die |
506 |
- sed -i -e 's:test_bare_create_task(:_&:' \ |
507 |
- -e 's:test_current_task(:_&:' \ |
508 |
- lib-python/3/test/test_asyncio/test_tasks.py || die |
509 |
- sed -i -e 's:test_asyncio_task_decimal_context(:_&:' \ |
510 |
- lib-python/3/test/test_asyncio/test_context.py || die |
511 |
- sed -i -e 's:test_create_server_ssl_match_failed(:_&:' \ |
512 |
- lib-python/3/test/test_asyncio/test_events.py || die |
513 |
- sed -i -e 's:test_binding(:_&:' \ |
514 |
- -e 's:test_from_import_AttributeError(:_&:' \ |
515 |
- -e 's:test_from_import_missing_attr_has_name_and_path(:_&:' \ |
516 |
- -e 's:test_from_import_missing_attr_path_is_canonical(:_&:' \ |
517 |
- lib-python/3/test/test_import/__init__.py || die |
518 |
- sed -i -e 's:test_unrelated_contents(:_&:' \ |
519 |
- -e 's:test_contents(:_&:' \ |
520 |
- -e 's:test_submodule_contents(:_&:' \ |
521 |
- -e 's:test_submodule_contents_by_name(:_&:' \ |
522 |
- -e 's:test_is_resource_good_path(:_&:' \ |
523 |
- -e 's:test_is_submodule_resource(:_&:' \ |
524 |
- -e 's:test_read_submodule_resource_by_name(:_&:' \ |
525 |
- lib-python/3/test/test_importlib/test_resource.py || die |
526 |
- sed -i -e 's:test_non_string_keys_dict(:_&:' \ |
527 |
- lib-python/3/test/test_json/test_fail.py || die |
528 |
- sed -i -e 's:test_module(:_&:' \ |
529 |
- lib-python/3/test/test_warnings/__init__.py || die |
530 |
- |
531 |
- # flaky |
532 |
- sed -i -e 's:test_2_join_in_forked_process(:_&:' \ |
533 |
- lib-python/3/test/test_threading.py || die |
534 |
- |
535 |
- # TODO |
536 |
- sed -i -e 's:test_external_target_locale_configuration(:_&:' \ |
537 |
- lib-python/3/test/test_c_locale_coercion.py || die |
538 |
- sed -i -e 's:test_locale(:_&:' \ |
539 |
- lib-python/3/test/test_format.py || die |
540 |
- sed -i -e 's:test_decompressor_bug_28275(:_&:' \ |
541 |
- lib-python/3/test/test_lzma.py || die |
542 |
- sed -i -e 's:test_wrapped_exception:_&:' \ |
543 |
- lib-python/3/test/_test_multiprocessing.py || die |
544 |
- sed -i -e 's:test_https_sni(:_&:' \ |
545 |
- lib-python/3/test/test_urllib2_localnet.py || die |
546 |
- |
547 |
- # the first one's broken by sandbox, the second by our env |
548 |
- sed -i -e 's:test_executable(:_&:' \ |
549 |
- -e 's:test_executable_without_cwd(:_&:' \ |
550 |
- lib-python/3/test/test_subprocess.py || die |
551 |
- |
552 |
- eapply_user |
553 |
-} |
554 |
- |
555 |
-src_configure() { |
556 |
- tc-export CC |
557 |
-} |
558 |
- |
559 |
-src_compile() { |
560 |
- # copy over to make sys.prefix happy |
561 |
- cp -p "${BROOT}"/usr/lib/pypy3.7/pypy3-c-${PV} pypy3-c || die |
562 |
- cp -p "${BROOT}"/usr/lib/pypy3.7/include/${PV}/* include/ || die |
563 |
- # (not installed by pypy) |
564 |
- rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
565 |
- mv pypy/module/cpyext/include/* include/ || die |
566 |
- mv pypy/module/cpyext/parse/*.h include/ || die |
567 |
- pax-mark m pypy3-c |
568 |
- |
569 |
- einfo "Generating caches and CFFI modules ..." |
570 |
- |
571 |
- # Generate Grammar and PatternGrammar pickles. |
572 |
- ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
573 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
574 |
- |
575 |
- # Generate cffi modules |
576 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
577 |
-#cffi_build_scripts = { |
578 |
-# "_blake2": "_blake2/_blake2_build.py", |
579 |
-# "_ssl": "_ssl_build.py", |
580 |
-# "sqlite3": "_sqlite3_build.py", |
581 |
-# "audioop": "_audioop_build.py", |
582 |
-# "tk": "_tkinter/tklib_build.py", |
583 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
584 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
585 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
586 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
587 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
588 |
-# "lzma": "_lzma_build.py", |
589 |
-# "_decimal": "_decimal_build.py", |
590 |
-# "_sha3": "_sha3/_sha3_build.py", |
591 |
- cffi_targets=( blake2/_blake2 sha3/_sha3 ssl |
592 |
- audioop syslog pwdgrp resource lzma decimal ) |
593 |
- use gdbm && cffi_targets+=( gdbm ) |
594 |
- use ncurses && cffi_targets+=( curses ) |
595 |
- use sqlite && cffi_targets+=( sqlite3 ) |
596 |
- use tk && cffi_targets+=( tkinter/tklib ) |
597 |
- |
598 |
- local t |
599 |
- # all modules except tkinter output to . |
600 |
- # tkinter outputs to the correct dir ... |
601 |
- cd lib_pypy || die |
602 |
- for t in "${cffi_targets[@]}"; do |
603 |
- # tkinter doesn't work via -m |
604 |
- ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
605 |
- done |
606 |
- |
607 |
- # Cleanup temporary objects |
608 |
- find -name "_cffi_*.[co]" -delete || die |
609 |
- find -type d -empty -delete || die |
610 |
-} |
611 |
- |
612 |
-src_test() { |
613 |
- # (unset) |
614 |
- local -x PYTHONDONTWRITEBYTECODE= |
615 |
- local -x COLUMNS=80 |
616 |
- |
617 |
- local ignore=( |
618 |
- # failing doctests |
619 |
- lib-python/3/test/test_extcall.py |
620 |
- lib-python/3/test/test_unpack_ex.py |
621 |
- |
622 |
- # segfault |
623 |
- lib-python/3/test/test_capi.py |
624 |
- ) |
625 |
- |
626 |
- # Test runner requires Python 2 too. However, it spawns PyPy3 |
627 |
- # internally so that we end up testing the correct interpreter. |
628 |
- # (--deselect for failing doctests) |
629 |
- "${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python \ |
630 |
- ${ignore[@]/#/--ignore } || die |
631 |
-} |
632 |
- |
633 |
-src_install() { |
634 |
- local dest=/usr/lib/pypy3.7 |
635 |
- einfo "Installing PyPy ..." |
636 |
- dosym pypy3-c-${PV} "${dest}/pypy3-c" |
637 |
- insinto "${dest}" |
638 |
- # preserve mtimes to avoid obsoleting caches |
639 |
- insopts -p |
640 |
- doins -r include lib_pypy lib-python |
641 |
- |
642 |
- # replace copied headers with symlinks |
643 |
- for x in "${BROOT}"/usr/lib/pypy3.7/include/${PV}/*; do |
644 |
- dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
645 |
- done |
646 |
- |
647 |
- dosym ../lib/pypy3.7/pypy3-c /usr/bin/pypy3 |
648 |
- dodoc README.rst |
649 |
- |
650 |
- if ! use gdbm; then |
651 |
- rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die |
652 |
- fi |
653 |
- if ! use sqlite; then |
654 |
- rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \ |
655 |
- "${ED}${dest}"/lib_pypy/_sqlite3* \ |
656 |
- "${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die |
657 |
- fi |
658 |
- if ! use tk; then |
659 |
- rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
660 |
- "${ED}${dest}"/lib_pypy/_tkinter \ |
661 |
- "${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
662 |
- fi |
663 |
- |
664 |
- local -x EPYTHON=pypy3 |
665 |
- local -x PYTHON=${ED}${dest}/pypy3-c |
666 |
- |
667 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
668 |
- python_moduleinto /usr/lib/pypy3.7/site-packages |
669 |
- python_domodule epython.py |
670 |
- |
671 |
- einfo "Byte-compiling Python standard library..." |
672 |
- python_optimize "${ED}${dest}" |
673 |
-} |
674 |
|
675 |
diff --git a/dev-python/pypy3/pypy3-7.3.2_rc1.ebuild b/dev-python/pypy3/pypy3-7.3.2_rc1.ebuild |
676 |
deleted file mode 100644 |
677 |
index 45d2ebfd217..00000000000 |
678 |
--- a/dev-python/pypy3/pypy3-7.3.2_rc1.ebuild |
679 |
+++ /dev/null |
680 |
@@ -1,202 +0,0 @@ |
681 |
-# Copyright 1999-2020 Gentoo Authors |
682 |
-# Distributed under the terms of the GNU General Public License v2 |
683 |
- |
684 |
-EAPI=7 |
685 |
- |
686 |
-PYTHON_COMPAT=( python2_7 ) |
687 |
-inherit pax-utils python-any-r1 toolchain-funcs |
688 |
- |
689 |
-MY_P=pypy3.6-v${PV/_/} |
690 |
- |
691 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language" |
692 |
-HOMEPAGE="https://pypy.org/" |
693 |
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2" |
694 |
-S="${WORKDIR}/${MY_P}-src" |
695 |
- |
696 |
-LICENSE="MIT" |
697 |
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
698 |
-SLOT="0/pypy36-pp73" |
699 |
-KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
700 |
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite test tk" |
701 |
-RESTRICT="!test? ( test )" |
702 |
- |
703 |
-RDEPEND=" |
704 |
- || ( |
705 |
- dev-python/pypy3-exe:${PV}[bzip2?,ncurses?] |
706 |
- dev-python/pypy3-exe-bin:${PV} |
707 |
- ) |
708 |
- !libressl? ( dev-libs/openssl:0= ) |
709 |
- libressl? ( dev-libs/libressl:0= ) |
710 |
- gdbm? ( sys-libs/gdbm:0= ) |
711 |
- sqlite? ( dev-db/sqlite:3= ) |
712 |
- tk? ( |
713 |
- dev-lang/tk:0= |
714 |
- dev-tcltk/tix:0= |
715 |
- ) |
716 |
- !<dev-python/pypy3-bin-7.3.0:0" |
717 |
-DEPEND="${RDEPEND} |
718 |
- test? ( |
719 |
- ${PYTHON_DEPS} |
720 |
- !!dev-python/pytest-forked |
721 |
- )" |
722 |
- |
723 |
-pkg_setup() { |
724 |
- use test && python-any-r1_pkg_setup |
725 |
-} |
726 |
- |
727 |
-src_prepare() { |
728 |
- eapply "${FILESDIR}/7.3.1-gentoo-path.patch" |
729 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
730 |
- eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch |
731 |
- |
732 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
733 |
- -i lib-python/3/distutils/command/install.py || die |
734 |
- |
735 |
- # apply CPython stdlib patches |
736 |
- pushd lib-python/3 > /dev/null || die |
737 |
- eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
738 |
- popd > /dev/null || die |
739 |
- |
740 |
- # see http://buildbot.pypy.org/summary?branch=py3.6&builder=pypy-c-jit-linux-x86-64 |
741 |
- sed -i -e 's:test_jumpy:_&:' \ |
742 |
- lib-python/3/test/test_dis.py || die |
743 |
- sed -i -e 's:test_get_and_set_scheduler_and_param:_&:' \ |
744 |
- lib-python/3/test/test_posix.py || die |
745 |
- sed -i -e 's:test_auto_history:_&:' \ |
746 |
- -e 's:test_history_size:_&:' \ |
747 |
- lib-python/3/test/test_readline.py || die |
748 |
- sed -i -e 's:test_eval_bytes_invalid_escape:_&:' \ |
749 |
- -e 's:test_eval_str_invalid_escape:_&:' \ |
750 |
- lib-python/3/test/test_string_literals.py || die |
751 |
- sed -i -e 's:test_jump_out_of_async_for_block:_&:' \ |
752 |
- -e 's:test_jump_over_async_for_block_before_else:_&:' \ |
753 |
- -e 's:test_no_jump_.*wards_into_async_for_block:_&:' \ |
754 |
- -e 's:test_no_jump_into_async_for_block_before_else:_&:' \ |
755 |
- -e 's:test_no_jump_from_yield:_&:' \ |
756 |
- lib-python/3/test/test_sys_settrace.py || die |
757 |
- sed -i -e 's:test_circular_imports:_&:' \ |
758 |
- lib-python/3/test/test_threaded_import.py || die |
759 |
- |
760 |
- # the first one's broken by sandbox, the second by our env |
761 |
- sed -i -e 's:test_empty_env:_&:' \ |
762 |
- -e 's:test_executable(:_&:' \ |
763 |
- -e 's:test_executable_without_cwd:_&:' \ |
764 |
- lib-python/3/test/test_subprocess.py || die |
765 |
- |
766 |
- # XXX |
767 |
- sed -i -e 's:test_locale:_&:' \ |
768 |
- lib-python/3/test/test_format.py || die |
769 |
- sed -i -e 's:test_decompressor_bug_28275:_&:' \ |
770 |
- lib-python/3/test/test_lzma.py || die |
771 |
- |
772 |
- eapply_user |
773 |
-} |
774 |
- |
775 |
-src_configure() { |
776 |
- tc-export CC |
777 |
-} |
778 |
- |
779 |
-src_compile() { |
780 |
- # copy over to make sys.prefix happy |
781 |
- cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die |
782 |
- cp -p "${BROOT}"/usr/lib/pypy3.6/include/${PV}/* include/ || die |
783 |
- # (not installed by pypy) |
784 |
- rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
785 |
- mv pypy/module/cpyext/include/* include/ || die |
786 |
- mv pypy/module/cpyext/parse/*.h include/ || die |
787 |
- pax-mark m pypy3-c |
788 |
- |
789 |
- einfo "Generating caches and CFFI modules ..." |
790 |
- |
791 |
- # Generate Grammar and PatternGrammar pickles. |
792 |
- ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
793 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
794 |
- |
795 |
- # Generate cffi modules |
796 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
797 |
-#cffi_build_scripts = { |
798 |
-# "_blake2": "_blake2/_blake2_build.py", |
799 |
-# "_ssl": "_ssl_build.py", |
800 |
-# "sqlite3": "_sqlite3_build.py", |
801 |
-# "audioop": "_audioop_build.py", |
802 |
-# "tk": "_tkinter/tklib_build.py", |
803 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
804 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
805 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
806 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
807 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
808 |
-# "lzma": "_lzma_build.py", |
809 |
-# "_decimal": "_decimal_build.py", |
810 |
-# "_sha3": "_sha3/_sha3_build.py", |
811 |
- cffi_targets=( blake2/_blake2 sha3/_sha3 ssl |
812 |
- audioop syslog pwdgrp resource lzma decimal ) |
813 |
- use gdbm && cffi_targets+=( gdbm ) |
814 |
- use ncurses && cffi_targets+=( curses ) |
815 |
- use sqlite && cffi_targets+=( sqlite3 ) |
816 |
- use tk && cffi_targets+=( tkinter/tklib ) |
817 |
- |
818 |
- local t |
819 |
- # all modules except tkinter output to . |
820 |
- # tkinter outputs to the correct dir ... |
821 |
- cd lib_pypy || die |
822 |
- for t in "${cffi_targets[@]}"; do |
823 |
- # tkinter doesn't work via -m |
824 |
- ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
825 |
- done |
826 |
- |
827 |
- # Cleanup temporary objects |
828 |
- find -name "_cffi_*.[co]" -delete || die |
829 |
- find -type d -empty -delete || die |
830 |
-} |
831 |
- |
832 |
-src_test() { |
833 |
- # (unset) |
834 |
- local -x PYTHONDONTWRITEBYTECODE= |
835 |
- local -x COLUMNS=80 |
836 |
- |
837 |
- # Test runner requires Python 2 too. However, it spawns PyPy3 |
838 |
- # internally so that we end up testing the correct interpreter. |
839 |
- "${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die |
840 |
-} |
841 |
- |
842 |
-src_install() { |
843 |
- local dest=/usr/lib/pypy3.6 |
844 |
- einfo "Installing PyPy ..." |
845 |
- dosym pypy3-c-${PV} "${dest}/pypy3-c" |
846 |
- insinto "${dest}" |
847 |
- # preserve mtimes to avoid obsoleting caches |
848 |
- insopts -p |
849 |
- doins -r include lib_pypy lib-python |
850 |
- |
851 |
- # replace copied headers with symlinks |
852 |
- for x in "${BROOT}"/usr/lib/pypy3.6/include/${PV}/*; do |
853 |
- dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
854 |
- done |
855 |
- |
856 |
- dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3 |
857 |
- dodoc README.rst |
858 |
- |
859 |
- if ! use gdbm; then |
860 |
- rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die |
861 |
- fi |
862 |
- if ! use sqlite; then |
863 |
- rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \ |
864 |
- "${ED}${dest}"/lib_pypy/_sqlite3* \ |
865 |
- "${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die |
866 |
- fi |
867 |
- if ! use tk; then |
868 |
- rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
869 |
- "${ED}${dest}"/lib_pypy/_tkinter \ |
870 |
- "${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
871 |
- fi |
872 |
- |
873 |
- local -x EPYTHON=pypy3 |
874 |
- local -x PYTHON=${ED}${dest}/pypy3-c |
875 |
- |
876 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
877 |
- python_moduleinto /usr/lib/pypy3.6/site-packages |
878 |
- python_domodule epython.py |
879 |
- |
880 |
- einfo "Byte-compiling Python standard library..." |
881 |
- python_optimize "${ED}${dest}" |
882 |
-} |