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/, dev-python/pypy3/files/
Date: Mon, 30 Dec 2019 11:59:07
Message-Id: 1577707074.829f4b98aa35399577598c004a87d256136a8684.mgorny@gentoo
1 commit: 829f4b98aa35399577598c004a87d256136a8684
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 30 11:04:45 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 30 11:57:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=829f4b98
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 | 2 -
13 dev-python/pypy3/files/5.9.0-shared-lib.patch | 12 --
14 dev-python/pypy3/metadata.xml | 3 -
15 dev-python/pypy3/pypy3-7.2.0-r1.ebuild | 268 --------------------------
16 dev-python/pypy3/pypy3-7.3.0_rc1.ebuild | 268 --------------------------
17 5 files changed, 553 deletions(-)
18
19 diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest
20 index c62cafb9ced..ba24d510819 100644
21 --- a/dev-python/pypy3/Manifest
22 +++ b/dev-python/pypy3/Manifest
23 @@ -1,3 +1 @@
24 -DIST pypy3.6-v7.2.0-src.tar.bz2 21850076 BLAKE2B 756ea3034fe8971c979ec83c9cbfac55a680f3ef03b276475aa4318f3480ae5ede609b8413412df64db553a33979670498b1f97184f3b57406619c9db7f01127 SHA512 bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc
25 DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435
26 -DIST pypy3.6-v7.3.0rc1-src.tar.bz2 22009224 BLAKE2B f5b2557369a8ba101ef38c46437a6b2af03521a5cdbedd2d1b1ee6c1349b66b7bf740290620e1143b544ca7cbcac960192cca889ac253585185bd7776b487110 SHA512 3f39b0b1454f2063b321221453487b42ee96d08ecaf5a19dc788a2b9975e9601c39ccb6e7b0de54ee81c24f4def217d8ddaa09ed5541a857c77d05f9cfc62c05
27
28 diff --git a/dev-python/pypy3/files/5.9.0-shared-lib.patch b/dev-python/pypy3/files/5.9.0-shared-lib.patch
29 deleted file mode 100644
30 index 5d89d3b15a3..00000000000
31 --- a/dev-python/pypy3/files/5.9.0-shared-lib.patch
32 +++ /dev/null
33 @@ -1,12 +0,0 @@
34 -diff -dupr a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py
35 ---- a/rpython/translator/platform/posix.py 2017-10-05 20:17:25.009954656 +0200
36 -+++ b/rpython/translator/platform/posix.py 2017-10-05 20:17:31.115666386 +0200
37 -@@ -227,7 +227,7 @@ class BasePosix(Platform):
38 - 'int main(int argc, char* argv[]) '
39 - '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@')
40 - m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'],
41 -- ['$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)', '$(MAKE) postcompile BIN=$(DEFAULT_TARGET)'])
42 -+ ['$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@', '$(MAKE) postcompile BIN=$(DEFAULT_TARGET)'])
43 -
44 - return m
45 -
46
47 diff --git a/dev-python/pypy3/metadata.xml b/dev-python/pypy3/metadata.xml
48 index 89f86a0b2be..fa323d0cd24 100644
49 --- a/dev-python/pypy3/metadata.xml
50 +++ b/dev-python/pypy3/metadata.xml
51 @@ -6,9 +6,6 @@
52 <name>Python</name>
53 </maintainer>
54 <use>
55 - <flag name="low-memory">Build using PyPy with the engine configured towards low memory footprint.
56 - This makes it possible to build PyPy using ~3.5G of RAM on amd64 and ~half of that on x86,
57 - at the cost of lengthened build time.</flag>
58 <flag name="sandbox">Enable sandboxing functionality</flag>
59 </use>
60 <upstream>
61
62 diff --git a/dev-python/pypy3/pypy3-7.2.0-r1.ebuild b/dev-python/pypy3/pypy3-7.2.0-r1.ebuild
63 deleted file mode 100644
64 index 0b49fbb2bc8..00000000000
65 --- a/dev-python/pypy3/pypy3-7.2.0-r1.ebuild
66 +++ /dev/null
67 @@ -1,268 +0,0 @@
68 -# Copyright 1999-2019 Gentoo Authors
69 -# Distributed under the terms of the GNU General Public License v2
70 -
71 -EAPI=7
72 -
73 -# pypy3 needs to be built using python 2
74 -PYTHON_COMPAT=( python2_7 pypy )
75 -inherit check-reqs pax-utils python-any-r1 toolchain-funcs
76 -
77 -MY_P=pypy3.6-v${PV}
78 -
79 -DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
80 -HOMEPAGE="https://pypy.org/"
81 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
82 -
83 -LICENSE="MIT"
84 -# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
85 -SLOT="0/72-py36"
86 -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
87 -IUSE="bzip2 cpu_flags_x86_sse2 gdbm +jit libressl low-memory ncurses
88 - sandbox sqlite tk"
89 -
90 -RDEPEND=">=sys-libs/zlib-1.1.3:0=
91 - virtual/libffi:0=
92 - virtual/libintl:0=
93 - dev-libs/expat:0=
94 - !libressl? ( dev-libs/openssl:0= )
95 - libressl? ( dev-libs/libressl:0= )
96 - bzip2? ( app-arch/bzip2:0= )
97 - gdbm? ( sys-libs/gdbm:0= )
98 - ncurses? ( sys-libs/ncurses:0= )
99 - sqlite? ( dev-db/sqlite:3= )
100 - tk? (
101 - dev-lang/tk:0=
102 - dev-tcltk/tix:0=
103 - )
104 - !dev-python/pypy3-bin:0"
105 -DEPEND="${RDEPEND}
106 - low-memory? ( virtual/pypy )
107 - !low-memory? (
108 - || (
109 - virtual/pypy
110 - (
111 - dev-lang/python:2.7
112 - dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
113 - )
114 - )
115 - )"
116 -
117 -S="${WORKDIR}/${MY_P}-src"
118 -
119 -check_env() {
120 - if use low-memory; then
121 - CHECKREQS_MEMORY="1750M"
122 - use amd64 && CHECKREQS_MEMORY="3500M"
123 - else
124 - CHECKREQS_MEMORY="3G"
125 - use amd64 && CHECKREQS_MEMORY="6G"
126 - fi
127 -
128 - check-reqs_pkg_pretend
129 -}
130 -
131 -pkg_pretend() {
132 - [[ ${MERGE_TYPE} != binary ]] && check_env
133 -}
134 -
135 -pkg_setup() {
136 - if [[ ${MERGE_TYPE} != binary ]]; then
137 - check_env
138 -
139 - # unset to allow forcing pypy below :)
140 - use low-memory && local EPYTHON=
141 - if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
142 - einfo "Using PyPy to perform the translation."
143 - local EPYTHON=pypy
144 - else
145 - einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
146 - einfo "recommends using PyPy for that. If you wish to do so, please install"
147 - einfo "virtual/pypy and ensure that EPYTHON variable is unset."
148 - fi
149 -
150 - python-any-r1_pkg_setup
151 - fi
152 -}
153 -
154 -src_prepare() {
155 - eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
156 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
157 - eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002
158 - eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
159 -
160 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
161 - -i lib-python/3/distutils/command/install.py || die
162 -
163 - # apply CPython stdlib patches
164 - pushd lib-python/3 > /dev/null || die
165 - eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
166 - popd > /dev/null || die
167 -
168 - eapply_user
169 -}
170 -
171 -src_configure() {
172 - tc-export CC
173 -
174 - local jit_backend
175 - if use jit; then
176 - jit_backend='--jit-backend='
177 -
178 - # We only need the explicit sse2 switch for x86.
179 - # On other arches we can rely on autodetection which uses
180 - # compiler macros. Plus, --jit-backend= doesn't accept all
181 - # the modern values...
182 -
183 - if use x86; then
184 - if use cpu_flags_x86_sse2; then
185 - jit_backend+=x86
186 - else
187 - jit_backend+=x86-without-sse2
188 - fi
189 - else
190 - jit_backend+=auto
191 - fi
192 - fi
193 -
194 - local args=(
195 - --shared
196 - $(usex jit -Ojit -O2)
197 - $(usex sandbox --sandbox '')
198 -
199 - ${jit_backend}
200 -
201 - pypy/goal/targetpypystandalone
202 - )
203 -
204 - # Avoid linking against libraries disabled by use flags
205 - local opts=(
206 - bzip2:bz2
207 - ncurses:_minimal_curses
208 - )
209 -
210 - local opt
211 - for opt in "${opts[@]}"; do
212 - local flag=${opt%:*}
213 - local mod=${opt#*:}
214 -
215 - args+=(
216 - $(usex ${flag} --withmod --withoutmod)-${mod}
217 - )
218 - done
219 -
220 - local interp=( "${PYTHON}" )
221 - if use low-memory; then
222 - interp=( env PYPY_GC_MAX_DELTA=200MB
223 - "${PYTHON}" --jit loop_longevity=300 )
224 - fi
225 -
226 - # translate into the C sources
227 - # we're going to make them ourselves since otherwise pypy does not
228 - # free up the unneeded memory before spawning the compiler
229 - set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
230 - echo -e "\033[1m${@}\033[0m"
231 - "${@}" || die "translation failed"
232 -}
233 -
234 -src_compile() {
235 - emake -C "${T}"/usession*-0/testing_1
236 -
237 - # copy back to make sys.prefix happy
238 - cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
239 - pax-mark m pypy3-c libpypy3-c.so
240 -
241 - einfo "Generating caches and CFFI modules ..."
242 -
243 - # Generate Grammar and PatternGrammar pickles.
244 - ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
245 - || die "Generation of Grammar and PatternGrammar pickles failed"
246 -
247 - # Generate cffi modules
248 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
249 -#cffi_build_scripts = {
250 -# "_blake2": "_blake2/_blake2_build.py",
251 -# "_ssl": "_ssl_build.py",
252 -# "sqlite3": "_sqlite3_build.py",
253 -# "audioop": "_audioop_build.py",
254 -# "tk": "_tkinter/tklib_build.py",
255 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
256 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
257 -# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
258 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
259 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
260 -# "lzma": "_lzma_build.py",
261 -# "_decimal": "_decimal_build.py",
262 -# "_sha3": "_sha3/_sha3_build.py",
263 - cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
264 - audioop syslog pwdgrp resource lzma decimal )
265 - use gdbm && cffi_targets+=( gdbm )
266 - use ncurses && cffi_targets+=( curses )
267 - use sqlite && cffi_targets+=( sqlite3 )
268 - use tk && cffi_targets+=( tkinter/tklib )
269 -
270 - local t
271 - # all modules except tkinter output to .
272 - # tkinter outputs to the correct dir ...
273 - cd lib_pypy || die
274 - for t in "${cffi_targets[@]}"; do
275 - # tkinter doesn't work via -m
276 - ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
277 - done
278 -
279 - # Cleanup temporary objects
280 - find -name "_cffi_*.[co]" -delete || die
281 - find -type d -empty -delete || die
282 -}
283 -
284 -src_test() {
285 - # (unset)
286 - local -x PYTHONDONTWRITEBYTECODE=
287 -
288 - # Test runner requires Python 2 too. However, it spawns PyPy3
289 - # internally so that we end up testing the correct interpreter.
290 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
291 -}
292 -
293 -src_install() {
294 - local dest=/usr/lib/pypy3.6
295 - einfo "Installing PyPy ..."
296 - exeinto "${dest}"
297 - doexe pypy3-c libpypy3-c.so
298 - pax-mark m "${ED}${dest}/pypy3-c" "${ED}${dest}/libpypy3-c.so"
299 - insinto "${dest}"
300 - # preserve mtimes to avoid obsoleting caches
301 - insopts -p
302 - doins -r include lib_pypy lib-python
303 - dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
304 - dodoc README.rst
305 -
306 - if ! use gdbm; then
307 - rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
308 - fi
309 - if ! use sqlite; then
310 - rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
311 - "${ED}${dest}"/lib_pypy/_sqlite3* \
312 - "${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
313 - fi
314 - if ! use tk; then
315 - rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
316 - "${ED}${dest}"/lib_pypy/_tkinter \
317 - "${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
318 - fi
319 -
320 - einfo "Generating caches and byte-compiling ..."
321 -
322 - local -x PYTHON=${ED}${dest}/pypy3-c
323 - # we can't use eclass function since PyPy is dumb and always gives
324 - # paths relative to the interpreter
325 - local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
326 - python_export pypy3 EPYTHON
327 -
328 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
329 - python_domodule epython.py
330 -
331 - einfo "Byte-compiling Python standard library..."
332 -
333 - # compile the installed modules
334 - python_optimize "${ED}${dest}"
335 -}
336
337 diff --git a/dev-python/pypy3/pypy3-7.3.0_rc1.ebuild b/dev-python/pypy3/pypy3-7.3.0_rc1.ebuild
338 deleted file mode 100644
339 index 50bd413a6da..00000000000
340 --- a/dev-python/pypy3/pypy3-7.3.0_rc1.ebuild
341 +++ /dev/null
342 @@ -1,268 +0,0 @@
343 -# Copyright 1999-2019 Gentoo Authors
344 -# Distributed under the terms of the GNU General Public License v2
345 -
346 -EAPI=7
347 -
348 -# pypy3 needs to be built using python 2
349 -PYTHON_COMPAT=( python2_7 pypy )
350 -inherit check-reqs pax-utils python-any-r1 toolchain-funcs
351 -
352 -MY_P=pypy3.6-v${PV/_/}
353 -
354 -DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language"
355 -HOMEPAGE="https://pypy.org/"
356 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2"
357 -
358 -LICENSE="MIT"
359 -# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
360 -SLOT="0/pypy36-pp73"
361 -KEYWORDS=""
362 -IUSE="bzip2 cpu_flags_x86_sse2 gdbm +jit libressl low-memory ncurses
363 - sandbox sqlite tk"
364 -
365 -RDEPEND=">=sys-libs/zlib-1.1.3:0=
366 - virtual/libffi:0=
367 - virtual/libintl:0=
368 - dev-libs/expat:0=
369 - !libressl? ( dev-libs/openssl:0= )
370 - libressl? ( dev-libs/libressl:0= )
371 - bzip2? ( app-arch/bzip2:0= )
372 - gdbm? ( sys-libs/gdbm:0= )
373 - ncurses? ( sys-libs/ncurses:0= )
374 - sqlite? ( dev-db/sqlite:3= )
375 - tk? (
376 - dev-lang/tk:0=
377 - dev-tcltk/tix:0=
378 - )
379 - !dev-python/pypy3-bin:0"
380 -DEPEND="${RDEPEND}
381 - low-memory? ( virtual/pypy )
382 - !low-memory? (
383 - || (
384 - virtual/pypy
385 - (
386 - dev-lang/python:2.7
387 - dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
388 - )
389 - )
390 - )"
391 -
392 -S="${WORKDIR}/${MY_P}-src"
393 -
394 -check_env() {
395 - if use low-memory; then
396 - CHECKREQS_MEMORY="1750M"
397 - use amd64 && CHECKREQS_MEMORY="3500M"
398 - else
399 - CHECKREQS_MEMORY="3G"
400 - use amd64 && CHECKREQS_MEMORY="6G"
401 - fi
402 -
403 - check-reqs_pkg_pretend
404 -}
405 -
406 -pkg_pretend() {
407 - [[ ${MERGE_TYPE} != binary ]] && check_env
408 -}
409 -
410 -pkg_setup() {
411 - if [[ ${MERGE_TYPE} != binary ]]; then
412 - check_env
413 -
414 - # unset to allow forcing pypy below :)
415 - use low-memory && local EPYTHON=
416 - if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then
417 - einfo "Using PyPy to perform the translation."
418 - local EPYTHON=pypy
419 - else
420 - einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream"
421 - einfo "recommends using PyPy for that. If you wish to do so, please install"
422 - einfo "virtual/pypy and ensure that EPYTHON variable is unset."
423 - fi
424 -
425 - python-any-r1_pkg_setup
426 - fi
427 -}
428 -
429 -src_prepare() {
430 - eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
431 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
432 - eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002
433 - eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch
434 -
435 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
436 - -i lib-python/3/distutils/command/install.py || die
437 -
438 - # apply CPython stdlib patches
439 - pushd lib-python/3 > /dev/null || die
440 - eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
441 - popd > /dev/null || die
442 -
443 - eapply_user
444 -}
445 -
446 -src_configure() {
447 - tc-export CC
448 -
449 - local jit_backend
450 - if use jit; then
451 - jit_backend='--jit-backend='
452 -
453 - # We only need the explicit sse2 switch for x86.
454 - # On other arches we can rely on autodetection which uses
455 - # compiler macros. Plus, --jit-backend= doesn't accept all
456 - # the modern values...
457 -
458 - if use x86; then
459 - if use cpu_flags_x86_sse2; then
460 - jit_backend+=x86
461 - else
462 - jit_backend+=x86-without-sse2
463 - fi
464 - else
465 - jit_backend+=auto
466 - fi
467 - fi
468 -
469 - local args=(
470 - --shared
471 - $(usex jit -Ojit -O2)
472 - $(usex sandbox --sandbox '')
473 -
474 - ${jit_backend}
475 -
476 - pypy/goal/targetpypystandalone
477 - )
478 -
479 - # Avoid linking against libraries disabled by use flags
480 - local opts=(
481 - bzip2:bz2
482 - ncurses:_minimal_curses
483 - )
484 -
485 - local opt
486 - for opt in "${opts[@]}"; do
487 - local flag=${opt%:*}
488 - local mod=${opt#*:}
489 -
490 - args+=(
491 - $(usex ${flag} --withmod --withoutmod)-${mod}
492 - )
493 - done
494 -
495 - local interp=( "${PYTHON}" )
496 - if use low-memory; then
497 - interp=( env PYPY_GC_MAX_DELTA=200MB
498 - "${PYTHON}" --jit loop_longevity=300 )
499 - fi
500 -
501 - # translate into the C sources
502 - # we're going to make them ourselves since otherwise pypy does not
503 - # free up the unneeded memory before spawning the compiler
504 - set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
505 - echo -e "\033[1m${@}\033[0m"
506 - "${@}" || die "translation failed"
507 -}
508 -
509 -src_compile() {
510 - emake -C "${T}"/usession*-0/testing_1
511 -
512 - # copy back to make sys.prefix happy
513 - cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die
514 - pax-mark m pypy3-c libpypy3-c.so
515 -
516 - einfo "Generating caches and CFFI modules ..."
517 -
518 - # Generate Grammar and PatternGrammar pickles.
519 - ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
520 - || die "Generation of Grammar and PatternGrammar pickles failed"
521 -
522 - # Generate cffi modules
523 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
524 -#cffi_build_scripts = {
525 -# "_blake2": "_blake2/_blake2_build.py",
526 -# "_ssl": "_ssl_build.py",
527 -# "sqlite3": "_sqlite3_build.py",
528 -# "audioop": "_audioop_build.py",
529 -# "tk": "_tkinter/tklib_build.py",
530 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
531 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
532 -# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
533 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
534 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
535 -# "lzma": "_lzma_build.py",
536 -# "_decimal": "_decimal_build.py",
537 -# "_sha3": "_sha3/_sha3_build.py",
538 - cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
539 - audioop syslog pwdgrp resource lzma decimal )
540 - use gdbm && cffi_targets+=( gdbm )
541 - use ncurses && cffi_targets+=( curses )
542 - use sqlite && cffi_targets+=( sqlite3 )
543 - use tk && cffi_targets+=( tkinter/tklib )
544 -
545 - local t
546 - # all modules except tkinter output to .
547 - # tkinter outputs to the correct dir ...
548 - cd lib_pypy || die
549 - for t in "${cffi_targets[@]}"; do
550 - # tkinter doesn't work via -m
551 - ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
552 - done
553 -
554 - # Cleanup temporary objects
555 - find -name "_cffi_*.[co]" -delete || die
556 - find -type d -empty -delete || die
557 -}
558 -
559 -src_test() {
560 - # (unset)
561 - local -x PYTHONDONTWRITEBYTECODE=
562 -
563 - # Test runner requires Python 2 too. However, it spawns PyPy3
564 - # internally so that we end up testing the correct interpreter.
565 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
566 -}
567 -
568 -src_install() {
569 - local dest=/usr/lib/pypy3.6
570 - einfo "Installing PyPy ..."
571 - exeinto "${dest}"
572 - doexe pypy3-c libpypy3-c.so
573 - pax-mark m "${ED}${dest}/pypy3-c" "${ED}${dest}/libpypy3-c.so"
574 - insinto "${dest}"
575 - # preserve mtimes to avoid obsoleting caches
576 - insopts -p
577 - doins -r include lib_pypy lib-python
578 - dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
579 - dodoc README.rst
580 -
581 - if ! use gdbm; then
582 - rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die
583 - fi
584 - if ! use sqlite; then
585 - rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \
586 - "${ED}${dest}"/lib_pypy/_sqlite3* \
587 - "${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die
588 - fi
589 - if ! use tk; then
590 - rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \
591 - "${ED}${dest}"/lib_pypy/_tkinter \
592 - "${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
593 - fi
594 -
595 - einfo "Generating caches and byte-compiling ..."
596 -
597 - local -x PYTHON=${ED}${dest}/pypy3-c
598 - # we can't use eclass function since PyPy is dumb and always gives
599 - # paths relative to the interpreter
600 - local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
601 - python_export pypy3 EPYTHON
602 -
603 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
604 - python_domodule epython.py
605 -
606 - einfo "Byte-compiling Python standard library..."
607 -
608 - # compile the installed modules
609 - python_optimize "${ED}${dest}"
610 -}