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: Sun, 21 Apr 2019 06:30:02
Message-Id: 1555828193.29a54fcb8cdc46528497bffb329e4d589c275852.mgorny@gentoo
1 commit: 29a54fcb8cdc46528497bffb329e4d589c275852
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 21 06:09:12 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 21 06:29:53 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29a54fcb
7
8 dev-python/pypy-bin: Bump to 7.1.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pypy-bin/Manifest | 11 ++
13 dev-python/pypy-bin/pypy-bin-7.1.1.ebuild | 208 ++++++++++++++++++++++++++++++
14 2 files changed, 219 insertions(+)
15
16 diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
17 index 1edd67206bf..c6177223e4d 100644
18 --- a/dev-python/pypy-bin/Manifest
19 +++ b/dev-python/pypy-bin/Manifest
20 @@ -43,8 +43,19 @@ DIST pypy-bin-7.1.0-x86+bzip2+libressl+ncurses+sse2.tar.lz 6093992 BLAKE2B e9cc9
21 DIST pypy-bin-7.1.0-x86+bzip2+libressl+ncurses.tar.lz 6090777 BLAKE2B bcb332825409a50c57d09ac67c21104a88c58b237b84ce4c31484c3b81afeb783dc140123773fe5702df41002eb44b403bf29dbda1c66a40ef9aa037d6ae6217 SHA512 3a65faf263085abb2f1652b58e6da1712dc8632f27944bdabec1d9ddcd21065babc30967942717d7ca179ce449f94175b0d03ca44179afaed55a32d11bb7e9d8
22 DIST pypy-bin-7.1.0-x86+bzip2+ncurses+sse2.tar.lz 6093175 BLAKE2B 31a7e0b517370bb5f77372361205e5f24d8e129004af3430b3d2e3b2c58f455eb7fb2e88f86419d498724202349777189aea40cdf90eeec73b83a37a185aa653 SHA512 daeef87f64f5efd77e178fbdc6a85c0170db3d351c6951439c74ab3cef1641db8ab9266ac3d1e2b8e0a1efd2d2b1b90a1576ee21c069d8fe62fb1274ed49ed24
23 DIST pypy-bin-7.1.0-x86+bzip2+ncurses.tar.lz 6089713 BLAKE2B 8e733f4bf527fc5ecff06907d96dc8a8462b3f92cf5e328e8e232f54e7ad26303fc38b127d481ad70dccd406ef0b752619899ba45b18b3e1ad9ed692e6529a18 SHA512 b8b66a23c8b03b2840d721291b7ac39a9a0617acc7e54e3da35a930a37f8f64b95eb784c0a010513575972ad7477751966360dc0de10659f4b481d9ed275dafd
24 +DIST pypy-bin-7.1.1-amd64+bzip2+jit+libressl+ncurses.tar.lz 13220880 BLAKE2B d4b45f757069405f5641ed9b70ce8e94970b1a67c9ee2865fe4250c4c85b8dd44268c5e3aeb7c852fbb8822df4c0326d4d9fc5f77cc8db1dfa4eda749b6c1122 SHA512 b8d4b35ce8b1119fef4dc624cd28c71afdb13669e9c44f380440cd6275156f7f2a1ce240a855038bc82638152f69d1f27191d4937c23052e0a9b0ca4a4efa215
25 +DIST pypy-bin-7.1.1-amd64+bzip2+jit+ncurses.tar.lz 13081888 BLAKE2B f693f6148eae1583d4fcfcffa48cdf2317d99d4839ecc9e592868285f789e74a88b5aad1c842dd22e8c4b3c43a897fedd2ad95076105e95bf8cab53a27cb8308 SHA512 db4ac8050597da6a727b7cb4ee9549697796a1452b786888c9e9fb5cdd218817edcf4b3b6317a39716b589df140d831539185b6120eb516f80f472e8d7acd0b4
26 +DIST pypy-bin-7.1.1-amd64+bzip2+libressl+ncurses.tar.lz 7737448 BLAKE2B 02c5aa5227bc6d2fc4087b4767c63737378d90f222a7402b20fee166f36c636fae35855dbf1df9c63984df5624c6ec052e1ec598ca4eb367a6ffccec7c397952 SHA512 ab2b274b3aadf04d55dbc9e4df5ca59ea97ec7df4dd1f8bb24feee4d46d7c02d9c72d55fad784d7412382e0803f172e871f01f82deba2cc5155b97e5139602e9
27 +DIST pypy-bin-7.1.1-amd64+bzip2+ncurses.tar.lz 7771869 BLAKE2B b63cb64cd7d3c130a58829b786fdd3d35a7eaf192b0491046199e993b20d58ddd9fe83d264d077801f0d18632e5b06f281065150a725a8ae017867b18e036f62 SHA512 1383bfe7c4497f17833e48c3b6096d29f5da675e713e740a5836f5aa9b818fb5460af9ff682e34d9d409bdfa1283dde9cb796b79a6f62d9ba024379cbeff223d
28 +DIST pypy-bin-7.1.1-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz 9944011 BLAKE2B daf397da1f9341ded52b8cafae7c92080cfef1b2dc146b73dade51737a2d765ff52ffe55070229e8faf7e79c420c2ea3de4e5ad7f4ba5ee38d7c3dcd5953c9e2 SHA512 107a2df768985a818d906d176967188975e1beddc067c33fe228e0d2fd53b6d35e75603eb9b4e723eb5278e7b0a5b4a33921b6b820be0fce7dead40f4b9f68d3
29 +DIST pypy-bin-7.1.1-x86+bzip2+jit+ncurses+sse2.tar.lz 9979104 BLAKE2B 999e620f47e45d0aee9cdb668e99e0ef8b9b8eea7393ef813f1116ec25f9143f77f78f6e26571e23248fb1c06fd1e5ad74186dc8dace7e4035b11078d2eec7d4 SHA512 803118af392da988070464155c3d95fdce70fd1ab8c37e59cb4ce9f719d2c354a6330cf5c759b0a92e8efe44ecc5cf894efd93e1882ae530027d2f6261321834
30 +DIST pypy-bin-7.1.1-x86+bzip2+libressl+ncurses+sse2.tar.lz 6092434 BLAKE2B 71141a8981fb006412b2a5cae3d93b08a83b68c22a3470eefe8ae15534ecf227c74f0fd878ba790d73b7cb4e0568881aa94b739fafb36e12b3d909fd4ce6f285 SHA512 92f5185a70aad8f2161452f490b001783fc75d275dba800c0ba73704914bdc2363553c33b72ecf8408133fd962ea9f53399b8316bd54a1f794569c6f08f28270
31 +DIST pypy-bin-7.1.1-x86+bzip2+libressl+ncurses.tar.lz 6060032 BLAKE2B 660d834c3a76ed699170b7c13d36f6dc00df3b4811a09c5dec161af7f9b0416c7fda461ca04481ad656bea39b6ed25f5220b8d38c8ec02c9634a025e3b3d6cfc SHA512 21baa8cd6bd255a335c67a1197ccef856553987740f517e1b33c27758e57b61c22b8274419b445a257ad32511d3c07901d4550151047e04adcd39c9cbf20058e
32 +DIST pypy-bin-7.1.1-x86+bzip2+ncurses+sse2.tar.lz 6091202 BLAKE2B c173cf6890143e27677e6d6ee68b2a1f55ec97897817622559c25f2f49ca5bbb5a0a2c32785a3356a6bb8f4899ff19164e550fd2762003ee018faadf80227c95 SHA512 a630e380177da78daef288e69f15a4cb333c4ef1ab2da8b4b6cf76ec139c1961d692873c7ec119e54f596ef4e1435a6c6b3ef933edca2b0b5cd6fc24963d3b0d
33 +DIST pypy-bin-7.1.1-x86+bzip2+ncurses.tar.lz 6088838 BLAKE2B 555bca61d4693b3e5d3c8344bac3781cfe06acc4a50bcd74add2d122c68f177258ef438a7801ca4633a006e8a001500110287934f232ceb52789f3cc72b9b34b SHA512 0748e14e903b0863bb2a067b558826f47cad2063c31c935b84249eee2a9cf96cfa36a5d5ef92f0facca61356499f4b9cfee6496a6cc3228bae7729e50edf6be0
34 DIST pypy2-v6.0.0-src.tar.bz2 19741694 BLAKE2B 55f5000e590613b516b12c3682a658fe6a17fbe264be3d61a81698cdf098b39177cf4355eb3f28980209c7a0e005498201cbad8884e3aa02cc86a228d1552046 SHA512 d3bdcd65fc83f2fda3203a604733fe6765049a17cca2715cd6045dc302a6159b4741a821c53fa4c97acf7297cef4c62e941a6a6eb7f8a253a93a28dcf2aa2ca0
35 DIST pypy2.7-v7.0.0-src.tar.bz2 19811330 BLAKE2B 38089896934d79d2b3f5813cc9dae23b0534d9d312871b22336a277d5a15b82d748f66f896558cfdb45a23004944a648436e89ae36fadc107930e7b99963e12b SHA512 7fb5682ee4226af51008f50a81c922e44c231410fe36b7656efa20f22c855ba30a01bc96ee897b4c7a02941d37a405c922b09855977313878e34aaad6bf023dc
36 DIST pypy2.7-v7.1.0-src.tar.bz2 20032490 BLAKE2B e916d63d7915959c87830509630d8b2ab993d012d314e88c7cc84bed4c595957c3fc575f7b57fac7c24aaf1492797ca43b146e457357b6e73d9772724461de66 SHA512 fa7c1a6669686dbd9c0da627dc2a06ad696f20274218af9602f91d73f3ebe0ede380c6e1a50534f53dee8f075eaef5a403c7c5b5bdbfff25e679ba30522391bb
37 +DIST pypy2.7-v7.1.1-src.tar.bz2 20027876 BLAKE2B a411d7312ed3b9be9297e7ff4cc569530529272156117ca037bbe29ad477e7ce3b8903d13c6a5a35e9867a8ccbfaa418061a7b37317b4b713508c429a41ffe9a SHA512 f998931ecf4f9aeee24f0fed95589716175971816c00e50bc53de6de0cfe2a8537b89c1aee636d15faecf91df8c29943295485686185f5247a3e0913fa514f48
38 DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1
39 DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca
40
41 diff --git a/dev-python/pypy-bin/pypy-bin-7.1.1.ebuild b/dev-python/pypy-bin/pypy-bin-7.1.1.ebuild
42 new file mode 100644
43 index 00000000000..53daf3ce27b
44 --- /dev/null
45 +++ b/dev-python/pypy-bin/pypy-bin-7.1.1.ebuild
46 @@ -0,0 +1,208 @@
47 +# Copyright 1999-2019 Gentoo Authors
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=7
51 +
52 +inherit pax-utils python-utils-r1 unpacker
53 +
54 +BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
55 +CPY_PATCHSET_VERSION="2.7.15"
56 +MY_P=pypy2.7-v${PV}
57 +
58 +DESCRIPTION="Pre-built version of PyPy"
59 +HOMEPAGE="http://pypy.org/"
60 +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
61 + https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz
62 + amd64? (
63 + !libressl? (
64 + jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
65 + !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
66 + )
67 + libressl? (
68 + jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+libressl+ncurses.tar.lz )
69 + !jit? ( ${BINHOST}/${P}-amd64+bzip2+libressl+ncurses.tar.lz )
70 + )
71 + )
72 + x86? (
73 + !libressl? (
74 + cpu_flags_x86_sse2? (
75 + jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
76 + !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
77 + )
78 + !cpu_flags_x86_sse2? (
79 + !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
80 + )
81 + )
82 + libressl? (
83 + cpu_flags_x86_sse2? (
84 + jit? ( ${BINHOST}/${P}-x86+bzip2+jit+libressl+ncurses+sse2.tar.lz )
85 + !jit? ( ${BINHOST}/${P}-x86+bzip2+libressl+ncurses+sse2.tar.lz )
86 + )
87 + !cpu_flags_x86_sse2? (
88 + !jit? ( ${BINHOST}/${P}-x86+bzip2+libressl+ncurses.tar.lz )
89 + )
90 + )
91 + )"
92 +
93 +# Supported variants
94 +REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
95 +
96 +LICENSE="MIT"
97 +# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
98 +# pypy 7.0.0: install directory changed to 'pypy2.7'
99 +SLOT="0/41-py27"
100 +KEYWORDS="~amd64 ~x86"
101 +IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
102 +
103 +RDEPEND="
104 + app-arch/bzip2:0/1
105 + dev-libs/expat:0/0
106 + dev-libs/libffi:0/7
107 + sys-devel/gcc:*
108 + >=sys-libs/glibc-2.28
109 + sys-libs/ncurses:0/6
110 + sys-libs/zlib:0/1
111 + gdbm? ( sys-libs/gdbm:0= )
112 + !libressl? ( dev-libs/openssl:0/1.1[-bindist] )
113 + libressl? ( dev-libs/libressl:0/44 )
114 + sqlite? ( dev-db/sqlite:3= )
115 + tk? (
116 + dev-lang/tk:0=
117 + dev-tcltk/tix:0=
118 + )
119 + !dev-python/pypy:0"
120 +DEPEND="${RDEPEND}
121 + app-arch/lzip
122 + app-arch/xz-utils"
123 +
124 +S=${WORKDIR}/${MY_P}-src
125 +
126 +QA_PREBUILT="
127 + usr/lib/pypy2.7/pypy-c
128 + usr/lib/pypy2.7/libpypy-c.so"
129 +
130 +src_prepare() {
131 + eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
132 + eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
133 +
134 + sed -e "s^@EPREFIX@^${EPREFIX}^" \
135 + -i lib-python/2.7/distutils/command/install.py || die
136 +
137 + # apply CPython stdlib patches
138 + pushd lib-python/2.7 > /dev/null || die
139 + # TODO: cpy turkish locale patch now fixes C code
140 + # probably needs better port to pypy, if it is broken there
141 + eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
142 + eapply -p2 "${WORKDIR}"/patches/0011-use_pyxml.patch
143 + popd > /dev/null || die
144 +
145 + eapply_user
146 +}
147 +
148 +src_compile() {
149 + # Tadaam! PyPy compiled!
150 + mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
151 + mv "${WORKDIR}"/${P}*/include/*.h include/ || die
152 + # (not installed by pypy)
153 + rm pypy/module/cpyext/include/_numpypy/numpy/README || die
154 + mv pypy/module/cpyext/include/* include/ || die
155 + mv pypy/module/cpyext/parse/*.h include/ || die
156 +
157 + pax-mark m pypy-c libpypy-c.so
158 +
159 + einfo "Generating caches and CFFI modules ..."
160 +
161 + # Generate Grammar and PatternGrammar pickles.
162 + ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
163 + || die "Generation of Grammar and PatternGrammar pickles failed"
164 +
165 + # Generate cffi modules
166 + # Please keep in sync with pypy/tool/build_cffi_imports.py!
167 +#cffi_build_scripts = {
168 +# "sqlite3": "_sqlite3_build.py",
169 +# "audioop": "_audioop_build.py",
170 +# "tk": "_tkinter/tklib_build.py",
171 +# "curses": "_curses_build.py" if sys.platform != "win32" else None,
172 +# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
173 +# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
174 +# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
175 +# "resource": "_resource_build.py" if sys.platform != "win32" else None,
176 + cffi_targets=( audioop curses syslog pwdgrp resource )
177 + use gdbm && cffi_targets+=( gdbm )
178 + use sqlite && cffi_targets+=( sqlite3 )
179 + use tk && cffi_targets+=( tkinter/tklib )
180 +
181 + local t
182 + # all modules except tkinter output to .
183 + # tkinter outputs to the correct dir ...
184 + cd lib_pypy || die
185 + for t in "${cffi_targets[@]}"; do
186 + # tkinter doesn't work via -m
187 + ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
188 + done
189 +
190 + # Cleanup temporary objects
191 + find -name "_cffi_*.[co]" -delete || die
192 + find -type d -empty -delete || die
193 +}
194 +
195 +src_test() {
196 + # (unset)
197 + local -x PYTHONDONTWRITEBYTECODE=
198 +
199 + local ignored_tests=(
200 + # network
201 + --ignore=lib-python/2.7/test/test_urllibnet.py
202 + --ignore=lib-python/2.7/test/test_urllib2net.py
203 + # lots of free space
204 + --ignore=lib-python/2.7/test/test_zipfile64.py
205 + # no module named 'worker' -- a lot
206 + --ignore=lib-python/2.7/test/test_xpickle.py
207 + )
208 +
209 + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \
210 + "${ignored_tests[@]}" lib-python || die
211 +}
212 +
213 +src_install() {
214 + local dest=/usr/lib/pypy2.7
215 + einfo "Installing PyPy ..."
216 + exeinto "${dest}"
217 + doexe pypy-c libpypy-c.so
218 + pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
219 + insinto "${dest}"
220 + # preserve mtimes to avoid obsoleting caches
221 + insopts -p
222 + doins -r include lib_pypy lib-python
223 + dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy
224 + dodoc README.rst
225 +
226 + if ! use gdbm; then
227 + rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
228 + "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
229 + fi
230 + if ! use sqlite; then
231 + rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \
232 + "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
233 + "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
234 + fi
235 + if ! use tk; then
236 + rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
237 + "${ED%/}${dest}"/lib_pypy/_tkinter \
238 + "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
239 + fi
240 +
241 + local -x PYTHON=${ED%/}${dest}/pypy-c
242 + # we can't use eclass function since PyPy is dumb and always gives
243 + # paths relative to the interpreter
244 + local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy2.7/site-packages
245 + python_export pypy EPYTHON
246 +
247 + echo "EPYTHON='${EPYTHON}'" > epython.py || die
248 + python_domodule epython.py
249 +
250 + einfo "Byte-compiling Python standard library..."
251 +
252 + # compile the installed modules
253 + python_optimize "${ED%/}${dest}"
254 +}