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: Wed, 07 Sep 2016 17:11:11
Message-Id: 1473268259.2025cbac5e6129d148b652130621720406e18d26.mgorny@gentoo
1 commit: 2025cbac5e6129d148b652130621720406e18d26
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 7 16:49:06 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 7 17:10:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2025cbac
7
8 dev-python/pypy-bin: Bump to 5.4.1
9
10 dev-python/pypy-bin/Manifest | 8 ++
11 dev-python/pypy-bin/pypy-bin-5.4.1.ebuild | 205 ++++++++++++++++++++++++++++++
12 2 files changed, 213 insertions(+)
13
14 diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
15 index 1587b2e..231b257 100644
16 --- a/dev-python/pypy-bin/Manifest
17 +++ b/dev-python/pypy-bin/Manifest
18 @@ -43,8 +43,16 @@ DIST pypy-bin-5.4.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10323530 SHA25
19 DIST pypy-bin-5.4.0-x86+bzip2+jit+ncurses+sse2.tar.lz 11451215 SHA256 8673f3a44cd7c988bfc437d98786e32ac7ffc81bbd9cc70f1c5409b7a91d0f73 SHA512 36f5c5ee89d9d3ce93cf5c2ff0a1cfdaf4c317ac28a96c79f7dc9670e81fd3d7afbad1474e4542e59522019729c123000fb94950dbaa6cdf37e542706e08c9b8 WHIRLPOOL 65ede342b4a4d61df73ab88ff63ececbd93b0a608609413a6e9ebd14aa4c4105c41aed9c5a9b0f72f789208f73d18abe3dfd6bdc48cdbe8b39e2ab614c1a9278
20 DIST pypy-bin-5.4.0-x86+bzip2+ncurses+sse2.tar.lz 5990323 SHA256 272a2aa4cd0bd4b4653fb36c72e10b3f8d383f76dd616bb218dd8d44067a9c30 SHA512 12c5875d720b6fb1865d0080cfafd50304a01083f48c240897dc726515078216eb2302483688df102e14068f900765e504ed2176d51b46bbeca51195e0437657 WHIRLPOOL 5fc099af5154f0f26ad287451924b55f6ed9e5070585b2b0014cae6f6b9351072eb2dfb63401862e0daa391559e1a05b2c8e12464b58d98606c32ca15a85dbe7
21 DIST pypy-bin-5.4.0-x86+bzip2+ncurses.tar.lz 6009517 SHA256 38a03bbc64f368fa58e511038566cff8e3c01570e48aa00d686737809e41e81b SHA512 3dbea8724dc025bfcd1592a851db1fdd742fae7638314d6ca56770802c1041cee6c95d1ca7b881e4ce64d7daea42c53fe40228512ad6d62918c6daae1ccf0dc6 WHIRLPOOL 567abe65875131c32c046d6538823926c8544e22518512e1eb2aa10036d3f28f5319e848c43ecdcd1f6d828a4eb8d5763260f365b847d6b1a8ee597659cdce5c
22 +DIST pypy-bin-5.4.1-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 12930038 SHA256 fa5f71cc15ac45497f56a249292f168761a8b141b09925c04af0b69f3a0768f1 SHA512 17f660b85f20742e8204d09bc9778a499530d62752395f5457dc875b88bcbf616fbdd0afc3b576cd2df64c12845baa3d9be6deea853eb79f6de76991aa5f823d WHIRLPOOL 7ee55458e3ef2f302c38e34813085087fa891eaacdf403d519e4e06a08f731243852fb0ce77d633b36ebd174405caa4aa43be08db9a062617d24082f72a644c4
23 +DIST pypy-bin-5.4.1-amd64+bzip2+jit+ncurses.tar.lz 13999293 SHA256 f748126ba33f8da187ee355bf021d9eaa78353a5193325eb2575cb46c1364160 SHA512 ed8696bd1eefaa172573e594c6dc979bfce552060833e290f23ddd8643440d37b61a16b327e50d19d37239d76e768ce636ff02c92ff1bcf6082308a3870a6942 WHIRLPOOL 2e1e059db3c5b23afd476e2750023c4fed8c08bdac1be78945d9cbd34c1021c454a43eb647b2d58539fdb1f9543af67ca28327ccee800e60ffb9a7f463145529
24 +DIST pypy-bin-5.4.1-amd64+bzip2+ncurses.tar.lz 7232119 SHA256 f5055b0c1abf01e565facf9af60d83b1a8707e7319a1aa62c14f9305b027e10e SHA512 ce47d49b1571d194fb3e95128c5609bae73207fbc19b55ef8363fd03121b513fab53189a85989cc1db2885266d68dc947747a382e5eb621b91f9800b897a45ae WHIRLPOOL db503cd2c8926664affc6642678b95fb6e88ef42f3976034b5307527602e4e37638510696199de679a1e5f6524a69ab3802db6e08dfb6cd22893b86ec5e94cfa
25 +DIST pypy-bin-5.4.1-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 10330232 SHA256 1acc2abb2111beb07d5f399937239a0cfeb7473f5607e9889595694bdb4e73da SHA512 b4cdf35f54c1576d3cfbd6d163e1837056485c0f8cc03029f2b19c6615027a57f637c1475aa4def277b8c854e748e32502934d0bb5d51dfaa532b08c205621ca WHIRLPOOL ca1cbdda253129318572f2f529a77e677ba0415bedfb1b72a75d6dcf9a2dc1add8c53f007e883e7c1d9f53c69eee2e4439c71c6fa01f994e0858e5072b012d2a
26 +DIST pypy-bin-5.4.1-x86+bzip2+jit+ncurses+sse2.tar.lz 11536334 SHA256 223761be8d0cd0f3526d7017fe64775ee11f81195ad82b6bf011f797446ca6ec SHA512 a6bd47102f9df01f346b3e4967d40ad67cc35328f55090480f0a17bd8bb3b962ce5046cc8f1ae6d4e7993394fc3d6df1af5eb55ca0a64a31929eb7c1eeec2a19 WHIRLPOOL 311c92e7c4d023bfe87ec42a52bdccc0c8e4d170348823c4d9a80dc217e0f2142f9b32c2a062b287902ab222cb15131e204cae4c27cbaacce9f84dbbf010ddaf
27 +DIST pypy-bin-5.4.1-x86+bzip2+ncurses+sse2.tar.lz 6018620 SHA256 de0fb7367902e46382a3c499f1d002821196cf6a7535bcc54cb99c51e03a1198 SHA512 774d0dacbb46abd0a83b04bebf2e9023dd856c26cf9cfc7b4ed7b5176aafd063c86c2a2a48badbe83461070dc1b73a4512b2fd884066c38adb7c56be3c6d134c WHIRLPOOL d88c471652d2335ca3d3d9156ac37ce909ba780a1b5b562f659eeaf0d5703cd0fea449dc5a5d8d2bf79b3ea86aea2e4d906eaaace364c6a3cce17e96ac109126
28 +DIST pypy-bin-5.4.1-x86+bzip2+ncurses.tar.lz 5980446 SHA256 40a79483b4535e432e0be0c4f7e806b9ba40a7dd0f97de60a29c720d26ddea12 SHA512 34981ca6407601aa7538616ac2d4f10bebf126c7d80bbbda894c1f452b79485325c8fb4cdff23cd254294bee9d35019764b7f1362f23ff3d35bfe42a97318378 WHIRLPOOL cf97294073cba5e4afd8c7aa4a21199cb012570cf1ee062f258f1805b99b48c7181a39bf83f473186718b5463921e97f819e2d4d5003ca2588f5879e779cb385
29 DIST pypy2-v5.3.0-src.tar.bz2 17361429 SHA256 4142eb8f403810bc88a4911792bb5a502e152df95806e33e69050c828cd160d5 SHA512 6387987b93bebf8ca6d820bde6c42c1a7427a778ff01cf93766df34be792cb1a8d927b3e402f90159df75f68aa1c913a28e9d453e3b13b28489cb68670ef121d WHIRLPOOL 57b9718b1ed72f13005a6d5a60b24d0fdab522ff63b3f91264433cf17f0bb4c5f36e3121d8d92744386fa5d31fbce14711689c85f87a53b68bfdbddaa19a3edd
30 DIST pypy2-v5.3.1-src.tar.bz2 17361760 SHA256 31a52bab584abf3a0f0defd1bf9a29131dab08df43885e7eeddfc7dc9b71836e SHA512 3138dde3cb1a155e389a2be615601e22f468d2bc77dd219a35b310052fa06f68f80c3ff62fa4d0a9179eae014ace18620d0a076a0528cb155b1c33cc94d6b397 WHIRLPOOL 518b73ec649673fb1fc333b5d0e7669f06e9569624e2f8b55dbbf24b5f109a3b9680ed1d45c6401eb62ee8761043ec9c38a33e6d396c39c3f2fb5ba30f15e93a
31 DIST pypy2-v5.4.0-src.tar.bz2 17414795 SHA256 d9568ebe9a14d0eaefde887d78f3cba63d665e95c0d234bb583932341f55a655 SHA512 a989393f75ff45d6a8b8b2597c0a208559b3188ffdf65205ad491332f1836a86bbb419a3dfba67f80e5ab8d075aa97f44c63316f805a51d7ce1481e81b461373 WHIRLPOOL 623bbaed02214cbc2092abd163e102c11405f12b73dd2ace8098e08a415bd43a0bf13809913b56c378a8a688ff6ff561dc9a90bcd479de85bb301aa67c670d26
32 +DIST pypy2-v5.4.1-src.tar.bz2 17412285 SHA256 45dbc50c81498f6f1067201b8fc887074b43b84ee32cc47f15e7db17571e9352 SHA512 a366457f5d1fc06dfb256256350b5f2e8e107fe9bc587acc291500ae8b03083788128681ebd5ae272a87b5b7c95abda0210ed7b5594e15f8f0a96a9ff4953375 WHIRLPOOL 1b84ed9a5df88f4ec7beebf75f86d02ddab2349e34c5516bf4ea21e0374dbb5520ca0c6c429b83262c63e6bc452a3270a4d79fec6b2caff7bc884d8103989acc
33 DIST python-gentoo-patches-2.7.10-0.tar.xz 12892 SHA256 c9a838bd62ae50cc385da23a837acfd05f2b74e4f086c9c76eb4d3aa5366ef6d SHA512 5f100944635e360691dc0a2b340a906646c4ae9ee558246ddffc56e8b15d389f25f1fbdc1db4cc08e7d29560d04d66b058b3904902899d58ecae8c408ebdf056 WHIRLPOOL f69e9a518bb7ee50c1b262a21e70e1e2443f859ee6d2f4fa84421120dbd054a06ce8dd6cfea8512cbc64bce806322b879c25c561d5eb05e1ba6cc15035b373a9
34 DIST python-gentoo-patches-2.7.11-0.tar.xz 12916 SHA256 e14b47bb1fd64d366d7dfb8339cc2cbf4a53fc288b11dd83f575eb36a8a6408d SHA512 f0447bb699a163afc08df39b111394377539935546ae23732d7239e78d2bff0c04bc94949f86aef0c1be83736127dbd25c2c531e49befed2d638c3cd4940ac52 WHIRLPOOL 305992849d9d244da1e308e739c9bf62a3ef5c74eb65c765bdc666fb5767eb16c7a609f7c442c17da17f76c3ab81e4b09fa8c21e43f89366539a6a9d656bea77
35
36 diff --git a/dev-python/pypy-bin/pypy-bin-5.4.1.ebuild b/dev-python/pypy-bin/pypy-bin-5.4.1.ebuild
37 new file mode 100644
38 index 00000000..1d51a84
39 --- /dev/null
40 +++ b/dev-python/pypy-bin/pypy-bin-5.4.1.ebuild
41 @@ -0,0 +1,205 @@
42 +# Copyright 1999-2016 Gentoo Foundation
43 +# Distributed under the terms of the GNU General Public License v2
44 +# $Id$
45 +
46 +EAPI=5
47 +
48 +PYTHON_COMPAT=( python2_7 pypy )
49 +inherit eutils multilib pax-utils python-any-r1 unpacker versionator
50 +
51 +BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
52 +CPY_PATCHSET_VERSION="2.7.11-0"
53 +MY_P=pypy2-v${PV}
54 +
55 +DESCRIPTION="Pre-built version of PyPy"
56 +HOMEPAGE="http://pypy.org/"
57 +SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
58 + https://dev.gentoo.org/~djc/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz
59 + amd64? (
60 + jit? ( shadowstack? (
61 + ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.lz
62 + ) )
63 + jit? ( !shadowstack? (
64 + ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz
65 + ) )
66 + !jit? ( !shadowstack? (
67 + ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz
68 + ) )
69 + )
70 + x86? (
71 + cpu_flags_x86_sse2? (
72 + jit? ( shadowstack? (
73 + ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz
74 + ) )
75 + jit? ( !shadowstack? (
76 + ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz
77 + ) )
78 + !jit? ( !shadowstack? (
79 + ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz
80 + ) )
81 + )
82 + !cpu_flags_x86_sse2? (
83 + !jit? ( !shadowstack? (
84 + ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz
85 + ) )
86 + )
87 + )"
88 +
89 +# Supported variants
90 +REQUIRED_USE="!jit? ( !shadowstack )
91 + x86? ( !cpu_flags_x86_sse2? ( !jit !shadowstack ) )"
92 +
93 +LICENSE="MIT"
94 +# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
95 +SLOT="0/41"
96 +KEYWORDS="~amd64 ~x86"
97 +IUSE="doc gdbm +jit +shadowstack sqlite cpu_flags_x86_sse2 test tk"
98 +
99 +# yep, world would be easier if people started filling subslots...
100 +RDEPEND="
101 + app-arch/bzip2:0=
102 + dev-libs/expat:0=
103 + dev-libs/libffi:0=
104 + dev-libs/openssl:0=[-bindist]
105 + sys-libs/glibc:2.2=
106 + sys-libs/ncurses:0/6
107 + sys-libs/zlib:0=
108 + gdbm? ( sys-libs/gdbm:0= )
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 + doc? ( ${PYTHON_DEPS}
119 + dev-python/sphinx )"
120 +
121 +S=${WORKDIR}/${MY_P}-src
122 +
123 +QA_PREBUILT="
124 + usr/lib*/pypy/pypy-c
125 + usr/lib*/pypy/libpypy-c.so"
126 +
127 +pkg_setup() {
128 + if [[ ${MERGE_TYPE} != binary ]]; then
129 + use doc && python-any-r1_pkg_setup
130 + fi
131 +}
132 +
133 +src_prepare() {
134 + epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
135 + "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
136 +
137 + sed -e "s^@EPREFIX@^${EPREFIX}^" \
138 + -e "s^@libdir@^$(get_libdir)^" \
139 + -i lib-python/2.7/distutils/command/install.py || die
140 +
141 + # apply CPython stdlib patches
142 + pushd lib-python/2.7 > /dev/null || die
143 + epatch "${FILESDIR}"/2.5.0_all_distutils_cxx.patch \
144 + "${WORKDIR}"/patches/22_all_turkish_locale.patch \
145 + "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch
146 + popd > /dev/null || die
147 +
148 + epatch_user
149 +}
150 +
151 +src_compile() {
152 + # Tadaam! PyPy compiled!
153 + mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
154 + mv "${WORKDIR}"/${P}*/include/*.h include/ || die
155 + # (not installed by pypy)
156 + rm pypy/module/cpyext/include/_numpypy/numpy/README || die
157 + mv pypy/module/cpyext/include/* include/ || die
158 +
159 + use doc && emake -C pypy/doc/ html
160 + #needed even without jit :( also needed in both compile and install phases
161 + pax-mark m pypy-c libpypy-c.so
162 +}
163 +
164 +src_test() {
165 + # (unset)
166 + local -x PYTHONDONTWRITEBYTECODE
167 +
168 + ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
169 +}
170 +
171 +src_install() {
172 + local dest=/usr/$(get_libdir)/pypy
173 + einfo "Installing PyPy ..."
174 + insinto "${dest}"
175 + doins -r include lib_pypy lib-python pypy-c libpypy-c.so
176 + fperms a+x ${dest}/pypy-c ${dest}/libpypy-c.so
177 + pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
178 + dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy
179 + dodoc README.rst
180 +
181 + if ! use gdbm; then
182 + rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
183 + "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
184 + fi
185 + if ! use sqlite; then
186 + rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \
187 + "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
188 + "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
189 + fi
190 + if ! use tk; then
191 + rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
192 + "${ED%/}${dest}"/lib_pypy/_tkinter \
193 + "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
194 + fi
195 +
196 + # Install docs
197 + use doc && dohtml -r pypy/doc/_build/html/
198 +
199 + einfo "Generating caches and byte-compiling ..."
200 +
201 + local -x PYTHON=${ED%/}${dest}/pypy-c
202 + local -x LD_LIBRARY_PATH="${ED%/}${dest}"
203 + # we can't use eclass function since PyPy is dumb and always gives
204 + # paths relative to the interpreter
205 + local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages
206 + python_export pypy EPYTHON
207 +
208 + echo "EPYTHON='${EPYTHON}'" > epython.py || die
209 + python_domodule epython.py
210 +
211 + # Generate Grammar and PatternGrammar pickles.
212 + "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
213 + || die "Generation of Grammar and PatternGrammar pickles failed"
214 +
215 + # Generate cffi modules
216 + # Please keep in sync with pypy/tool/build_cffi_imports.py!
217 +#cffi_build_scripts = {
218 +# "sqlite3": "_sqlite3_build.py",
219 +# "audioop": "_audioop_build.py",
220 +# "tk": "_tkinter/tklib_build.py",
221 +# "curses": "_curses_build.py" if sys.platform != "win32" else None,
222 +# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
223 +# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
224 +# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
225 +# "resource": "_resource_build.py" if sys.platform != "win32" else None,
226 + cffi_targets=( audioop curses syslog pwdgrp resource )
227 + use gdbm && cffi_targets+=( gdbm )
228 + use sqlite && cffi_targets+=( sqlite3 )
229 + use tk && cffi_targets+=( tkinter/tklib )
230 +
231 + local t
232 + # all modules except tkinter output to .
233 + # tkinter outputs to the correct dir ...
234 + cd "${ED%/}${dest}"/lib_pypy || die
235 + for t in "${cffi_targets[@]}"; do
236 + # tkinter doesn't work via -m
237 + "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
238 + done
239 +
240 + # Cleanup temporary objects
241 + find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die
242 + find "${ED%/}${dest}" -type d -empty -delete || die
243 +
244 + # compile the installed modules
245 + python_optimize "${ED%/}${dest}"
246 +}