1 |
commit: ab173ab7d350f4800b8a38ef51ee8e616ed2c7cd |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 27 06:12:27 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 27 06:34:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab173ab7 |
7 |
|
8 |
dev-python/pypy3-bin: Bump to 6.0.0 |
9 |
|
10 |
dev-python/pypy3-bin/Manifest | 6 + |
11 |
dev-python/pypy3-bin/pypy3-bin-6.0.0.ebuild | 183 ++++++++++++++++++++++++++++ |
12 |
2 files changed, 189 insertions(+) |
13 |
|
14 |
diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest |
15 |
index 37a40644c03..bd6e0e0c2ef 100644 |
16 |
--- a/dev-python/pypy3-bin/Manifest |
17 |
+++ b/dev-python/pypy3-bin/Manifest |
18 |
@@ -13,6 +13,12 @@ DIST pypy3-bin-5.9.0-amd64+bzip2+ncurses.tar.lz 6589457 BLAKE2B 6b182a6bc25c7839 |
19 |
DIST pypy3-bin-5.9.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8595527 BLAKE2B 67e749a5153d5d75c09d27dfa5ed57bac8e886770e5264a2596c4f9e5cdcb7fcae63b709951a8ad862f1bf658deb3cbdf25ac3d0a3af12aef2dfe40942016329 SHA512 6d118cf2e9a657dcf719ca5e508b5b4bb2ab7f85ec3597840706b748ea2f6d582ed884fc34697a3ec36e343de4a40b113d7c8749683a53f2dda299a9e106a2f8 |
20 |
DIST pypy3-bin-5.9.0-x86+bzip2+ncurses+sse2.tar.lz 5654668 BLAKE2B 964c06920e2d5d69ee9d1f2133d2453e096bc871e63ecdd815370187510f9391738432578b5be49771ad8d24fc735882df266655d88924b2776849a61a943694 SHA512 a378159ca39654fbf117e3bd5a0cdcdb23100a21caf837bba5d764b63bf039a791b27d397a6be918a2539d721fc8564f2b10a163df3bae89a4ddb3991ac33ec8 |
21 |
DIST pypy3-bin-5.9.0-x86+bzip2+ncurses.tar.lz 5640443 BLAKE2B 4aa4a8cdfa536aea52cf6b94813e6c70f071ed62bc1bceac0584b2ab1a0b9d5a60e6d219ffe67f09f418246847ccd1f32f280b38c9bd973eca2c30c002a42856 SHA512 663fae9004eb7f002b849d4697ef67fb72df33faddfba7272a6d795432ecca4c110dc1fab43617909f962584c7519582f085854f55829ccc63dc988654b6add5 |
22 |
+DIST pypy3-bin-6.0.0-amd64+bzip2+jit+ncurses.tar.lz 10674209 BLAKE2B f9e00ba0cdc113ebe156212c5497e122a45bc9544cb242ad02273e06210eb691f930aee7faf1d4ed3a7b14080905a9cb6d30b309c38a2c3795f2183750b4469f SHA512 52e615e2b51a43a2c91f9a2a8f0cec16a6090bfd230ef08dda462bb530da9ee66acec9c449e77f299e0b3363d6bcbc7150b14e7adbe9862d36f4738dfc6be1ca |
23 |
+DIST pypy3-bin-6.0.0-amd64+bzip2+ncurses.tar.lz 6703329 BLAKE2B 64ad2b2ae1580833735dc5ce4b821f79458c98c5f761d7c9834624aff172204ac16e23582e3a776baa85accd221a9fd2225c22099de1de9c319b4f29b5f15071 SHA512 57b2e2f0ddc8d6f78beff6c049adb0a8d316db1d9f7bf5e07e4e593fa363e5ced37d212f549c0a5305459207694ac5a6aac9698a1ca3a4bf56a4437899b7e97b |
24 |
+DIST pypy3-bin-6.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8268406 BLAKE2B 8200d7cfc5bd813cf3138017c96cace1c07bc031f68d5a9df2f71cb887a5dd3bb979dbc67d395389c965904037935a518bf6c1492b04ce5a9f21a9bb3bb5504a SHA512 4c09c454b25faa51024c5319ba5e91f4b1883bdd25f504694f83011ef1faffe7aa28a51369d3c5c6bb9f0d8eb53d1292d57608343b731c67ceeb99f41736b044 |
25 |
+DIST pypy3-bin-6.0.0-x86+bzip2+ncurses+sse2.tar.lz 5363942 BLAKE2B d53b89ef73c2d4ee2bc00360a0c4a791fd8b6ac2d28dfeeb7510a465e6302f79c378aacebbaf4993b6ee55dbc6d85876149fe3f5a0d689713f029c928d93a729 SHA512 ce72d84200dd275841e691810dbf402423883b282cacbe8bbdae9285936869d40b3d43d053b0f3d4904c7ced72f35480d1780358180a1c98e8111852fef1f77f |
26 |
+DIST pypy3-bin-6.0.0-x86+bzip2+ncurses.tar.lz 5366917 BLAKE2B 338a9c221048dabc548250edec05256be64dd5d1aeb5b2fff839d7d5e8dda29e7d4e0a03b1fc0c9cd418685c558bb47598c625e2d28cd4caabc45e21eee9f4f8 SHA512 5274535d01564a9087aea486320921c8784cabcc7bde3634c27b9006988fdc745e6e5e5c2fb8e7b0318fd5ca6fda3fce208743cfa079a7474ea44277237ea873 |
27 |
DIST pypy3-v5.10.0-src.tar.bz2 29075971 BLAKE2B 02fb64d514ab292e09ced57e1c206b04d0fb38353ad6ec0e836448344a6d126d0fccfb61cbd278ea3acaa227032640e82f9ffd7efe3b33ade1ca34a18831b3e4 SHA512 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b |
28 |
DIST pypy3-v5.10.1-src.tar.bz2 29071765 BLAKE2B d5c163697d8dd36a9a61e9a355719628902de0c9a4c038d31cd134d9bb26b8058abfdf85b09715208146295c37e343fae5e1e4a3c8d1999306eeea93791e326c SHA512 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 |
29 |
DIST pypy3-v5.9.0-src.tar.bz2 29055111 BLAKE2B 181d87ebe4a83a3f03b28d891f248f718ad120ed54621f8054f19a65aebbe90b65c69e40ca656612356b2019aa9ac22d5e242e688a80190b046511a8ceb9c040 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd |
30 |
+DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a56a04663452e1aba25d3f41c5073a95866d1623f00cb1a6c9d0256df728fa60d1edb5b58d26c0d88577769cc8a6205d SHA512 ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e |
31 |
|
32 |
diff --git a/dev-python/pypy3-bin/pypy3-bin-6.0.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-6.0.0.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..89c4fd6f16a |
35 |
--- /dev/null |
36 |
+++ b/dev-python/pypy3-bin/pypy3-bin-6.0.0.ebuild |
37 |
@@ -0,0 +1,183 @@ |
38 |
+# Copyright 1999-2018 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+# Test runner needs Python 2. |
44 |
+PYTHON_COMPAT=( python2_7 pypy ) |
45 |
+inherit pax-utils python-any-r1 unpacker versionator |
46 |
+ |
47 |
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}" |
48 |
+MY_P=pypy3-v${PV} |
49 |
+ |
50 |
+DESCRIPTION="A fast, compliant alternative implementation of Python 3.3 (binary package)" |
51 |
+HOMEPAGE="http://pypy.org/" |
52 |
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
53 |
+ amd64? ( |
54 |
+ jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz ) |
55 |
+ !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz ) |
56 |
+ ) |
57 |
+ x86? ( |
58 |
+ cpu_flags_x86_sse2? ( |
59 |
+ jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz ) |
60 |
+ !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz ) |
61 |
+ ) |
62 |
+ !cpu_flags_x86_sse2? ( |
63 |
+ !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz ) |
64 |
+ ) |
65 |
+ )" |
66 |
+ |
67 |
+# Supported variants |
68 |
+REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )" |
69 |
+ |
70 |
+LICENSE="MIT" |
71 |
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
72 |
+SLOT="0/60" |
73 |
+KEYWORDS="~amd64 ~x86" |
74 |
+IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk" |
75 |
+ |
76 |
+RDEPEND=" |
77 |
+ app-arch/bzip2:0/1 |
78 |
+ dev-libs/expat:0/0 |
79 |
+ dev-libs/libffi:0/0 |
80 |
+ sys-devel/gcc:* |
81 |
+ sys-libs/glibc |
82 |
+ sys-libs/ncurses:0/6 |
83 |
+ sys-libs/zlib:0/1 |
84 |
+ gdbm? ( sys-libs/gdbm:0= ) |
85 |
+ !libressl? ( dev-libs/openssl:0=[-bindist] ) |
86 |
+ libressl? ( dev-libs/libressl:0= ) |
87 |
+ sqlite? ( dev-db/sqlite:3= ) |
88 |
+ tk? ( |
89 |
+ dev-lang/tk:0= |
90 |
+ dev-tcltk/tix:0= |
91 |
+ ) |
92 |
+ !dev-python/pypy3:0" |
93 |
+DEPEND="${RDEPEND} |
94 |
+ app-arch/lzip |
95 |
+ app-arch/xz-utils |
96 |
+ test? ( ${PYTHON_DEPS} )" |
97 |
+ |
98 |
+S=${WORKDIR}/${MY_P}-src |
99 |
+ |
100 |
+QA_PREBUILT=" |
101 |
+ usr/lib*/pypy3/pypy3-c |
102 |
+ usr/lib*/pypy3/libpypy3-c.so" |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ eapply "${FILESDIR}/4.0.0-gentoo-path.patch" |
106 |
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
107 |
+ |
108 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
109 |
+ -e "s^@libdir@^$(get_libdir)^" \ |
110 |
+ -i lib-python/3/distutils/command/install.py || die |
111 |
+ |
112 |
+ # apply CPython stdlib patches |
113 |
+ pushd lib-python/3 > /dev/null || die |
114 |
+ eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
115 |
+ eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
116 |
+ popd > /dev/null || die |
117 |
+ |
118 |
+ eapply_user |
119 |
+} |
120 |
+ |
121 |
+src_compile() { |
122 |
+ # Tadaam! PyPy compiled! |
123 |
+ mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die |
124 |
+ mv "${WORKDIR}"/${P}*/include/*.h include/ || die |
125 |
+ mv pypy/module/cpyext/include/*.h include/ || die |
126 |
+ mv pypy/module/cpyext/parse/*.h include/ || die |
127 |
+ |
128 |
+ pax-mark m pypy3-c libpypy3-c.so |
129 |
+ |
130 |
+ einfo "Generating caches and CFFI modules ..." |
131 |
+ |
132 |
+ # Generate Grammar and PatternGrammar pickles. |
133 |
+ ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
134 |
+ || die "Generation of Grammar and PatternGrammar pickles failed" |
135 |
+ |
136 |
+ # Generate cffi modules |
137 |
+ # Please keep in sync with pypy/tool/build_cffi_imports.py! |
138 |
+#cffi_build_scripts = { |
139 |
+# "sqlite3": "_sqlite3_build.py", |
140 |
+# "audioop": "_audioop_build.py", |
141 |
+# "tk": "_tkinter/tklib_build.py", |
142 |
+# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
143 |
+# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
144 |
+# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
145 |
+# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
146 |
+# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
147 |
+# "lzma": "_lzma_build.py", |
148 |
+# "_decimal": "_decimal_build.py", |
149 |
+# "ssl": "_ssl_build.py", |
150 |
+ cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl ) |
151 |
+ use gdbm && cffi_targets+=( gdbm ) |
152 |
+ use sqlite && cffi_targets+=( sqlite3 ) |
153 |
+ use tk && cffi_targets+=( tkinter/tklib ) |
154 |
+ |
155 |
+ local t |
156 |
+ # all modules except tkinter output to . |
157 |
+ # tkinter outputs to the correct dir ... |
158 |
+ cd lib_pypy || die |
159 |
+ for t in "${cffi_targets[@]}"; do |
160 |
+ # tkinter doesn't work via -m |
161 |
+ ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
162 |
+ done |
163 |
+ |
164 |
+ # Cleanup temporary objects |
165 |
+ find -name "_cffi_*.[co]" -delete || die |
166 |
+ find -type d -empty -delete || die |
167 |
+} |
168 |
+ |
169 |
+src_test() { |
170 |
+ # (unset) |
171 |
+ local -x PYTHONDONTWRITEBYTECODE |
172 |
+ |
173 |
+ # Test runner requires Python 2 too. However, it spawns PyPy3 |
174 |
+ # internally so that we end up testing the correct interpreter. |
175 |
+ "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ local dest=/usr/$(get_libdir)/pypy3 |
180 |
+ einfo "Installing PyPy ..." |
181 |
+ exeinto "${dest}" |
182 |
+ doexe pypy3-c libpypy3-c.so |
183 |
+ pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so" |
184 |
+ insinto "${dest}" |
185 |
+ # preserve mtimes to avoid obsoleting caches |
186 |
+ insopts -p |
187 |
+ doins -r include lib_pypy lib-python |
188 |
+ dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3 |
189 |
+ dodoc README.rst |
190 |
+ |
191 |
+ if ! use gdbm; then |
192 |
+ rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die |
193 |
+ fi |
194 |
+ if ! use sqlite; then |
195 |
+ rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \ |
196 |
+ "${ED%/}${dest}"/lib_pypy/_sqlite3* \ |
197 |
+ "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die |
198 |
+ fi |
199 |
+ if ! use tk; then |
200 |
+ rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
201 |
+ "${ED%/}${dest}"/lib_pypy/_tkinter \ |
202 |
+ "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
203 |
+ fi |
204 |
+ |
205 |
+ einfo "Generating caches and byte-compiling ..." |
206 |
+ |
207 |
+ local -x PYTHON=${ED%/}${dest}/pypy3-c |
208 |
+ # we can't use eclass function since PyPy is dumb and always gives |
209 |
+ # paths relative to the interpreter |
210 |
+ local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages |
211 |
+ python_export pypy3 EPYTHON |
212 |
+ |
213 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
214 |
+ python_domodule epython.py |
215 |
+ |
216 |
+ einfo "Byte-compiling Python standard library..." |
217 |
+ |
218 |
+ # compile the installed modules |
219 |
+ python_optimize "${ED%/}${dest}" |
220 |
+} |