1 |
commit: d91aa0743afa00ac352526af30f5efc63b737dde |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 24 14:16:31 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 24 14:21:35 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d91aa074 |
7 |
|
8 |
dev-python/pypy: Drop old (<7.1.1) |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy/Manifest | 4 - |
13 |
dev-python/pypy/files/4.0.0-gentoo-path.patch | 50 ----- |
14 |
dev-python/pypy/pypy-6.0.0.ebuild | 286 -------------------------- |
15 |
dev-python/pypy/pypy-7.0.0-r1.ebuild | 286 -------------------------- |
16 |
dev-python/pypy/pypy-7.1.0.ebuild | 286 -------------------------- |
17 |
5 files changed, 912 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest |
20 |
index 11e727f0b2f..16213caaed8 100644 |
21 |
--- a/dev-python/pypy/Manifest |
22 |
+++ b/dev-python/pypy/Manifest |
23 |
@@ -1,6 +1,2 @@ |
24 |
-DIST pypy2-v6.0.0-src.tar.bz2 19741694 BLAKE2B 55f5000e590613b516b12c3682a658fe6a17fbe264be3d61a81698cdf098b39177cf4355eb3f28980209c7a0e005498201cbad8884e3aa02cc86a228d1552046 SHA512 d3bdcd65fc83f2fda3203a604733fe6765049a17cca2715cd6045dc302a6159b4741a821c53fa4c97acf7297cef4c62e941a6a6eb7f8a253a93a28dcf2aa2ca0 |
25 |
-DIST pypy2.7-v7.0.0-src.tar.bz2 19811330 BLAKE2B 38089896934d79d2b3f5813cc9dae23b0534d9d312871b22336a277d5a15b82d748f66f896558cfdb45a23004944a648436e89ae36fadc107930e7b99963e12b SHA512 7fb5682ee4226af51008f50a81c922e44c231410fe36b7656efa20f22c855ba30a01bc96ee897b4c7a02941d37a405c922b09855977313878e34aaad6bf023dc |
26 |
-DIST pypy2.7-v7.1.0-src.tar.bz2 20032490 BLAKE2B e916d63d7915959c87830509630d8b2ab993d012d314e88c7cc84bed4c595957c3fc575f7b57fac7c24aaf1492797ca43b146e457357b6e73d9772724461de66 SHA512 fa7c1a6669686dbd9c0da627dc2a06ad696f20274218af9602f91d73f3ebe0ede380c6e1a50534f53dee8f075eaef5a403c7c5b5bdbfff25e679ba30522391bb |
27 |
DIST pypy2.7-v7.1.1-src.tar.bz2 20027876 BLAKE2B a411d7312ed3b9be9297e7ff4cc569530529272156117ca037bbe29ad477e7ce3b8903d13c6a5a35e9867a8ccbfaa418061a7b37317b4b713508c429a41ffe9a SHA512 f998931ecf4f9aeee24f0fed95589716175971816c00e50bc53de6de0cfe2a8537b89c1aee636d15faecf91df8c29943295485686185f5247a3e0913fa514f48 |
28 |
-DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 |
29 |
DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca |
30 |
|
31 |
diff --git a/dev-python/pypy/files/4.0.0-gentoo-path.patch b/dev-python/pypy/files/4.0.0-gentoo-path.patch |
32 |
deleted file mode 100644 |
33 |
index 4d394f9340d..00000000000 |
34 |
--- a/dev-python/pypy/files/4.0.0-gentoo-path.patch |
35 |
+++ /dev/null |
36 |
@@ -1,50 +0,0 @@ |
37 |
-From 165e05bbdc93e54411217c0198d0a5cbb9de4e33 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 |
- lib-python/2.7/distutils/command/install.py | 13 ++++++++++++- |
51 |
- 1 file changed, 12 insertions(+), 1 deletion(-) |
52 |
- |
53 |
-diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py |
54 |
-index fc43951..fed5218 100644 |
55 |
---- a/lib-python/2.7/distutils/command/install.py |
56 |
-+++ b/lib-python/2.7/distutils/command/install.py |
57 |
-@@ -90,6 +90,13 @@ INSTALL_SCHEMES = { |
58 |
- 'scripts': '$base/bin', |
59 |
- 'data' : '$base', |
60 |
- }, |
61 |
-+ 'gentoo': { |
62 |
-+ 'purelib': '$base/site-packages', |
63 |
-+ 'platlib': '$base/site-packages', |
64 |
-+ 'headers': '$base/include', |
65 |
-+ 'scripts': '@EPREFIX@/usr/bin', |
66 |
-+ 'data' : '@EPREFIX@/usr', |
67 |
-+ }, |
68 |
- } |
69 |
- |
70 |
- # The keys to an installation scheme; if any new types of files are to be |
71 |
-@@ -476,7 +483,11 @@ class install (Command): |
72 |
- # it's the caller's problem if they supply a bad name! |
73 |
- if (hasattr(sys, 'pypy_version_info') and |
74 |
- not name.endswith(('_user', '_home'))): |
75 |
-- name = 'pypy' |
76 |
-+ if self.install_base == os.path.normpath('@EPREFIX@/usr/@libdir@/pypy'): |
77 |
-+ # override paths for system-wide install |
78 |
-+ name = 'gentoo' |
79 |
-+ else: |
80 |
-+ name = 'pypy' |
81 |
- scheme = INSTALL_SCHEMES[name] |
82 |
- for key in SCHEME_KEYS: |
83 |
- attrname = 'install_' + key |
84 |
--- |
85 |
-2.6.3 |
86 |
- |
87 |
|
88 |
diff --git a/dev-python/pypy/pypy-6.0.0.ebuild b/dev-python/pypy/pypy-6.0.0.ebuild |
89 |
deleted file mode 100644 |
90 |
index 3f036775348..00000000000 |
91 |
--- a/dev-python/pypy/pypy-6.0.0.ebuild |
92 |
+++ /dev/null |
93 |
@@ -1,286 +0,0 @@ |
94 |
-# Copyright 1999-2018 Gentoo Foundation |
95 |
-# Distributed under the terms of the GNU General Public License v2 |
96 |
- |
97 |
-EAPI=6 |
98 |
- |
99 |
-PYTHON_COMPAT=( python2_7 pypy ) |
100 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator |
101 |
- |
102 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
103 |
-CPY_PATCHSET_VERSION="2.7.14-0" |
104 |
-MY_P=pypy2-v${PV} |
105 |
- |
106 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
107 |
-HOMEPAGE="http://pypy.org/" |
108 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
109 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz" |
110 |
- |
111 |
-LICENSE="MIT" |
112 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
113 |
-SLOT="0/41" |
114 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
115 |
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite cpu_flags_x86_sse2 test tk" |
116 |
- |
117 |
-RDEPEND=">=sys-libs/zlib-1.1.3:0= |
118 |
- virtual/libffi:0= |
119 |
- virtual/libintl:0= |
120 |
- dev-libs/expat:0= |
121 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
122 |
- libressl? ( dev-libs/libressl:0= ) |
123 |
- bzip2? ( app-arch/bzip2:0= ) |
124 |
- gdbm? ( sys-libs/gdbm:0= ) |
125 |
- ncurses? ( sys-libs/ncurses:0= ) |
126 |
- sqlite? ( dev-db/sqlite:3= ) |
127 |
- tk? ( |
128 |
- dev-lang/tk:0= |
129 |
- dev-tcltk/tix:0= |
130 |
- ) |
131 |
- !dev-python/pypy-bin:0" |
132 |
-# don't enforce the dep on pypy with USE=low-memory since it's going |
133 |
-# to cause either collisions or circular dep on itself |
134 |
-DEPEND="${RDEPEND} |
135 |
- !low-memory? ( |
136 |
- || ( |
137 |
- dev-python/pypy |
138 |
- dev-python/pypy-bin |
139 |
- ( |
140 |
- dev-lang/python:2.7 |
141 |
- dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)] |
142 |
- ) |
143 |
- ) |
144 |
- )" |
145 |
- |
146 |
-S="${WORKDIR}/${MY_P}-src" |
147 |
- |
148 |
-check_env() { |
149 |
- if use low-memory; then |
150 |
- if ! python_is_installed pypy; then |
151 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
152 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
153 |
- eerror |
154 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
155 |
- eerror |
156 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
157 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
158 |
- fi |
159 |
- |
160 |
- CHECKREQS_MEMORY="1750M" |
161 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
162 |
- else |
163 |
- CHECKREQS_MEMORY="3G" |
164 |
- use amd64 && CHECKREQS_MEMORY="6G" |
165 |
- fi |
166 |
- |
167 |
- check-reqs_pkg_pretend |
168 |
-} |
169 |
- |
170 |
-pkg_pretend() { |
171 |
- [[ ${MERGE_TYPE} != binary ]] && check_env |
172 |
-} |
173 |
- |
174 |
-pkg_setup() { |
175 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
176 |
- check_env |
177 |
- |
178 |
- if python_is_installed pypy; then |
179 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
180 |
- einfo "Using already-installed PyPy to perform the translation." |
181 |
- local EPYTHON=pypy |
182 |
- else |
183 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
184 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
185 |
- einfo "the EPYTHON variable." |
186 |
- fi |
187 |
- fi |
188 |
- |
189 |
- python-any-r1_pkg_setup |
190 |
- fi |
191 |
-} |
192 |
- |
193 |
-src_prepare() { |
194 |
- eapply "${FILESDIR}/4.0.0-gentoo-path.patch" |
195 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
196 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
197 |
- |
198 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
199 |
- -e "s^@libdir@^$(get_libdir)^" \ |
200 |
- -i lib-python/2.7/distutils/command/install.py || die |
201 |
- |
202 |
- # apply CPython stdlib patches |
203 |
- pushd lib-python/2.7 > /dev/null || die |
204 |
- # TODO: cpy turkish locale patch now fixes C code |
205 |
- # probably needs better port to pypy, if it is broken there |
206 |
- eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
207 |
- eapply "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch |
208 |
- popd > /dev/null || die |
209 |
- |
210 |
- eapply_user |
211 |
-} |
212 |
- |
213 |
-src_configure() { |
214 |
- tc-export CC |
215 |
- |
216 |
- local jit_backend |
217 |
- if use jit; then |
218 |
- jit_backend='--jit-backend=' |
219 |
- |
220 |
- # We only need the explicit sse2 switch for x86. |
221 |
- # On other arches we can rely on autodetection which uses |
222 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
223 |
- # the modern values... |
224 |
- |
225 |
- if use x86; then |
226 |
- if use cpu_flags_x86_sse2; then |
227 |
- jit_backend+=x86 |
228 |
- else |
229 |
- jit_backend+=x86-without-sse2 |
230 |
- fi |
231 |
- else |
232 |
- jit_backend+=auto |
233 |
- fi |
234 |
- fi |
235 |
- |
236 |
- local args=( |
237 |
- --shared |
238 |
- $(usex jit -Ojit -O2) |
239 |
- $(usex sandbox --sandbox '') |
240 |
- |
241 |
- ${jit_backend} |
242 |
- |
243 |
- pypy/goal/targetpypystandalone |
244 |
- ) |
245 |
- |
246 |
- # Avoid linking against libraries disabled by use flags |
247 |
- local opts=( |
248 |
- bzip2:bz2 |
249 |
- ncurses:_minimal_curses |
250 |
- ) |
251 |
- |
252 |
- local opt |
253 |
- for opt in "${opts[@]}"; do |
254 |
- local flag=${opt%:*} |
255 |
- local mod=${opt#*:} |
256 |
- |
257 |
- args+=( |
258 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
259 |
- ) |
260 |
- done |
261 |
- |
262 |
- local interp=( "${PYTHON}" ) |
263 |
- if use low-memory; then |
264 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
265 |
- "${PYTHON}" --jit loop_longevity=300 ) |
266 |
- fi |
267 |
- |
268 |
- # translate into the C sources |
269 |
- # we're going to make them ourselves since otherwise pypy does not |
270 |
- # free up the unneeded memory before spawning the compiler |
271 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
272 |
- echo -e "\033[1m${@}\033[0m" |
273 |
- "${@}" || die "translation failed" |
274 |
-} |
275 |
- |
276 |
-src_compile() { |
277 |
- emake -C "${T}"/usession*-0/testing_1 |
278 |
- |
279 |
- # copy back to make sys.prefix happy |
280 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
281 |
- pax-mark m pypy-c libpypy-c.so |
282 |
- |
283 |
- einfo "Generating caches and CFFI modules ..." |
284 |
- |
285 |
- # Generate Grammar and PatternGrammar pickles. |
286 |
- ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
287 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
288 |
- |
289 |
- # Generate cffi modules |
290 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
291 |
-#cffi_build_scripts = { |
292 |
-# "sqlite3": "_sqlite3_build.py", |
293 |
-# "audioop": "_audioop_build.py", |
294 |
-# "tk": "_tkinter/tklib_build.py", |
295 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
296 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
297 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
298 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
299 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
300 |
- cffi_targets=( audioop syslog pwdgrp resource ) |
301 |
- use gdbm && cffi_targets+=( gdbm ) |
302 |
- use ncurses && cffi_targets+=( curses ) |
303 |
- use sqlite && cffi_targets+=( sqlite3 ) |
304 |
- use tk && cffi_targets+=( tkinter/tklib ) |
305 |
- |
306 |
- local t |
307 |
- # all modules except tkinter output to . |
308 |
- # tkinter outputs to the correct dir ... |
309 |
- cd lib_pypy || die |
310 |
- for t in "${cffi_targets[@]}"; do |
311 |
- # tkinter doesn't work via -m |
312 |
- ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
313 |
- done |
314 |
- |
315 |
- # Cleanup temporary objects |
316 |
- find -name "_cffi_*.[co]" -delete || die |
317 |
- find -type d -empty -delete || die |
318 |
-} |
319 |
- |
320 |
-src_test() { |
321 |
- # (unset) |
322 |
- local -x PYTHONDONTWRITEBYTECODE= |
323 |
- |
324 |
- local ignored_tests=( |
325 |
- # network |
326 |
- --ignore=lib-python/2.7/test/test_urllibnet.py |
327 |
- --ignore=lib-python/2.7/test/test_urllib2net.py |
328 |
- # lots of free space |
329 |
- --ignore=lib-python/2.7/test/test_zipfile64.py |
330 |
- # no module named 'worker' -- a lot |
331 |
- --ignore=lib-python/2.7/test/test_xpickle.py |
332 |
- ) |
333 |
- |
334 |
- ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
335 |
- "${ignored_tests[@]}" lib-python || die |
336 |
-} |
337 |
- |
338 |
-src_install() { |
339 |
- local dest=/usr/$(get_libdir)/pypy |
340 |
- einfo "Installing PyPy ..." |
341 |
- exeinto "${dest}" |
342 |
- doexe pypy-c libpypy-c.so |
343 |
- pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so" |
344 |
- insinto "${dest}" |
345 |
- # preserve mtimes to avoid obsoleting caches |
346 |
- insopts -p |
347 |
- doins -r include lib_pypy lib-python |
348 |
- dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy |
349 |
- dodoc README.rst |
350 |
- |
351 |
- if ! use gdbm; then |
352 |
- rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ |
353 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
354 |
- fi |
355 |
- if ! use sqlite; then |
356 |
- rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \ |
357 |
- "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ |
358 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
359 |
- fi |
360 |
- if ! use tk; then |
361 |
- rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
362 |
- "${ED%/}${dest}"/lib_pypy/_tkinter \ |
363 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
364 |
- fi |
365 |
- |
366 |
- local -x PYTHON=${ED%/}${dest}/pypy-c |
367 |
- # we can't use eclass function since PyPy is dumb and always gives |
368 |
- # paths relative to the interpreter |
369 |
- local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages |
370 |
- python_export pypy EPYTHON |
371 |
- |
372 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
373 |
- python_domodule epython.py |
374 |
- |
375 |
- einfo "Byte-compiling Python standard library..." |
376 |
- |
377 |
- # compile the installed modules |
378 |
- python_optimize "${ED%/}${dest}" |
379 |
-} |
380 |
|
381 |
diff --git a/dev-python/pypy/pypy-7.0.0-r1.ebuild b/dev-python/pypy/pypy-7.0.0-r1.ebuild |
382 |
deleted file mode 100644 |
383 |
index 7a956b9f4a0..00000000000 |
384 |
--- a/dev-python/pypy/pypy-7.0.0-r1.ebuild |
385 |
+++ /dev/null |
386 |
@@ -1,286 +0,0 @@ |
387 |
-# Copyright 1999-2019 Gentoo Authors |
388 |
-# Distributed under the terms of the GNU General Public License v2 |
389 |
- |
390 |
-EAPI=7 |
391 |
- |
392 |
-PYTHON_COMPAT=( python2_7 pypy ) |
393 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
394 |
- |
395 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
396 |
-CPY_PATCHSET_VERSION="2.7.15" |
397 |
-MY_P=pypy2.7-v${PV} |
398 |
- |
399 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
400 |
-HOMEPAGE="http://pypy.org/" |
401 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
402 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz" |
403 |
- |
404 |
-LICENSE="MIT" |
405 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
406 |
-# pypy 7.0.0: install directory changed to 'pypy2.7' |
407 |
-SLOT="0/41-py27" |
408 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
409 |
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite cpu_flags_x86_sse2 test tk" |
410 |
- |
411 |
-RDEPEND=">=sys-libs/zlib-1.1.3:0= |
412 |
- virtual/libffi:0= |
413 |
- virtual/libintl:0= |
414 |
- dev-libs/expat:0= |
415 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
416 |
- libressl? ( dev-libs/libressl:0= ) |
417 |
- bzip2? ( app-arch/bzip2:0= ) |
418 |
- gdbm? ( sys-libs/gdbm:0= ) |
419 |
- ncurses? ( sys-libs/ncurses:0= ) |
420 |
- sqlite? ( dev-db/sqlite:3= ) |
421 |
- tk? ( |
422 |
- dev-lang/tk:0= |
423 |
- dev-tcltk/tix:0= |
424 |
- ) |
425 |
- !dev-python/pypy-bin:0" |
426 |
-# don't enforce the dep on pypy with USE=low-memory since it's going |
427 |
-# to cause either collisions or circular dep on itself |
428 |
-DEPEND="${RDEPEND} |
429 |
- !low-memory? ( |
430 |
- || ( |
431 |
- dev-python/pypy |
432 |
- dev-python/pypy-bin |
433 |
- ( |
434 |
- dev-lang/python:2.7 |
435 |
- dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)] |
436 |
- ) |
437 |
- ) |
438 |
- )" |
439 |
- |
440 |
-S="${WORKDIR}/${MY_P}-src" |
441 |
- |
442 |
-check_env() { |
443 |
- if use low-memory; then |
444 |
- if ! python_is_installed pypy; then |
445 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
446 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
447 |
- eerror |
448 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
449 |
- eerror |
450 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
451 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
452 |
- fi |
453 |
- |
454 |
- CHECKREQS_MEMORY="1750M" |
455 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
456 |
- else |
457 |
- CHECKREQS_MEMORY="3G" |
458 |
- use amd64 && CHECKREQS_MEMORY="6G" |
459 |
- fi |
460 |
- |
461 |
- check-reqs_pkg_pretend |
462 |
-} |
463 |
- |
464 |
-pkg_pretend() { |
465 |
- [[ ${MERGE_TYPE} != binary ]] && check_env |
466 |
-} |
467 |
- |
468 |
-pkg_setup() { |
469 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
470 |
- check_env |
471 |
- |
472 |
- if python_is_installed pypy; then |
473 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
474 |
- einfo "Using already-installed PyPy to perform the translation." |
475 |
- local EPYTHON=pypy |
476 |
- else |
477 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
478 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
479 |
- einfo "the EPYTHON variable." |
480 |
- fi |
481 |
- fi |
482 |
- |
483 |
- python-any-r1_pkg_setup |
484 |
- fi |
485 |
-} |
486 |
- |
487 |
-src_prepare() { |
488 |
- eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
489 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
490 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
491 |
- |
492 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
493 |
- -i lib-python/2.7/distutils/command/install.py || die |
494 |
- |
495 |
- # apply CPython stdlib patches |
496 |
- pushd lib-python/2.7 > /dev/null || die |
497 |
- # TODO: cpy turkish locale patch now fixes C code |
498 |
- # probably needs better port to pypy, if it is broken there |
499 |
- eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
500 |
- eapply -p2 "${WORKDIR}"/patches/0011-use_pyxml.patch |
501 |
- popd > /dev/null || die |
502 |
- |
503 |
- eapply_user |
504 |
-} |
505 |
- |
506 |
-src_configure() { |
507 |
- tc-export CC |
508 |
- |
509 |
- local jit_backend |
510 |
- if use jit; then |
511 |
- jit_backend='--jit-backend=' |
512 |
- |
513 |
- # We only need the explicit sse2 switch for x86. |
514 |
- # On other arches we can rely on autodetection which uses |
515 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
516 |
- # the modern values... |
517 |
- |
518 |
- if use x86; then |
519 |
- if use cpu_flags_x86_sse2; then |
520 |
- jit_backend+=x86 |
521 |
- else |
522 |
- jit_backend+=x86-without-sse2 |
523 |
- fi |
524 |
- else |
525 |
- jit_backend+=auto |
526 |
- fi |
527 |
- fi |
528 |
- |
529 |
- local args=( |
530 |
- --shared |
531 |
- $(usex jit -Ojit -O2) |
532 |
- $(usex sandbox --sandbox '') |
533 |
- |
534 |
- ${jit_backend} |
535 |
- |
536 |
- pypy/goal/targetpypystandalone |
537 |
- ) |
538 |
- |
539 |
- # Avoid linking against libraries disabled by use flags |
540 |
- local opts=( |
541 |
- bzip2:bz2 |
542 |
- ncurses:_minimal_curses |
543 |
- ) |
544 |
- |
545 |
- local opt |
546 |
- for opt in "${opts[@]}"; do |
547 |
- local flag=${opt%:*} |
548 |
- local mod=${opt#*:} |
549 |
- |
550 |
- args+=( |
551 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
552 |
- ) |
553 |
- done |
554 |
- |
555 |
- local interp=( "${PYTHON}" ) |
556 |
- if use low-memory; then |
557 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
558 |
- "${PYTHON}" --jit loop_longevity=300 ) |
559 |
- fi |
560 |
- |
561 |
- # translate into the C sources |
562 |
- # we're going to make them ourselves since otherwise pypy does not |
563 |
- # free up the unneeded memory before spawning the compiler |
564 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
565 |
- echo -e "\033[1m${@}\033[0m" |
566 |
- "${@}" || die "translation failed" |
567 |
-} |
568 |
- |
569 |
-src_compile() { |
570 |
- emake -C "${T}"/usession*-0/testing_1 |
571 |
- |
572 |
- # copy back to make sys.prefix happy |
573 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
574 |
- pax-mark m pypy-c libpypy-c.so |
575 |
- |
576 |
- einfo "Generating caches and CFFI modules ..." |
577 |
- |
578 |
- # Generate Grammar and PatternGrammar pickles. |
579 |
- ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
580 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
581 |
- |
582 |
- # Generate cffi modules |
583 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
584 |
-#cffi_build_scripts = { |
585 |
-# "sqlite3": "_sqlite3_build.py", |
586 |
-# "audioop": "_audioop_build.py", |
587 |
-# "tk": "_tkinter/tklib_build.py", |
588 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
589 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
590 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
591 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
592 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
593 |
- cffi_targets=( audioop syslog pwdgrp resource ) |
594 |
- use gdbm && cffi_targets+=( gdbm ) |
595 |
- use ncurses && cffi_targets+=( curses ) |
596 |
- use sqlite && cffi_targets+=( sqlite3 ) |
597 |
- use tk && cffi_targets+=( tkinter/tklib ) |
598 |
- |
599 |
- local t |
600 |
- # all modules except tkinter output to . |
601 |
- # tkinter outputs to the correct dir ... |
602 |
- cd lib_pypy || die |
603 |
- for t in "${cffi_targets[@]}"; do |
604 |
- # tkinter doesn't work via -m |
605 |
- ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
606 |
- done |
607 |
- |
608 |
- # Cleanup temporary objects |
609 |
- find -name "_cffi_*.[co]" -delete || die |
610 |
- find -type d -empty -delete || die |
611 |
-} |
612 |
- |
613 |
-src_test() { |
614 |
- # (unset) |
615 |
- local -x PYTHONDONTWRITEBYTECODE= |
616 |
- |
617 |
- local ignored_tests=( |
618 |
- # network |
619 |
- --ignore=lib-python/2.7/test/test_urllibnet.py |
620 |
- --ignore=lib-python/2.7/test/test_urllib2net.py |
621 |
- # lots of free space |
622 |
- --ignore=lib-python/2.7/test/test_zipfile64.py |
623 |
- # no module named 'worker' -- a lot |
624 |
- --ignore=lib-python/2.7/test/test_xpickle.py |
625 |
- ) |
626 |
- |
627 |
- ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
628 |
- "${ignored_tests[@]}" lib-python || die |
629 |
-} |
630 |
- |
631 |
-src_install() { |
632 |
- local dest=/usr/lib/pypy2.7 |
633 |
- einfo "Installing PyPy ..." |
634 |
- exeinto "${dest}" |
635 |
- doexe pypy-c libpypy-c.so |
636 |
- pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so" |
637 |
- insinto "${dest}" |
638 |
- # preserve mtimes to avoid obsoleting caches |
639 |
- insopts -p |
640 |
- doins -r include lib_pypy lib-python |
641 |
- dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy |
642 |
- dodoc README.rst |
643 |
- |
644 |
- if ! use gdbm; then |
645 |
- rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ |
646 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
647 |
- fi |
648 |
- if ! use sqlite; then |
649 |
- rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \ |
650 |
- "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ |
651 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
652 |
- fi |
653 |
- if ! use tk; then |
654 |
- rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
655 |
- "${ED%/}${dest}"/lib_pypy/_tkinter \ |
656 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
657 |
- fi |
658 |
- |
659 |
- local -x PYTHON=${ED%/}${dest}/pypy-c |
660 |
- # we can't use eclass function since PyPy is dumb and always gives |
661 |
- # paths relative to the interpreter |
662 |
- local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy2.7/site-packages |
663 |
- python_export pypy EPYTHON |
664 |
- |
665 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
666 |
- python_domodule epython.py |
667 |
- |
668 |
- einfo "Byte-compiling Python standard library..." |
669 |
- |
670 |
- # compile the installed modules |
671 |
- python_optimize "${ED%/}${dest}" |
672 |
-} |
673 |
|
674 |
diff --git a/dev-python/pypy/pypy-7.1.0.ebuild b/dev-python/pypy/pypy-7.1.0.ebuild |
675 |
deleted file mode 100644 |
676 |
index 7a956b9f4a0..00000000000 |
677 |
--- a/dev-python/pypy/pypy-7.1.0.ebuild |
678 |
+++ /dev/null |
679 |
@@ -1,286 +0,0 @@ |
680 |
-# Copyright 1999-2019 Gentoo Authors |
681 |
-# Distributed under the terms of the GNU General Public License v2 |
682 |
- |
683 |
-EAPI=7 |
684 |
- |
685 |
-PYTHON_COMPAT=( python2_7 pypy ) |
686 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
687 |
- |
688 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
689 |
-CPY_PATCHSET_VERSION="2.7.15" |
690 |
-MY_P=pypy2.7-v${PV} |
691 |
- |
692 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
693 |
-HOMEPAGE="http://pypy.org/" |
694 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
695 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz" |
696 |
- |
697 |
-LICENSE="MIT" |
698 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
699 |
-# pypy 7.0.0: install directory changed to 'pypy2.7' |
700 |
-SLOT="0/41-py27" |
701 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
702 |
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite cpu_flags_x86_sse2 test tk" |
703 |
- |
704 |
-RDEPEND=">=sys-libs/zlib-1.1.3:0= |
705 |
- virtual/libffi:0= |
706 |
- virtual/libintl:0= |
707 |
- dev-libs/expat:0= |
708 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
709 |
- libressl? ( dev-libs/libressl:0= ) |
710 |
- bzip2? ( app-arch/bzip2:0= ) |
711 |
- gdbm? ( sys-libs/gdbm:0= ) |
712 |
- ncurses? ( sys-libs/ncurses:0= ) |
713 |
- sqlite? ( dev-db/sqlite:3= ) |
714 |
- tk? ( |
715 |
- dev-lang/tk:0= |
716 |
- dev-tcltk/tix:0= |
717 |
- ) |
718 |
- !dev-python/pypy-bin:0" |
719 |
-# don't enforce the dep on pypy with USE=low-memory since it's going |
720 |
-# to cause either collisions or circular dep on itself |
721 |
-DEPEND="${RDEPEND} |
722 |
- !low-memory? ( |
723 |
- || ( |
724 |
- dev-python/pypy |
725 |
- dev-python/pypy-bin |
726 |
- ( |
727 |
- dev-lang/python:2.7 |
728 |
- dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)] |
729 |
- ) |
730 |
- ) |
731 |
- )" |
732 |
- |
733 |
-S="${WORKDIR}/${MY_P}-src" |
734 |
- |
735 |
-check_env() { |
736 |
- if use low-memory; then |
737 |
- if ! python_is_installed pypy; then |
738 |
- eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" |
739 |
- eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" |
740 |
- eerror |
741 |
- eerror " $ emerge -1v dev-python/pypy-bin" |
742 |
- eerror |
743 |
- eerror "before attempting to build dev-python/pypy[low-memory]." |
744 |
- die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" |
745 |
- fi |
746 |
- |
747 |
- CHECKREQS_MEMORY="1750M" |
748 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
749 |
- else |
750 |
- CHECKREQS_MEMORY="3G" |
751 |
- use amd64 && CHECKREQS_MEMORY="6G" |
752 |
- fi |
753 |
- |
754 |
- check-reqs_pkg_pretend |
755 |
-} |
756 |
- |
757 |
-pkg_pretend() { |
758 |
- [[ ${MERGE_TYPE} != binary ]] && check_env |
759 |
-} |
760 |
- |
761 |
-pkg_setup() { |
762 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
763 |
- check_env |
764 |
- |
765 |
- if python_is_installed pypy; then |
766 |
- if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then |
767 |
- einfo "Using already-installed PyPy to perform the translation." |
768 |
- local EPYTHON=pypy |
769 |
- else |
770 |
- einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" |
771 |
- einfo "recommends using PyPy for that. If you wish to do so, please unset" |
772 |
- einfo "the EPYTHON variable." |
773 |
- fi |
774 |
- fi |
775 |
- |
776 |
- python-any-r1_pkg_setup |
777 |
- fi |
778 |
-} |
779 |
- |
780 |
-src_prepare() { |
781 |
- eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
782 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
783 |
- eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
784 |
- |
785 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
786 |
- -i lib-python/2.7/distutils/command/install.py || die |
787 |
- |
788 |
- # apply CPython stdlib patches |
789 |
- pushd lib-python/2.7 > /dev/null || die |
790 |
- # TODO: cpy turkish locale patch now fixes C code |
791 |
- # probably needs better port to pypy, if it is broken there |
792 |
- eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
793 |
- eapply -p2 "${WORKDIR}"/patches/0011-use_pyxml.patch |
794 |
- popd > /dev/null || die |
795 |
- |
796 |
- eapply_user |
797 |
-} |
798 |
- |
799 |
-src_configure() { |
800 |
- tc-export CC |
801 |
- |
802 |
- local jit_backend |
803 |
- if use jit; then |
804 |
- jit_backend='--jit-backend=' |
805 |
- |
806 |
- # We only need the explicit sse2 switch for x86. |
807 |
- # On other arches we can rely on autodetection which uses |
808 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
809 |
- # the modern values... |
810 |
- |
811 |
- if use x86; then |
812 |
- if use cpu_flags_x86_sse2; then |
813 |
- jit_backend+=x86 |
814 |
- else |
815 |
- jit_backend+=x86-without-sse2 |
816 |
- fi |
817 |
- else |
818 |
- jit_backend+=auto |
819 |
- fi |
820 |
- fi |
821 |
- |
822 |
- local args=( |
823 |
- --shared |
824 |
- $(usex jit -Ojit -O2) |
825 |
- $(usex sandbox --sandbox '') |
826 |
- |
827 |
- ${jit_backend} |
828 |
- |
829 |
- pypy/goal/targetpypystandalone |
830 |
- ) |
831 |
- |
832 |
- # Avoid linking against libraries disabled by use flags |
833 |
- local opts=( |
834 |
- bzip2:bz2 |
835 |
- ncurses:_minimal_curses |
836 |
- ) |
837 |
- |
838 |
- local opt |
839 |
- for opt in "${opts[@]}"; do |
840 |
- local flag=${opt%:*} |
841 |
- local mod=${opt#*:} |
842 |
- |
843 |
- args+=( |
844 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
845 |
- ) |
846 |
- done |
847 |
- |
848 |
- local interp=( "${PYTHON}" ) |
849 |
- if use low-memory; then |
850 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
851 |
- "${PYTHON}" --jit loop_longevity=300 ) |
852 |
- fi |
853 |
- |
854 |
- # translate into the C sources |
855 |
- # we're going to make them ourselves since otherwise pypy does not |
856 |
- # free up the unneeded memory before spawning the compiler |
857 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
858 |
- echo -e "\033[1m${@}\033[0m" |
859 |
- "${@}" || die "translation failed" |
860 |
-} |
861 |
- |
862 |
-src_compile() { |
863 |
- emake -C "${T}"/usession*-0/testing_1 |
864 |
- |
865 |
- # copy back to make sys.prefix happy |
866 |
- cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die |
867 |
- pax-mark m pypy-c libpypy-c.so |
868 |
- |
869 |
- einfo "Generating caches and CFFI modules ..." |
870 |
- |
871 |
- # Generate Grammar and PatternGrammar pickles. |
872 |
- ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
873 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
874 |
- |
875 |
- # Generate cffi modules |
876 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
877 |
-#cffi_build_scripts = { |
878 |
-# "sqlite3": "_sqlite3_build.py", |
879 |
-# "audioop": "_audioop_build.py", |
880 |
-# "tk": "_tkinter/tklib_build.py", |
881 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
882 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
883 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
884 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
885 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
886 |
- cffi_targets=( audioop syslog pwdgrp resource ) |
887 |
- use gdbm && cffi_targets+=( gdbm ) |
888 |
- use ncurses && cffi_targets+=( curses ) |
889 |
- use sqlite && cffi_targets+=( sqlite3 ) |
890 |
- use tk && cffi_targets+=( tkinter/tklib ) |
891 |
- |
892 |
- local t |
893 |
- # all modules except tkinter output to . |
894 |
- # tkinter outputs to the correct dir ... |
895 |
- cd lib_pypy || die |
896 |
- for t in "${cffi_targets[@]}"; do |
897 |
- # tkinter doesn't work via -m |
898 |
- ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
899 |
- done |
900 |
- |
901 |
- # Cleanup temporary objects |
902 |
- find -name "_cffi_*.[co]" -delete || die |
903 |
- find -type d -empty -delete || die |
904 |
-} |
905 |
- |
906 |
-src_test() { |
907 |
- # (unset) |
908 |
- local -x PYTHONDONTWRITEBYTECODE= |
909 |
- |
910 |
- local ignored_tests=( |
911 |
- # network |
912 |
- --ignore=lib-python/2.7/test/test_urllibnet.py |
913 |
- --ignore=lib-python/2.7/test/test_urllib2net.py |
914 |
- # lots of free space |
915 |
- --ignore=lib-python/2.7/test/test_zipfile64.py |
916 |
- # no module named 'worker' -- a lot |
917 |
- --ignore=lib-python/2.7/test/test_xpickle.py |
918 |
- ) |
919 |
- |
920 |
- ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
921 |
- "${ignored_tests[@]}" lib-python || die |
922 |
-} |
923 |
- |
924 |
-src_install() { |
925 |
- local dest=/usr/lib/pypy2.7 |
926 |
- einfo "Installing PyPy ..." |
927 |
- exeinto "${dest}" |
928 |
- doexe pypy-c libpypy-c.so |
929 |
- pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so" |
930 |
- insinto "${dest}" |
931 |
- # preserve mtimes to avoid obsoleting caches |
932 |
- insopts -p |
933 |
- doins -r include lib_pypy lib-python |
934 |
- dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy |
935 |
- dodoc README.rst |
936 |
- |
937 |
- if ! use gdbm; then |
938 |
- rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ |
939 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
940 |
- fi |
941 |
- if ! use sqlite; then |
942 |
- rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \ |
943 |
- "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ |
944 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
945 |
- fi |
946 |
- if ! use tk; then |
947 |
- rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
948 |
- "${ED%/}${dest}"/lib_pypy/_tkinter \ |
949 |
- "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
950 |
- fi |
951 |
- |
952 |
- local -x PYTHON=${ED%/}${dest}/pypy-c |
953 |
- # we can't use eclass function since PyPy is dumb and always gives |
954 |
- # paths relative to the interpreter |
955 |
- local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy2.7/site-packages |
956 |
- python_export pypy EPYTHON |
957 |
- |
958 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
959 |
- python_domodule epython.py |
960 |
- |
961 |
- einfo "Byte-compiling Python standard library..." |
962 |
- |
963 |
- # compile the installed modules |
964 |
- python_optimize "${ED%/}${dest}" |
965 |
-} |