1 |
commit: b4345cc2eb063ba1a09a0d056d2d5ae6070478b3 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 17 14:00:09 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 17 16:56:13 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4345cc2 |
7 |
|
8 |
dev-python/pypy: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy/Manifest | 2 - |
13 |
dev-python/pypy/files/7.0.0-gentoo-path.patch | 52 -------- |
14 |
dev-python/pypy/pypy-7.3.0.ebuild | 182 -------------------------- |
15 |
dev-python/pypy/pypy-7.3.2_rc1.ebuild | 173 ------------------------ |
16 |
4 files changed, 409 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest |
19 |
index 8e381e016a8..6c73fdd1956 100644 |
20 |
--- a/dev-python/pypy/Manifest |
21 |
+++ b/dev-python/pypy/Manifest |
22 |
@@ -1,6 +1,4 @@ |
23 |
-DIST pypy2.7-v7.3.0-src.tar.bz2 20328540 BLAKE2B 7f71c98f436f11e8f4d248b6aeb3e2f81962cdeeaf3eb534473f1c6b5e8cd37d9abc047d7fa750a1ceeeaa63fab6eff6e5f1e60394b8104bbcd7e1fc47885c61 SHA512 05f039f090d837a72012db55f23d94da3f21c7458f18bd1e8ba632489248eb6486ced07b786d05e573abf2b3def2a68d96e7e1109e6d189d8e6c303c60ee3535 |
24 |
DIST pypy2.7-v7.3.1-src.tar.bz2 21053306 BLAKE2B 071d59b7978c98e9ed9243d9a64d93d21b524351cb9a45e0f7d48828f919c84585a1164e7c38739fdd8828ab4b1eedade96dff7d64d0d9cbfe00c74d88d532bb SHA512 1bec44fa0fc4b1186e25f69303f9e332df32184be990d86fba41c40152664a93bd65eabf4dded133371271402cea9b150b60c13bce89d1004b276f0908c0b8f1 |
25 |
-DIST pypy2.7-v7.3.2rc1-src.tar.bz2 21136151 BLAKE2B 50a2fb407624f3831095af9a1859399a39be039e54673a2f015049071cbf128302567f6fd7423bbdf757f46b9f32a09c0ba09985ce046731893f4d1563416050 SHA512 09b0aa48e5d09d87b592d6a5cfa3c7d3e2c93898b8250c31cfae99c44c79c41f05ac1d4b400d82d610e4e56dedacdd97c51b89308ea3a38f6ded8eda0779a08b |
26 |
DIST pypy2.7-v7.3.2rc2-src.tar.bz2 21145693 BLAKE2B e722111435f81d00ecb5cec83e78e17676a042703fe83c049456fa6e5debdb1c09cc3f1fd71bcd8a8469da373a7c8131c252b3f139959a442f4cfa2b7f202c6f SHA512 ba7cccdaff1616ad0090cb0942ad35eda025a758be4d6b4e978bce19fb8cb8840136297fb924127a7e99f02c09665bde7eaf714e1744b9b32612973355459ad4 |
27 |
DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f |
28 |
DIST python-gentoo-patches-2.7.18-r1.tar.xz 15500 BLAKE2B 7008b29827dbbd80d4ab8f010ccf9efced99c6b4b9109e4430c0ba269ce53529cb6fedd832502c8d2d3aa21938749cc3591c2545b21c0a59a6e60f8598e84ccc SHA512 e656ab07281fd932b92165674619bbf55ecf410d2937ae4ae771d490b4532540498cc731d30d19c1e8aafd1f64df8a406bbfbb46ea985b3dcd8edb89a0b7f20f |
29 |
|
30 |
diff --git a/dev-python/pypy/files/7.0.0-gentoo-path.patch b/dev-python/pypy/files/7.0.0-gentoo-path.patch |
31 |
deleted file mode 100644 |
32 |
index 9be52cd0b75..00000000000 |
33 |
--- a/dev-python/pypy/files/7.0.0-gentoo-path.patch |
34 |
+++ /dev/null |
35 |
@@ -1,52 +0,0 @@ |
36 |
-From 959e2aafbe6cabd4e6860f842bce9b8644f627ca Mon Sep 17 00:00:00 2001 |
37 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
38 |
-Date: Fri, 27 Nov 2015 17:02:42 +0100 |
39 |
-Subject: [PATCH] Gentoo: override paths for system-wide install based on |
40 |
- sys.prefix |
41 |
- |
42 |
-Override all default distutils install paths to ones suitable for |
43 |
-system-wide install when sys.prefix indicates we're running the Gentoo |
44 |
-system-wide install of PyPy with no prefix overrides (e.g. virtualenv). |
45 |
- |
46 |
-Fixes: https://bugs.gentoo.org/462306 |
47 |
-Fixes: https://bugs.gentoo.org/465546 |
48 |
- |
49 |
-[updated for 7.0.0] |
50 |
---- |
51 |
- lib-python/2.7/distutils/command/install.py | 13 ++++++++++++- |
52 |
- 1 file changed, 12 insertions(+), 1 deletion(-) |
53 |
- |
54 |
-diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py |
55 |
-index fc43951da0..c2564188cb 100644 |
56 |
---- a/lib-python/2.7/distutils/command/install.py |
57 |
-+++ b/lib-python/2.7/distutils/command/install.py |
58 |
-@@ -90,6 +90,13 @@ INSTALL_SCHEMES = { |
59 |
- 'scripts': '$base/bin', |
60 |
- 'data' : '$base', |
61 |
- }, |
62 |
-+ 'gentoo': { |
63 |
-+ 'purelib': '$base/site-packages', |
64 |
-+ 'platlib': '$base/site-packages', |
65 |
-+ 'headers': '$base/include', |
66 |
-+ 'scripts': '@EPREFIX@/usr/bin', |
67 |
-+ 'data' : '@EPREFIX@/usr', |
68 |
-+ }, |
69 |
- } |
70 |
- |
71 |
- # The keys to an installation scheme; if any new types of files are to be |
72 |
-@@ -476,7 +483,11 @@ class install (Command): |
73 |
- # it's the caller's problem if they supply a bad name! |
74 |
- if (hasattr(sys, 'pypy_version_info') and |
75 |
- not name.endswith(('_user', '_home'))): |
76 |
-- name = 'pypy' |
77 |
-+ if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy2.7'): |
78 |
-+ # override paths for system-wide install |
79 |
-+ name = 'gentoo' |
80 |
-+ else: |
81 |
-+ name = 'pypy' |
82 |
- scheme = INSTALL_SCHEMES[name] |
83 |
- for key in SCHEME_KEYS: |
84 |
- attrname = 'install_' + key |
85 |
--- |
86 |
-2.21.0.rc1 |
87 |
- |
88 |
|
89 |
diff --git a/dev-python/pypy/pypy-7.3.0.ebuild b/dev-python/pypy/pypy-7.3.0.ebuild |
90 |
deleted file mode 100644 |
91 |
index d39cd6b286b..00000000000 |
92 |
--- a/dev-python/pypy/pypy-7.3.0.ebuild |
93 |
+++ /dev/null |
94 |
@@ -1,182 +0,0 @@ |
95 |
-# Copyright 1999-2020 Gentoo Authors |
96 |
-# Distributed under the terms of the GNU General Public License v2 |
97 |
- |
98 |
-EAPI=7 |
99 |
- |
100 |
-inherit pax-utils python-utils-r1 |
101 |
- |
102 |
-MY_P=pypy2.7-v${PV/_/} |
103 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
104 |
-PATCHSET="python-gentoo-patches-2.7.17-r1" |
105 |
- |
106 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
107 |
-HOMEPAGE="https://pypy.org/" |
108 |
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2 |
109 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
110 |
-S="${WORKDIR}/${MY_P}-src" |
111 |
- |
112 |
-LICENSE="MIT" |
113 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
114 |
-SLOT="0/73" |
115 |
-KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux" |
116 |
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite tk" |
117 |
- |
118 |
-RDEPEND=" |
119 |
- || ( |
120 |
- dev-python/pypy-exe:${PV}[bzip2?,ncurses?] |
121 |
- dev-python/pypy-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/pypy-bin-7.3.0:0" |
132 |
-DEPEND="${RDEPEND}" |
133 |
- |
134 |
-src_prepare() { |
135 |
- eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
136 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
137 |
- |
138 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
139 |
- -i lib-python/2.7/distutils/command/install.py || die |
140 |
- |
141 |
- # apply CPython stdlib patches |
142 |
- pushd lib-python/2.7 > /dev/null || die |
143 |
- # TODO: cpy turkish locale patch now fixes C code |
144 |
- # probably needs better port to pypy, if it is broken there |
145 |
- eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
146 |
- eapply -p2 "${WORKDIR}/${PATCHSET}"/0010-use_pyxml.patch |
147 |
- popd > /dev/null || die |
148 |
- |
149 |
- # this test relies on pypy-c hardcoding correct build time paths |
150 |
- sed -i -e 's:test_executable_without_cwd:_&:' \ |
151 |
- lib-python/2.7/test/test_subprocess.py || die |
152 |
- # this one seems to rely on cpython gc handling (?) |
153 |
- sed -i -e 's:test_number_of_objects:_&:' \ |
154 |
- lib-python/2.7/test/test_multiprocessing.py || die |
155 |
- # hardcoded assumptions (?) |
156 |
- sed -i -e 's:test_alpn_protocols:_&:' \ |
157 |
- -e 's:test_default_ecdh_curve:_&:' \ |
158 |
- lib-python/2.7/test/test_ssl.py || die |
159 |
- # requires Internet |
160 |
- sed -i -e '/class NetworkedTests/i@××××××××.skip("Requires networking")' \ |
161 |
- lib-python/2.7/test/test_ssl.py || die |
162 |
- # TODO: investigate (sandbox?) |
163 |
- sed -i -e 's:test__copy_to_each:_&:' \ |
164 |
- lib-python/2.7/test/test_pty.py || die |
165 |
- |
166 |
- eapply_user |
167 |
-} |
168 |
- |
169 |
-src_compile() { |
170 |
- # copy over to make sys.prefix happy |
171 |
- cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PV} pypy-c || die |
172 |
- cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PV}/* include/ || die |
173 |
- # (not installed by pypy) |
174 |
- rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
175 |
- mv pypy/module/cpyext/include/* include/ || die |
176 |
- mv pypy/module/cpyext/parse/*.h include/ || die |
177 |
- pax-mark m pypy-c |
178 |
- |
179 |
- einfo "Generating caches and CFFI modules ..." |
180 |
- |
181 |
- # Generate Grammar and PatternGrammar pickles. |
182 |
- ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
183 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
184 |
- |
185 |
- # Generate cffi modules |
186 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
187 |
-#cffi_build_scripts = { |
188 |
-# "_ssl": "_ssl_build.py", |
189 |
-# "sqlite3": "_sqlite3_build.py", |
190 |
-# "audioop": "_audioop_build.py", |
191 |
-# "tk": "_tkinter/tklib_build.py", |
192 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
193 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
194 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
195 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
196 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
197 |
- cffi_targets=( ssl audioop syslog pwdgrp resource ) |
198 |
- use gdbm && cffi_targets+=( gdbm ) |
199 |
- use ncurses && cffi_targets+=( curses ) |
200 |
- use sqlite && cffi_targets+=( sqlite3 ) |
201 |
- use tk && cffi_targets+=( tkinter/tklib ) |
202 |
- |
203 |
- local t |
204 |
- # all modules except tkinter output to . |
205 |
- # tkinter outputs to the correct dir ... |
206 |
- cd lib_pypy || die |
207 |
- for t in "${cffi_targets[@]}"; do |
208 |
- # tkinter doesn't work via -m |
209 |
- ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
210 |
- done |
211 |
- |
212 |
- # Cleanup temporary objects |
213 |
- find -name "_cffi_*.[co]" -delete || die |
214 |
- find -type d -empty -delete || die |
215 |
-} |
216 |
- |
217 |
-src_test() { |
218 |
- # (unset) |
219 |
- local -x PYTHONDONTWRITEBYTECODE= |
220 |
- |
221 |
- local ignored_tests=( |
222 |
- # network |
223 |
- --ignore=lib-python/2.7/test/test_urllibnet.py |
224 |
- --ignore=lib-python/2.7/test/test_urllib2net.py |
225 |
- # lots of free space |
226 |
- --ignore=lib-python/2.7/test/test_zipfile64.py |
227 |
- # no module named 'worker' -- a lot |
228 |
- --ignore=lib-python/2.7/test/test_xpickle.py |
229 |
- ) |
230 |
- |
231 |
- ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
232 |
- "${ignored_tests[@]}" lib-python || die |
233 |
-} |
234 |
- |
235 |
-src_install() { |
236 |
- local dest=/usr/lib/pypy2.7 |
237 |
- einfo "Installing PyPy ..." |
238 |
- dosym pypy-c-${PV} "${dest}/pypy-c" |
239 |
- insinto "${dest}" |
240 |
- # preserve mtimes to avoid obsoleting caches |
241 |
- insopts -p |
242 |
- doins -r include lib_pypy lib-python |
243 |
- |
244 |
- # replace copied headers with symlinks |
245 |
- for x in "${BROOT}"/usr/lib/pypy2.7/include/${PV}/*; do |
246 |
- dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
247 |
- done |
248 |
- |
249 |
- dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy |
250 |
- dodoc README.rst |
251 |
- |
252 |
- if ! use gdbm; then |
253 |
- rm -r "${ED}${dest}"/lib_pypy/gdbm.py \ |
254 |
- "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
255 |
- fi |
256 |
- if ! use sqlite; then |
257 |
- rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \ |
258 |
- "${ED}${dest}"/lib_pypy/_sqlite3.py \ |
259 |
- "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
260 |
- fi |
261 |
- if ! use tk; then |
262 |
- rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
263 |
- "${ED}${dest}"/lib_pypy/_tkinter \ |
264 |
- "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
265 |
- fi |
266 |
- |
267 |
- local -x EPYTHON=pypy |
268 |
- local -x PYTHON=${ED}${dest}/pypy-c |
269 |
- |
270 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
271 |
- python_moduleinto /usr/lib/pypy2.7/site-packages |
272 |
- python_domodule epython.py |
273 |
- |
274 |
- einfo "Byte-compiling Python standard library..." |
275 |
- python_optimize "${ED}${dest}" |
276 |
-} |
277 |
|
278 |
diff --git a/dev-python/pypy/pypy-7.3.2_rc1.ebuild b/dev-python/pypy/pypy-7.3.2_rc1.ebuild |
279 |
deleted file mode 100644 |
280 |
index 1d0ad929c04..00000000000 |
281 |
--- a/dev-python/pypy/pypy-7.3.2_rc1.ebuild |
282 |
+++ /dev/null |
283 |
@@ -1,173 +0,0 @@ |
284 |
-# Copyright 1999-2020 Gentoo Authors |
285 |
-# Distributed under the terms of the GNU General Public License v2 |
286 |
- |
287 |
-EAPI=7 |
288 |
- |
289 |
-inherit pax-utils python-utils-r1 |
290 |
- |
291 |
-MY_P=pypy2.7-v${PV/_/} |
292 |
-# note: remember to update this to newest dev-lang/python:2.7 on bump |
293 |
-PATCHSET="python-gentoo-patches-2.7.18-r1" |
294 |
- |
295 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
296 |
-HOMEPAGE="https://pypy.org/" |
297 |
-SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2 |
298 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
299 |
-S="${WORKDIR}/${MY_P}-src" |
300 |
- |
301 |
-LICENSE="MIT" |
302 |
-# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
303 |
-SLOT="0/73" |
304 |
-KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
305 |
-IUSE="bzip2 gdbm +jit libressl ncurses sqlite tk" |
306 |
- |
307 |
-RDEPEND=" |
308 |
- || ( |
309 |
- dev-python/pypy-exe:${PV}[bzip2?,ncurses?] |
310 |
- dev-python/pypy-exe-bin:${PV} |
311 |
- ) |
312 |
- !libressl? ( dev-libs/openssl:0= ) |
313 |
- libressl? ( dev-libs/libressl:0= ) |
314 |
- gdbm? ( sys-libs/gdbm:0= ) |
315 |
- sqlite? ( dev-db/sqlite:3= ) |
316 |
- tk? ( |
317 |
- dev-lang/tk:0= |
318 |
- dev-tcltk/tix:0= |
319 |
- ) |
320 |
- !<dev-python/pypy-bin-7.3.0:0" |
321 |
-DEPEND="${RDEPEND}" |
322 |
- |
323 |
-src_prepare() { |
324 |
- eapply "${FILESDIR}/7.3.1-gentoo-path.patch" |
325 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
326 |
- |
327 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
328 |
- -i lib-python/2.7/distutils/command/install.py || die |
329 |
- |
330 |
- # apply CPython stdlib patches |
331 |
- pushd lib-python/2.7 > /dev/null || die |
332 |
- # TODO: cpy turkish locale patch now fixes C code |
333 |
- # probably needs better port to pypy, if it is broken there |
334 |
- eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
335 |
- eapply -p2 "${WORKDIR}/${PATCHSET}"/0010-use_pyxml.patch |
336 |
- eapply -p2 "${WORKDIR}/${PATCHSET}"/0017-bpo-39017-Avoid-infinite-loop-in-the-tarfile-module-.patch |
337 |
- popd > /dev/null || die |
338 |
- |
339 |
- # this test relies on pypy-c hardcoding correct build time paths |
340 |
- sed -i -e 's:test_executable_without_cwd:_&:' \ |
341 |
- lib-python/2.7/test/test_subprocess.py || die |
342 |
- # requires Internet |
343 |
- sed -i -e '/class NetworkedTests/i@××××××××.skip("Requires networking")' \ |
344 |
- lib-python/2.7/test/test_ssl.py || die |
345 |
- |
346 |
- eapply_user |
347 |
-} |
348 |
- |
349 |
-src_compile() { |
350 |
- # copy over to make sys.prefix happy |
351 |
- cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PV} pypy-c || die |
352 |
- cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PV}/* include/ || die |
353 |
- # (not installed by pypy) |
354 |
- rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
355 |
- mv pypy/module/cpyext/include/* include/ || die |
356 |
- mv pypy/module/cpyext/parse/*.h include/ || die |
357 |
- pax-mark m pypy-c |
358 |
- |
359 |
- einfo "Generating caches and CFFI modules ..." |
360 |
- |
361 |
- # Generate Grammar and PatternGrammar pickles. |
362 |
- ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
363 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
364 |
- |
365 |
- # Generate cffi modules |
366 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
367 |
-#cffi_build_scripts = { |
368 |
-# "_ssl": "_ssl_build.py", |
369 |
-# "sqlite3": "_sqlite3_build.py", |
370 |
-# "audioop": "_audioop_build.py", |
371 |
-# "tk": "_tkinter/tklib_build.py", |
372 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
373 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
374 |
-# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
375 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
376 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
377 |
- cffi_targets=( ssl audioop syslog pwdgrp resource ) |
378 |
- use gdbm && cffi_targets+=( gdbm ) |
379 |
- use ncurses && cffi_targets+=( curses ) |
380 |
- use sqlite && cffi_targets+=( sqlite3 ) |
381 |
- use tk && cffi_targets+=( tkinter/tklib ) |
382 |
- |
383 |
- local t |
384 |
- # all modules except tkinter output to . |
385 |
- # tkinter outputs to the correct dir ... |
386 |
- cd lib_pypy || die |
387 |
- for t in "${cffi_targets[@]}"; do |
388 |
- # tkinter doesn't work via -m |
389 |
- ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
390 |
- done |
391 |
- |
392 |
- # Cleanup temporary objects |
393 |
- find -name "_cffi_*.[co]" -delete || die |
394 |
- find -type d -empty -delete || die |
395 |
-} |
396 |
- |
397 |
-src_test() { |
398 |
- # (unset) |
399 |
- local -x PYTHONDONTWRITEBYTECODE= |
400 |
- |
401 |
- local ignored_tests=( |
402 |
- # network |
403 |
- --ignore=lib-python/2.7/test/test_urllibnet.py |
404 |
- --ignore=lib-python/2.7/test/test_urllib2net.py |
405 |
- # lots of free space |
406 |
- --ignore=lib-python/2.7/test/test_zipfile64.py |
407 |
- # no module named 'worker' -- a lot |
408 |
- --ignore=lib-python/2.7/test/test_xpickle.py |
409 |
- ) |
410 |
- |
411 |
- ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
412 |
- "${ignored_tests[@]}" lib-python || die |
413 |
-} |
414 |
- |
415 |
-src_install() { |
416 |
- local dest=/usr/lib/pypy2.7 |
417 |
- einfo "Installing PyPy ..." |
418 |
- dosym pypy-c-${PV} "${dest}/pypy-c" |
419 |
- insinto "${dest}" |
420 |
- # preserve mtimes to avoid obsoleting caches |
421 |
- insopts -p |
422 |
- doins -r include lib_pypy lib-python |
423 |
- |
424 |
- # replace copied headers with symlinks |
425 |
- for x in "${BROOT}"/usr/lib/pypy2.7/include/${PV}/*; do |
426 |
- dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
427 |
- done |
428 |
- |
429 |
- dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy |
430 |
- dodoc README.rst |
431 |
- |
432 |
- if ! use gdbm; then |
433 |
- rm -r "${ED}${dest}"/lib_pypy/gdbm.py \ |
434 |
- "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
435 |
- fi |
436 |
- if ! use sqlite; then |
437 |
- rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \ |
438 |
- "${ED}${dest}"/lib_pypy/_sqlite3.py \ |
439 |
- "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
440 |
- fi |
441 |
- if ! use tk; then |
442 |
- rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
443 |
- "${ED}${dest}"/lib_pypy/_tkinter \ |
444 |
- "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
445 |
- fi |
446 |
- |
447 |
- local -x EPYTHON=pypy |
448 |
- local -x PYTHON=${ED}${dest}/pypy-c |
449 |
- |
450 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
451 |
- python_moduleinto /usr/lib/pypy2.7/site-packages |
452 |
- python_domodule epython.py |
453 |
- |
454 |
- einfo "Byte-compiling Python standard library..." |
455 |
- python_optimize "${ED}${dest}" |
456 |
-} |