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