1 |
commit: 67aa32ae2dad6462b40299f0ac958064b7e21726 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 4 15:16:06 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 4 16:00:54 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67aa32ae |
7 |
|
8 |
dev-python/pypy-bin: New version built on libffi.so.7 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy-bin/Manifest | 10 ++ |
13 |
dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild | 208 +++++++++++++++++++++++++ |
14 |
2 files changed, 218 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest |
17 |
index 80e3da1f11b..7c893464428 100644 |
18 |
--- a/dev-python/pypy-bin/Manifest |
19 |
+++ b/dev-python/pypy-bin/Manifest |
20 |
@@ -12,6 +12,16 @@ DIST pypy-bin-6.0.0-amd64+bzip2+jit+libressl+ncurses.tar.lz 12940199 BLAKE2B c37 |
21 |
DIST pypy-bin-6.0.0-amd64+bzip2+jit+ncurses.tar.lz 12932560 BLAKE2B 97693b27ce350dd35103cf6176e7113503f790de1fc498810bfd23ed70f324fb148f801ec3d5ffcc1c578d49098ff7c4353da10509c0d56a2f3c6c4dad0a0dfa SHA512 03db8101a5aa288eb59b73d849ca0767a2b6cdffe1bfecb5f4ee5a70ceb7d73c4e1ca9be06424e18e62c2939b07c152bad1c762a9d209faa8bac9b91c48b4317 |
22 |
DIST pypy-bin-6.0.0-amd64+bzip2+libressl+ncurses.tar.lz 7466895 BLAKE2B e199b8330dd4ac2acfe668fd19b2900843c96de961b3ea2fc418ec71c289c98d9c505cd42581e726179441dc877feb7eb57b89ee63c8ec00895302dacb039fbe SHA512 560886744633197abf14c21fb872f41d3d614427861045d6654c72b940e7b16996af4077ef9d531cfecc28c3e65dc64e2db149fe23c370aa8ee446dd5b0359e8 |
23 |
DIST pypy-bin-6.0.0-amd64+bzip2+ncurses.tar.lz 7547568 BLAKE2B 713cd16e54cdab7e25c091db931a760f51de990bf53e566b711754c5a705507257f1c54abc5f85aba7b2449f6d3967e820d14f55953a3880e7bac3eb028db203 SHA512 e8efb0af8e8ef89c95e5fe73b177f34b9120a172e0af7e52990e428e498e3b84b31eba3dfaa28bffcb121625b5494eaeec71af2a2fa46d6b888c148ca162836b |
24 |
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+jit+libressl+ncurses.tar.lz 13018301 BLAKE2B b851ec3e73d4203a4c1eece2cf81dada7cc2b8f7047c9f4e06bd4f24008c1650d95fbd29697fafbdbed953d19595c8e77143a7bd9c8306ab3a15b2c62be48bcf SHA512 8edaf5fdad14886f4120358066fbb09be17d2b7f10dd7600f256a3f3d4b66c90502b85e8a500a70113135ce408ae2877296e1a9cb82d06ae0d031db26e09066c |
25 |
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+jit+ncurses.tar.lz 12916168 BLAKE2B f23aa0800c48d976f60d6826a424703fed1e1a00b0eb1fa09adce609cd1379f47e42df4669dad6edb59270d708f145049a7342ed73971d33183fef80dbd00539 SHA512 0ec4acf8fa2fb4b7ea409eb21a5dc0dcf14fb5616b8cb11d7892fd99aea6aa0984d0951ac474fd1469fe362e841a684d2292cafe6f69c078d003b90f224f2780 |
26 |
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+libressl+ncurses.tar.lz 7546991 BLAKE2B d4e84d839dfa106a4e9b3a60327bae1fa96c326bf219b4f8dddc9dc968412b4be67e80ed1009120cf6a8b14aeede83ebb863bee1296eeafdae95a01ef0efd1eb SHA512 e3775fbf8e2a28d30a90f5bbde84bb03007aa00a6b778834db067d470d97b87c6e15ae792996d801b96d1486aecceff124854f0bd2d2bd8e353c0ee1c12662d4 |
27 |
+DIST pypy-bin-6.0.0-ffi7-amd64+bzip2+ncurses.tar.lz 7558174 BLAKE2B 62dc408c958c18d9751466b24c5dde46bc8705634e7312593c996c9517cc36bbaad7278aa09b179bbcb962c4124399d27647b82356c79e20e13434153b8c79b9 SHA512 8c232c7852f3e8d9e3b5bfcc3785e171ea64c63d3e1658662d9eb0340a21efecd4fa037b15ede155015b262e2f60e4fa0e80d72beb18d5e4b01dcb3e003a516f |
28 |
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz 9857459 BLAKE2B a125f68fe7ca8259d614c1d375029df776944a8f14960528d5b96125a1b46c7c014894ca3f952157957cca654dc8143033d04f4db0fdef182a6915304b630dcb SHA512 4fa02202d2ceee6cdbd2473e8f3028695a73577504053eafd87464dd75116028a3b2129be16d422fbac5372cd7623c0ee4d9ab75b87a1423dac9470eecda1227 |
29 |
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+jit+ncurses+sse2.tar.lz 9859596 BLAKE2B e76d456b931bb9ffd5f5140cf4125ed1446ec81432785a97f7a631adb3b97c7184d174ef928df0089e6327a1818ce70072e6835561877a6a6398bc6c6ab6705d SHA512 80895434011f8ba14cf04cd060e6b022f8f7a92fc11b3005bf92b20c267200aafa98f114eaa7b473ce2a27a44f22882ed20b59b7bff4d1b1eef3540b9154e1e5 |
30 |
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+libressl+ncurses+sse2.tar.lz 5940394 BLAKE2B 4f83e1bd745e686999c39fc8976c204a95b1e2e2f6a4ec23020e136f0c1046eed4ba4e8327c7bd6c2f11d80abb398fa46fd57ea18f9e9a7ed24577c67e274e7c SHA512 7007867780b9dd8f0501d278a651e0e6e82bdfcf40e66344a4d194ea71d311e0efdb8ac00a7bc413d796cadcbbe10b603707c371bec4fe12f1b090da81e11226 |
31 |
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+libressl+ncurses.tar.lz 5938624 BLAKE2B 218e2a75d601cad1346d4513f01e8b9544cf2d8e0de68e43e6645758efa94e8f770e06c73be16e53964752e2a747414141a99137e7f6820f33ea1d7f3463736b SHA512 c2d17b21de8fc2658c4ffca3ca02138d2446503427c7fb4d488a2a58e1e0b0bcc1eaa0548dbe176cd7a668cdf296ffdb3a0356b27dbfbd7b6be44d2224779358 |
32 |
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+ncurses+sse2.tar.lz 5943737 BLAKE2B ba39bff2fcccebed496c12ff85d95ea6f7d6092661b251673b53c061fba831eeab74b1286d4fb3873bbd5daa6f4ad5af2cef2c9db561afecd34285b806e0b794 SHA512 8c6a6dd5adb6a0b80c1ea3cc461ff2316084319e26b3f0c531ccf67bf518f603156624596d94f65a2b307e462cc97cef39dff33d662f847a20620103b78fcc5e |
33 |
+DIST pypy-bin-6.0.0-ffi7-x86+bzip2+ncurses.tar.lz 5939972 BLAKE2B 86ca6f1dd9f00d993986476fbeb253b2a7efb862dec7c8b90945c32e9418d52460d3d305fd0e182e9351e6de148928cf786f461cb3174601d84f5604ca1ae132 SHA512 4d14693ba0bcf3d6f56c9e8a45959d84ba5aacbccee0a643a8c713569a0e5de1449e726e7c813a93105c8dd145f1be6a7f78eec22bbb5c5a8aba31f15cffdbe5 |
34 |
DIST pypy-bin-6.0.0-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz 10268326 BLAKE2B 0f0c9b9f9a586b7dfc1099a9dbe28fe56d49c808ffd2e632f428b8992d39db3db7f70fd4f2fd0fb261d8c85202ab4ec2febc35b1bd4dc86f38ab8fba5715541c SHA512 40986918e0ea94053b3adc5594a21acff34d4f18b0f4827ce9cb2646d3ddcda8fb6b107ac17869c2c44f99f153a2829fc3ae89e8d4caf61ead4c4a4c9b8e963d |
35 |
DIST pypy-bin-6.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 9857367 BLAKE2B 48d9271213dfa04991fbefab294cf3ee1a8d69d954315b0b3e543bffaae2134f0ce1e5f3da09e45041b988b0e08359c68b49acaf14c8bf26913cb540ac1928f6 SHA512 deeabbf19d95a6e6e55dea59cb0ff06fdf1ce687d6cd9499ef010d90445e05102056b5c8bfe9f44528cf86f087e4a2b1dee00fb5df1f7526673333cf73d5c8ab |
36 |
DIST pypy-bin-6.0.0-x86+bzip2+libressl+ncurses+sse2.tar.lz 6301309 BLAKE2B 8f8e16bd05da671fbe3e762dff33f32b1c50f3ce866432d3bc039724d025192a7116d6aa2590007e3adb52e5b3dd3ad9eadbc7c8f388bc7e02b049fcd980e3f1 SHA512 e6d32352ecb3a17e614f4ddac600f7dafb0a39fa807ba2fcce506eae881ee5c8f959e2d797f8126bfea74b801b76efbd9a3df86dc03c8521ec320fd06d05659e |
37 |
|
38 |
diff --git a/dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild b/dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild |
39 |
new file mode 100644 |
40 |
index 00000000000..82d0da2ce0a |
41 |
--- /dev/null |
42 |
+++ b/dev-python/pypy-bin/pypy-bin-6.0.0-r100.ebuild |
43 |
@@ -0,0 +1,208 @@ |
44 |
+# Copyright 1999-2018 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI=6 |
48 |
+ |
49 |
+inherit pax-utils python-utils-r1 unpacker versionator |
50 |
+ |
51 |
+BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}-ffi7" |
52 |
+CPY_PATCHSET_VERSION="2.7.14-0" |
53 |
+MY_P=pypy2-v${PV} |
54 |
+ |
55 |
+DESCRIPTION="Pre-built version of PyPy" |
56 |
+HOMEPAGE="http://pypy.org/" |
57 |
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2 |
58 |
+ https://dev.gentoo.org/~floppym/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz |
59 |
+ amd64? ( |
60 |
+ !libressl? ( |
61 |
+ jit? ( ${BINHOST}/${P}-ffi7-amd64+bzip2+jit+ncurses.tar.lz ) |
62 |
+ !jit? ( ${BINHOST}/${P}-ffi7-amd64+bzip2+ncurses.tar.lz ) |
63 |
+ ) |
64 |
+ libressl? ( |
65 |
+ jit? ( ${BINHOST}/${P}-ffi7-amd64+bzip2+jit+libressl+ncurses.tar.lz ) |
66 |
+ !jit? ( ${BINHOST}/${P}-ffi7-amd64+bzip2+libressl+ncurses.tar.lz ) |
67 |
+ ) |
68 |
+ ) |
69 |
+ x86? ( |
70 |
+ !libressl? ( |
71 |
+ cpu_flags_x86_sse2? ( |
72 |
+ jit? ( ${BINHOST}/${P}-ffi7-x86+bzip2+jit+ncurses+sse2.tar.lz ) |
73 |
+ !jit? ( ${BINHOST}/${P}-ffi7-x86+bzip2+ncurses+sse2.tar.lz ) |
74 |
+ ) |
75 |
+ !cpu_flags_x86_sse2? ( |
76 |
+ !jit? ( ${BINHOST}/${P}-ffi7-x86+bzip2+ncurses.tar.lz ) |
77 |
+ ) |
78 |
+ ) |
79 |
+ libressl? ( |
80 |
+ cpu_flags_x86_sse2? ( |
81 |
+ jit? ( ${BINHOST}/${P}-ffi7-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz ) |
82 |
+ !jit? ( ${BINHOST}/${P}-ffi7-x86+bzip2+libressl+ncurses+sse2.tar.lz ) |
83 |
+ ) |
84 |
+ !cpu_flags_x86_sse2? ( |
85 |
+ !jit? ( ${BINHOST}/${P}-ffi7-x86+bzip2+libressl+ncurses.tar.lz ) |
86 |
+ ) |
87 |
+ ) |
88 |
+ )" |
89 |
+ |
90 |
+# Supported variants |
91 |
+REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )" |
92 |
+ |
93 |
+LICENSE="MIT" |
94 |
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
95 |
+SLOT="0/41" |
96 |
+KEYWORDS="~amd64 ~x86" |
97 |
+IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk" |
98 |
+ |
99 |
+RDEPEND=" |
100 |
+ app-arch/bzip2:0/1 |
101 |
+ dev-libs/expat:0/0 |
102 |
+ dev-libs/libffi:0/7 |
103 |
+ sys-devel/gcc:* |
104 |
+ sys-libs/glibc |
105 |
+ sys-libs/ncurses:0/6 |
106 |
+ sys-libs/zlib:0/1 |
107 |
+ gdbm? ( sys-libs/gdbm:0= ) |
108 |
+ !libressl? ( dev-libs/openssl:0/0[-bindist] ) |
109 |
+ libressl? ( dev-libs/libressl:0/44 ) |
110 |
+ sqlite? ( dev-db/sqlite:3= ) |
111 |
+ tk? ( |
112 |
+ dev-lang/tk:0= |
113 |
+ dev-tcltk/tix:0= |
114 |
+ ) |
115 |
+ !dev-python/pypy:0" |
116 |
+DEPEND="${RDEPEND} |
117 |
+ app-arch/lzip |
118 |
+ app-arch/xz-utils" |
119 |
+ |
120 |
+S=${WORKDIR}/${MY_P}-src |
121 |
+ |
122 |
+QA_PREBUILT=" |
123 |
+ usr/lib*/pypy/pypy-c |
124 |
+ usr/lib*/pypy/libpypy-c.so" |
125 |
+ |
126 |
+src_prepare() { |
127 |
+ eapply "${FILESDIR}/4.0.0-gentoo-path.patch" |
128 |
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
129 |
+ |
130 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
131 |
+ -e "s^@libdir@^$(get_libdir)^" \ |
132 |
+ -i lib-python/2.7/distutils/command/install.py || die |
133 |
+ |
134 |
+ # apply CPython stdlib patches |
135 |
+ pushd lib-python/2.7 > /dev/null || die |
136 |
+ # TODO: cpy turkish locale patch now fixes C code |
137 |
+ # probably needs better port to pypy, if it is broken there |
138 |
+ eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
139 |
+ eapply "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch |
140 |
+ popd > /dev/null || die |
141 |
+ |
142 |
+ eapply_user |
143 |
+} |
144 |
+ |
145 |
+src_compile() { |
146 |
+ # Tadaam! PyPy compiled! |
147 |
+ mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die |
148 |
+ mv "${WORKDIR}"/${P}*/include/*.h include/ || die |
149 |
+ # (not installed by pypy) |
150 |
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
151 |
+ mv pypy/module/cpyext/include/* include/ || die |
152 |
+ mv pypy/module/cpyext/parse/*.h include/ || die |
153 |
+ |
154 |
+ pax-mark m pypy-c libpypy-c.so |
155 |
+ |
156 |
+ einfo "Generating caches and CFFI modules ..." |
157 |
+ |
158 |
+ # Generate Grammar and PatternGrammar pickles. |
159 |
+ ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
160 |
+ || die "Generation of Grammar and PatternGrammar pickles failed" |
161 |
+ |
162 |
+ # Generate cffi modules |
163 |
+ # Please keep in sync with pypy/tool/build_cffi_imports.py! |
164 |
+#cffi_build_scripts = { |
165 |
+# "sqlite3": "_sqlite3_build.py", |
166 |
+# "audioop": "_audioop_build.py", |
167 |
+# "tk": "_tkinter/tklib_build.py", |
168 |
+# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
169 |
+# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
170 |
+# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
171 |
+# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
172 |
+# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
173 |
+ cffi_targets=( audioop curses syslog pwdgrp resource ) |
174 |
+ use gdbm && cffi_targets+=( gdbm ) |
175 |
+ use sqlite && cffi_targets+=( sqlite3 ) |
176 |
+ use tk && cffi_targets+=( tkinter/tklib ) |
177 |
+ |
178 |
+ local t |
179 |
+ # all modules except tkinter output to . |
180 |
+ # tkinter outputs to the correct dir ... |
181 |
+ cd lib_pypy || die |
182 |
+ for t in "${cffi_targets[@]}"; do |
183 |
+ # tkinter doesn't work via -m |
184 |
+ ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
185 |
+ done |
186 |
+ |
187 |
+ # Cleanup temporary objects |
188 |
+ find -name "_cffi_*.[co]" -delete || die |
189 |
+ find -type d -empty -delete || die |
190 |
+} |
191 |
+ |
192 |
+src_test() { |
193 |
+ # (unset) |
194 |
+ local -x PYTHONDONTWRITEBYTECODE= |
195 |
+ |
196 |
+ local ignored_tests=( |
197 |
+ # network |
198 |
+ --ignore=lib-python/2.7/test/test_urllibnet.py |
199 |
+ --ignore=lib-python/2.7/test/test_urllib2net.py |
200 |
+ # lots of free space |
201 |
+ --ignore=lib-python/2.7/test/test_zipfile64.py |
202 |
+ # no module named 'worker' -- a lot |
203 |
+ --ignore=lib-python/2.7/test/test_xpickle.py |
204 |
+ ) |
205 |
+ |
206 |
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
207 |
+ "${ignored_tests[@]}" lib-python || die |
208 |
+} |
209 |
+ |
210 |
+src_install() { |
211 |
+ local dest=/usr/$(get_libdir)/pypy |
212 |
+ einfo "Installing PyPy ..." |
213 |
+ exeinto "${dest}" |
214 |
+ doexe pypy-c libpypy-c.so |
215 |
+ pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so" |
216 |
+ insinto "${dest}" |
217 |
+ # preserve mtimes to avoid obsoleting caches |
218 |
+ insopts -p |
219 |
+ doins -r include lib_pypy lib-python |
220 |
+ dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy |
221 |
+ dodoc README.rst |
222 |
+ |
223 |
+ if ! use gdbm; then |
224 |
+ rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \ |
225 |
+ "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
226 |
+ fi |
227 |
+ if ! use sqlite; then |
228 |
+ rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \ |
229 |
+ "${ED%/}${dest}"/lib_pypy/_sqlite3.py \ |
230 |
+ "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
231 |
+ fi |
232 |
+ if ! use tk; then |
233 |
+ rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
234 |
+ "${ED%/}${dest}"/lib_pypy/_tkinter \ |
235 |
+ "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
236 |
+ fi |
237 |
+ |
238 |
+ local -x PYTHON=${ED%/}${dest}/pypy-c |
239 |
+ # we can't use eclass function since PyPy is dumb and always gives |
240 |
+ # paths relative to the interpreter |
241 |
+ local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages |
242 |
+ python_export pypy EPYTHON |
243 |
+ |
244 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
245 |
+ python_domodule epython.py |
246 |
+ |
247 |
+ einfo "Byte-compiling Python standard library..." |
248 |
+ |
249 |
+ # compile the installed modules |
250 |
+ python_optimize "${ED%/}${dest}" |
251 |
+} |