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: Thu, 28 Mar 2019 14:22:44
Message-Id: 1553782869.617cec53bd9f172744d8fe69a2e6be070b8a2649.mgorny@gentoo
1 commit: 617cec53bd9f172744d8fe69a2e6be070b8a2649
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 28 13:52:17 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 28 14:21:09 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=617cec53
7
8 dev-python/pypy3-bin: Bump to 7.1.0 (Py3.6 branch)
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.0.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 497dfac6222..4a643b51bf7 100644
18 --- a/dev-python/pypy3-bin/Manifest
19 +++ b/dev-python/pypy3-bin/Manifest
20 @@ -13,5 +13,11 @@ DIST pypy3-bin-7.0.0-amd64+bzip2+ncurses.tar.lz 6873174 BLAKE2B 6ed19040d3af0dfd
21 DIST pypy3-bin-7.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8484244 BLAKE2B d23b84aa9f045e46c2461a4d26383e4fcd0c33283f54e11d0693faafec2d3792039534c9a93b418cb78f3e4d45b98f1377cd0555a20ccb2fdce5b9b2e17a133d SHA512 4c90ee87585a448466883aa47ebd4a3f92438d54fceb6cf752fd638746f1c0f2ab7a3145b310555ab19ba53838352523e981485904c4092bc457c7002931ab59
22 DIST pypy3-bin-7.0.0-x86+bzip2+ncurses+sse2.tar.lz 5529689 BLAKE2B 038ad3c9132d430268dad3ae7b1c2b6ca507743f3b2f7a3aef8b7aaa580b070287767878d2b528297c152ecd0a440aaa6a47e32f7aa5400bfda2703302c583fe SHA512 8932dbdf49f7a227e9108bcfd0e7136cd1287b036eee7665bf16868a0e322ca841eb6daa6a18b8a57e4184b8878abd20de9616f90845c0dc76d5382f7f53f3a3
23 DIST pypy3-bin-7.0.0-x86+bzip2+ncurses.tar.lz 5537714 BLAKE2B 49cdf63c1f94899ec4642d395dbf8ae6fe44fe9fc46e7f64b31e30d20f9e1dcc5d40b511d582f6c902724f5629e7b3b8e1090d76a3bb1a789b32b1c29b533e87 SHA512 42c8afa8fea5474d5b2c7c7192b2a79d8a3eb8d832038aad68edb011c056d6efb3903e67084f423ff167b1757804a5d796fddfa6f6f077966c855a1e56eba9cc
24 +DIST pypy3-bin-7.1.0-amd64+bzip2+jit+ncurses.tar.lz 11031092 BLAKE2B 9e9b530ff356aeeadd9da18853ece9f7e292412db427e70e4d93e58c57523a36594131b9d5185ca5f00e19da2b4843e7fa1fc79ec6ca2cfb94abd8360775486c SHA512 b002c6018335481e6960fbfbf75fdefcb45093687491b591e9db2ef870201b33ed33294a4cc975128aae8d8df4d186309c748c620255337b688d21683b653861
25 +DIST pypy3-bin-7.1.0-amd64+bzip2+ncurses.tar.lz 6917379 BLAKE2B 1be91d0001a09574e970c53cfb156f04b84149d6fb4f78e7713d26a44edf03cf3c4556900343d36e59edd2e273c1e626faff443ab097481c54d6e3dc353867b1 SHA512 dcfc9cc25df65bb477bc0e62f2b3dd5c723d928b2b3a7ac96e6583cbba25162681f736eef13ba3fee637f27326015e32832a2e7f021051c294efb4c7d26d0fca
26 +DIST pypy3-bin-7.1.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8510623 BLAKE2B 91bbe4286d82d90d05c3a4280c285bfccee3ae8661cf974554ef8c96f3806f95187cae1767340cc1e17f65c37f380dc9a4636cf3388a3c4bd2664ea4d61b63b8 SHA512 f5aa0efc4cbff57c0eb49504a46aac8b03bf298e5b996dd2264d923fe514543736df2f856d841b15a4386cd84809051ce6b29840c47fc32cdf7482d53d52b755
27 +DIST pypy3-bin-7.1.0-x86+bzip2+ncurses+sse2.tar.lz 5546135 BLAKE2B 7ce2fe3c8b662d808ec63c96fe7ba42b78210d5cd1828050b139616d577feb41cca65c79c291d376b3f53d54feb157894700fda705d067fd536af3bb0a4e9d72 SHA512 87fd9091e30a60f034d96cefa3a192801ab5c8ebf76d8e13741cf5f18317b4751e619b1b1e9ddf9098767526c119761208885744c08a4ce131915f3758e198d0
28 +DIST pypy3-bin-7.1.0-x86+bzip2+ncurses.tar.lz 5540259 BLAKE2B dcd4e666c66d5bb711e5b95431fafe19a81a8b8458af2fdfe1f2272ff05214f9687b9f88d8b58ef6b05272252db4b308b32cfe4778e0f224825bcca9609313ed SHA512 8a9f681b998189b6871d85fbef00289b5c258ec67805fc2bf3179fa4650655051c33b7715845dde8e93c5ce9884a36cb1501f653804328e4104099ddcdd1763d
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
33 diff --git a/dev-python/pypy3-bin/pypy3-bin-7.1.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-7.1.0.ebuild
34 new file mode 100644
35 index 00000000000..0f8954a4f84
36 --- /dev/null
37 +++ b/dev-python/pypy3-bin/pypy3-bin-7.1.0.ebuild
38 @@ -0,0 +1,188 @@
39 +# Copyright 1999-2019 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +
44 +# Test runner needs Python 2.
45 +PYTHON_COMPAT=( python2_7 pypy )
46 +inherit pax-utils python-any-r1 unpacker
47 +
48 +BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
49 +MY_P=pypy3.6-v${PV}
50 +
51 +DESCRIPTION="A fast, compliant alternative implementation of Python 3.6 (binary package)"
52 +HOMEPAGE="http://pypy.org/"
53 +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
54 + amd64? (
55 + jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
56 + !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
57 + )
58 + x86? (
59 + cpu_flags_x86_sse2? (
60 + jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
61 + !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
62 + )
63 + !cpu_flags_x86_sse2? (
64 + !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
65 + )
66 + )"
67 +
68 +# Supported variants
69 +REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
70 +
71 +LICENSE="MIT"
72 +# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
73 +SLOT="0/71-py36"
74 +KEYWORDS="~amd64 ~x86"
75 +IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
76 +
77 +RDEPEND="
78 + app-arch/bzip2:0/1
79 + dev-libs/expat:0/0
80 + dev-libs/libffi:0/7
81 + sys-devel/gcc:*
82 + >=sys-libs/glibc-2.28
83 + sys-libs/ncurses:0/6
84 + sys-libs/zlib:0/1
85 + gdbm? ( sys-libs/gdbm:0= )
86 + !libressl? ( dev-libs/openssl:0=[-bindist] )
87 + libressl? ( dev-libs/libressl:0= )
88 + sqlite? ( dev-db/sqlite:3= )
89 + tk? (
90 + dev-lang/tk:0=
91 + dev-tcltk/tix:0=
92 + )
93 + !dev-python/pypy3:0"
94 +DEPEND="${RDEPEND}
95 + app-arch/lzip
96 + app-arch/xz-utils
97 + test? ( ${PYTHON_DEPS} )"
98 +
99 +S=${WORKDIR}/${MY_P}-src
100 +
101 +QA_PREBUILT="
102 + usr/lib/pypy3.6/pypy3-c
103 + usr/lib/pypy3.6/libpypy3-c.so"
104 +
105 +src_prepare() {
106 + eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
107 + eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
108 + eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch
109 +
110 + sed -e "s^@EPREFIX@^${EPREFIX}^" \
111 + -i lib-python/3/distutils/command/install.py || die
112 +
113 + # apply CPython stdlib patches
114 + pushd lib-python/3 > /dev/null || die
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 +# "_blake2": "_blake2/_blake2_build.py",
151 +# "_sha3": "_sha3/_sha3_build.py",
152 + cffi_targets=( blake2/_blake2 sha3/_sha3 ssl
153 + audioop curses syslog pwdgrp resource lzma decimal )
154 + use gdbm && cffi_targets+=( gdbm )
155 + use sqlite && cffi_targets+=( sqlite3 )
156 + use tk && cffi_targets+=( tkinter/tklib )
157 +
158 + einfo "Please disregard the import errors during CFFI cache generation."
159 + einfo "They come from modules not built yet."
160 +
161 + local t
162 + # all modules except tkinter output to .
163 + # tkinter outputs to the correct dir ...
164 + cd lib_pypy || die
165 + for t in "${cffi_targets[@]}"; do
166 + # tkinter doesn't work via -m
167 + ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
168 + done
169 +
170 + # Cleanup temporary objects
171 + find -name "_cffi_*.[co]" -delete || die
172 + find -type d -empty -delete || die
173 +}
174 +
175 +src_test() {
176 + # (unset)
177 + local -x PYTHONDONTWRITEBYTECODE=
178 +
179 + # Test runner requires Python 2 too. However, it spawns PyPy3
180 + # internally so that we end up testing the correct interpreter.
181 + "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die
182 +}
183 +
184 +src_install() {
185 + local dest=/usr/lib/pypy3.6
186 + einfo "Installing PyPy ..."
187 + exeinto "${dest}"
188 + doexe pypy3-c libpypy3-c.so
189 + pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
190 + insinto "${dest}"
191 + # preserve mtimes to avoid obsoleting caches
192 + insopts -p
193 + doins -r include lib_pypy lib-python
194 + dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3
195 + dodoc README.rst
196 +
197 + if ! use gdbm; then
198 + rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
199 + fi
200 + if ! use sqlite; then
201 + rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
202 + "${ED%/}${dest}"/lib_pypy/_sqlite3* \
203 + "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
204 + fi
205 + if ! use tk; then
206 + rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
207 + "${ED%/}${dest}"/lib_pypy/_tkinter \
208 + "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
209 + fi
210 +
211 + einfo "Generating caches and byte-compiling ..."
212 +
213 + local -x PYTHON=${ED%/}${dest}/pypy3-c
214 + # we can't use eclass function since PyPy is dumb and always gives
215 + # paths relative to the interpreter
216 + local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages
217 + python_export pypy3 EPYTHON
218 +
219 + echo "EPYTHON='${EPYTHON}'" > epython.py || die
220 + python_domodule epython.py
221 +
222 + einfo "Byte-compiling Python standard library..."
223 +
224 + # compile the installed modules
225 + python_optimize "${ED%/}${dest}"
226 +}