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