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