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/, dev-python/pypy3-bin/files/
Date: Thu, 03 Mar 2016 10:48:03
Message-Id: 1457002057.aa651b62c76002f94eb5b6c6bf03b7124bc3e97e.mgorny@gentoo
1 commit: aa651b62c76002f94eb5b6c6bf03b7124bc3e97e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 3 09:56:59 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 3 10:47:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa651b62
7
8 dev-python/pypy3-bin: Drop old
9
10 dev-python/pypy3-bin/Manifest | 7 -
11 .../pypy3-bin/files/1.9-scripts-location.patch | 11 --
12 dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild | 176 --------------------
13 dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild | 177 ---------------------
14 4 files changed, 371 deletions(-)
15
16 diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
17 index 52de5f0..6485ca5 100644
18 --- a/dev-python/pypy3-bin/Manifest
19 +++ b/dev-python/pypy3-bin/Manifest
20 @@ -1,7 +1,4 @@
21 DIST pypy3-2.4.0-src.tar.bz2 14693194 SHA256 d9ba207d6eecf8a0dc4414e9f4e92db1abd143e8cc6ec4a6bdcac75b29f104f3 SHA512 7e2b0c21f1833b8cd61251c2d58c6a9f99207e5d582618f0036886ff28dcb313541dce1c36bd1b57b332a36a94b13e416bb7b67110be7c8ece8283749ba712be WHIRLPOOL bd02009c828b7b491b46b260d687d268561e5372766adccbcb58e87a3f1c545f293c54e5cdd6e6b7fb95feb678677137211ee890f106140ce1bc256f8563d2cd
22 -DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses+shadowstack.tar.xz 9687272 SHA256 8f03fc87ec796877e5a13111f509a5d1c06284bc31133d25c4c9cca6a82f7039 SHA512 ec5e3ef4f2f4b06c31df5ab9fc4a9f7a2a08f744a0128e6ab8215767d4fba7a3e35e319ff9d9a0de4d018ed35eed24809c82928972a860a220ea45f284087770 WHIRLPOOL 15ba1d18ae4fc5d0968fa5c6cadfcb8762b258d683c770530ac35067ca91210f8d825facd775602a9d2b578542a4b760a0a11a9b0a6d59f539d4e7043fcad734
23 -DIST pypy3-bin-2.4.0-amd64+bzip2+jit+ncurses.tar.xz 11047984 SHA256 558176dacd1e3222fb56b8c3226077288281ee2a131149fdbb2a54561d5bc7d9 SHA512 cde76c37bf9c043a4fde4a2d07a04366f3c906562e6ed640544ac0228b511729b481c6cd6b7b25b80c02a69cdd02707d427edcd8e46e41313b31161313c6c5fb WHIRLPOOL 9eb8dc5d3319bf2c09baae38ecaa23c1f7ee38b4ea20f72a9fde3f68004ac4f3cbe807ff93e6cba5318745a251d09d2f951cb5a86f04c41b2e05d151d1f6cd03
24 -DIST pypy3-bin-2.4.0-amd64+bzip2+ncurses.tar.xz 6281232 SHA256 326115bcd7ad2d659b69842182dee4fc2adb558f20a3e44ab4b803fa70c43a21 SHA512 f938aa797e352f80a99095a15bf83a758f0c203adc402cf92494f909ad870457a28ae14b5959880e55898c2ce92ce0b08b05e3d691133758bca52f524c8aad73 WHIRLPOOL b0aa4c24d645aa914aa439646b813dfcae14e6731af86d4348d24637bbdb7f88a26d3a63ff5262749ee654715eaf5312beb4879341d222aaedfcd3e81acd2426
25 DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+jit+ncurses+shadowstack.tar.lz 9320887 SHA256 98a2a6f1ba738e8e39b272e757cfa4b90684be05b58f28e9d7766d2e3238bed2 SHA512 b9569c7d9f607ec89dfc2adadea86d485e99c2cc8a9bd2751fbf450b331a706acd8cab9b67730162f67a74ccb682ec23769556cfb3b028265a7e5b06e920bd07 WHIRLPOOL 450be6f24c7bd58fc801bb95ca08f1d5874c2df0a5e75e062847b25f7a11e1ed81dfbb1b38e9607882593f96a2d3171c7f59cb63fd039c3ebf542bee7a53d09d
26 DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+jit+ncurses.tar.lz 10751255 SHA256 aca3afd551ab073d91c9d3d6e7bfffdbee2ccab0672d461b9abc0d3087d6ccab SHA512 85032e9418f03319dbf827fd68870d8c5d8f368f5b416ff9a96af48a1b3bcfd651a66c0d1c3372bf522c1d7433734d1d167e8fb037ca998f55c1ad4c13ed5a5d WHIRLPOOL 0eb02a3c4e7d6d5fbbdf239a68c067f87449a07a8a63a3a03858ada73fcf13a09a1b3f9f8402a173fd17baee4565de9f2b68038471527b8f43f14c4251af6432
27 DIST pypy3-bin-2.4.0-nossl2-amd64+bzip2+ncurses.tar.lz 6188358 SHA256 2ee5d99218a02bac26a77327db3bcf754f36ed40ef0593567895ee2ad128bc04 SHA512 a07b3c3cdf16592af9ea76d8f70c053f6e75f3b92e10d019921dd8024161b8953477c3da7a5d82912f1f10f0ab4581e299215e7a5f50ee0ff923648e7a18d8cc WHIRLPOOL 75da4de6977382729d21881d7d66895871ad3e5f53a108bfad3c97d9f6db6dec6754f353e600436853d4d06586b350d4e47ccfa7ca25364c54b276fd629e5d5b
28 @@ -9,7 +6,3 @@ DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.lz 824613
29 DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+jit+ncurses+sse2.tar.lz 9073643 SHA256 436128604cc9649228992206abcfef84ff14994984b3da91b2d4ee1ab654274c SHA512 0cffa75008f174d0703d07e86ed1036a27efe7707b14e2a5c6bfe92bd703ad0ce7223a0b590aeffe1e7dd11756d385ac9e2eba9a7d49d6d970377aef8aa2d8bb WHIRLPOOL 579625d8e36bd22ca04a2468592f784269bd514799725a5fe0f5ce47e09477dada96a95c2296e46a8f4d03fc82aff6100c7a89c4e71993b033a31516ffc0b2a4
30 DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+ncurses+sse2.tar.lz 5549183 SHA256 ecb7dae543219b4bc1d75114a0a5316d870a4a92ae439b9679ae8436903fcc77 SHA512 06040c2f843ce77573616f9fc5a9773ffb67957860d33ca26538a39ba68aa56eea98bc0af0e99e6319f50ee42ff894a9f4944b7924348f20ce90078f0615a707 WHIRLPOOL ebf165deb7b65cbfef081841037206a74658906e49b52225c1966874f3f8ad39f19157c801653e2797a03b9fd0287a5c4e7ffb7d53d951fb5686eaba9c533b29
31 DIST pypy3-bin-2.4.0-nossl2-x86+bzip2+ncurses.tar.lz 5503668 SHA256 7cc045e8ec9e7d4c01eb0dd9e83296bbf38483bcd0a5af0298ef53b9dc0bc63d SHA512 fa398b43a479c71bcd708e30055716dbe0c8f6421ed632a3ed8b3fa1cf30310e5325106b2c5d2be70b3a7e3bc706e70b599ffa34497ef6a0aeb78df534397f79 WHIRLPOOL c13aee013422d552cbf34fa41326f7edfb1a3817801a3ac72ff472b92460528876505b88e6bd95866dbf731d707d1ba789f22ae76d3a004cded36772afab2436
32 -DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz 8159232 SHA256 65bb567693048894d13c7ffecda126a222ebb641dc6c6e0a899197da8f0844d8 SHA512 734e42d6962b4411d9beab55013454dd27bd18c342ed334e07f85e217cd7d992cbaffb36ee3e74469662860f130d1065a381e49a6b8287fa83736ffe75cb8a5a WHIRLPOOL a5b7ed4a177dc5c1322e79551166d3be8e478e969b223db4fe6a2e9fddaf2e4c22633726a667e3deca19763f44edd4e3f4c20c477da5d7e26c88f21d4ce70544
33 -DIST pypy3-bin-2.4.0-x86+bzip2+jit+ncurses+sse2.tar.xz 9121216 SHA256 5f03284815a313065b99da0154a08831e3ae2c6e43c4ce515de1aff60c4537ad SHA512 f069ece90666385eb8aade97ad81c4c6c2480dee1bf3b1cb520c4fc1d123d17f7ef2cbf7ed25b72b24e56165c08ded671c8bce74ed2ea2f1b6e57ca9fdd214ae WHIRLPOOL 8cf368e0efa416d3cba06ea61bc97ed7ead0e25f5008c948d1bec8d0494fd9908d1e6640414ffe7c6b6260badef41da114370f2a5ef28a63234203a604e1be4e
34 -DIST pypy3-bin-2.4.0-x86+bzip2+ncurses+sse2.tar.xz 5366816 SHA256 bff57d563dbce1b4858d87161c2338e5ed6ed20008a8dc4fb78cbb9e320d1188 SHA512 afb395257b0259b096a9fdbae405ffb021950dfda39ddc490777662ab77d0573b5b51e6381241c09debbca0a706637dba39c8644c878e541b83d68a94fc9ad1e WHIRLPOOL a1e1079a68b03b65a0680c65080d6c6dc48e4a652dd634bfaa805a6117c67da84bcc65ee2fe6711a61ab86a905bd2a6993e0ac88547a807eca3722f70ca890fb
35 -DIST pypy3-bin-2.4.0-x86+bzip2+ncurses.tar.xz 5439032 SHA256 3bd4e476ff76da1f3c111a11abe0ef72683ba719934ede1252c32de6200beb25 SHA512 d11805b704baa51097261f0886bd160f9d1a3e220ceeeaa5741c3aaf9ee8437479b2f371889dbe2ad72f16559de86c1e71bfd17f45375071cafc535d7c30b3cc WHIRLPOOL 41ef35df997da9aca90be8442001b6807c1a8dd0a7d4e66c0c925dc74546db35e6d54a2bf292c8bca732427786019e7e5041d19e6169e2573a058f269a0332ce
36
37 diff --git a/dev-python/pypy3-bin/files/1.9-scripts-location.patch b/dev-python/pypy3-bin/files/1.9-scripts-location.patch
38 deleted file mode 100644
39 index 6ed1285..0000000
40 --- a/dev-python/pypy3-bin/files/1.9-scripts-location.patch
41 +++ /dev/null
42 @@ -1,11 +0,0 @@
43 ---- a/lib-python/3/distutils/command/install.py
44 -+++ b/lib-python/3/distutils/command/install.py
45 -@@ -87,7 +87,7 @@
46 - 'purelib': '$base/site-packages',
47 - 'platlib': '$base/site-packages',
48 - 'headers': '$base/include',
49 -- 'scripts': '$base/bin',
50 -+ 'scripts': '/usr/bin',
51 - 'data' : '$base',
52 - },
53 - }
54
55 diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild
56 deleted file mode 100644
57 index 21b40bb..0000000
58 --- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r1.ebuild
59 +++ /dev/null
60 @@ -1,176 +0,0 @@
61 -# Copyright 1999-2015 Gentoo Foundation
62 -# Distributed under the terms of the GNU General Public License v2
63 -# $Id$
64 -
65 -EAPI=5
66 -
67 -# some random parts need python 2...
68 -PYTHON_COMPAT=( python2_7 pypy )
69 -inherit eutils multilib pax-utils python-any-r1 versionator
70 -
71 -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
72 -
73 -DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)"
74 -HOMEPAGE="http://pypy.org/"
75 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2
76 - amd64? (
77 - jit? ( shadowstack? (
78 - ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
79 - ) )
80 - jit? ( !shadowstack? (
81 - ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
82 - ) )
83 - !jit? ( !shadowstack? (
84 - ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
85 - ) )
86 - )
87 - x86? (
88 - cpu_flags_x86_sse2? (
89 - jit? ( shadowstack? (
90 - ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
91 - ) )
92 - jit? ( !shadowstack? (
93 - ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
94 - ) )
95 - !jit? ( !shadowstack? (
96 - ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
97 - ) )
98 - )
99 - !cpu_flags_x86_sse2? (
100 - !jit? ( !shadowstack? (
101 - ${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
102 - ) )
103 - )
104 - )"
105 -
106 -# Supported variants
107 -REQUIRED_USE="!jit? ( !shadowstack )
108 - x86? ( !cpu_flags_x86_sse2? ( !jit !shadowstack ) )"
109 -
110 -LICENSE="MIT"
111 -SLOT="0/$(get_version_component_range 1-2 ${PV})"
112 -KEYWORDS="~amd64 ~x86"
113 -IUSE="gdbm +jit +shadowstack sqlite cpu_flags_x86_sse2 test tk"
114 -
115 -# yep, world would be easier if people started filling subslots...
116 -RDEPEND="
117 - app-arch/bzip2:0
118 - dev-libs/expat:0
119 - dev-libs/libffi:0
120 - dev-libs/openssl:0
121 - sys-libs/glibc:2.2
122 - =sys-libs/ncurses-5*:0
123 - sys-libs/zlib:0
124 - gdbm? ( sys-libs/gdbm:0= )
125 - sqlite? ( dev-db/sqlite:3= )
126 - tk? (
127 - dev-lang/tk:0=
128 - dev-tcltk/tix:0=
129 - )
130 - !dev-python/pypy3:0"
131 -DEPEND="app-arch/xz-utils
132 - test? ( ${RDEPEND}
133 - ${PYTHON_DEPS} )"
134 -# doc? ( ${PYTHON_DEPS}
135 -# dev-python/sphinx )
136 -PDEPEND="app-admin/python-updater"
137 -
138 -S=${WORKDIR}/pypy3-${PV}-src
139 -
140 -src_prepare() {
141 - epatch "${FILESDIR}/1.9-scripts-location.patch" \
142 - "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
143 -
144 - epatch_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 - mv pypy/module/cpyext/include/*.h include/ || die
152 - mv pypy/module/cpyext/include/numpy include/ || die
153 -
154 - #use doc && emake -C pypy/doc/ html
155 - #needed even without jit :( also needed in both compile and install phases
156 - pax-mark m pypy-c
157 -
158 - # ctypes config cache
159 - # this one we need to do with python2 too...
160 - "${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \
161 - || die "Failed to rebuild ctypes config cache"
162 -}
163 -
164 -src_test() {
165 - # (unset)
166 - local -x PYTHONDONTWRITEBYTECODE
167 -
168 - # Test runner requires Python 2 too. However, it spawns PyPy3
169 - # internally so that we end up testing the correct interpreter.
170 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die
171 -}
172 -
173 -src_install() {
174 - einfo "Installing PyPy ..."
175 - insinto "/usr/$(get_libdir)/pypy3"
176 - doins -r include lib_pypy lib-python pypy-c libpypy-c.so
177 - fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
178 - pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
179 - dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
180 - dodoc README.rst
181 -
182 - if ! use gdbm; then
183 - rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
184 - "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
185 - fi
186 - if ! use sqlite; then
187 - rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
188 - "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
189 - "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
190 - fi
191 - if ! use tk; then
192 - rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
193 - "${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
194 - "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
195 - fi
196 -
197 - # Install docs
198 - #use doc && dohtml -r pypy/doc/_build/html/
199 -
200 - einfo "Generating caches and byte-compiling ..."
201 -
202 - local -x PYTHON=${ED%/}${INSDESTTREE}/pypy-c
203 - local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
204 - # we can't use eclass function since PyPy is dumb and always gives
205 - # paths relative to the interpreter
206 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
207 - python_export pypy3 EPYTHON
208 -
209 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
210 - python_domodule epython.py
211 -
212 - # Generate Grammar and PatternGrammar pickles.
213 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
214 - || die "Generation of Grammar and PatternGrammar pickles failed"
215 -
216 - # Generate cffi cache
217 - # Please keep in sync with pypy/tool/release/package.py!
218 - "${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)"
219 - "${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)"
220 - if use gdbm; then
221 - "${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)"
222 - fi
223 - if use sqlite; then
224 - "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)"
225 - fi
226 - if use tk; then
227 - "${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)"
228 - fi
229 -
230 - # Cleanup temporary objects
231 - find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
232 - find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
233 -
234 - # compile the installed modules
235 - python_optimize "${ED%/}${INSDESTTREE}"
236 -}
237
238 diff --git a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild b/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
239 deleted file mode 100644
240 index fd93b92..0000000
241 --- a/dev-python/pypy3-bin/pypy3-bin-2.4.0-r2.ebuild
242 +++ /dev/null
243 @@ -1,177 +0,0 @@
244 -# Copyright 1999-2015 Gentoo Foundation
245 -# Distributed under the terms of the GNU General Public License v2
246 -# $Id$
247 -
248 -EAPI=5
249 -
250 -# some random parts need python 2...
251 -PYTHON_COMPAT=( python2_7 pypy )
252 -inherit eutils multilib pax-utils python-any-r1 versionator
253 -
254 -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy-bin/${PV}"
255 -
256 -DESCRIPTION="A fast, compliant alternative implementation of Python 3 (binary package)"
257 -HOMEPAGE="http://pypy.org/"
258 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3-${PV}-src.tar.bz2
259 - amd64? (
260 - jit? ( shadowstack? (
261 - ${BINHOST}/${P}-amd64+bzip2+jit+ncurses+shadowstack.tar.xz
262 - ) )
263 - jit? ( !shadowstack? (
264 - ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.xz
265 - ) )
266 - !jit? ( !shadowstack? (
267 - ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.xz
268 - ) )
269 - )
270 - x86? (
271 - cpu_flags_x86_sse2? (
272 - jit? ( shadowstack? (
273 - ${BINHOST}/${P}-x86+bzip2+jit+ncurses+shadowstack+sse2.tar.xz
274 - ) )
275 - jit? ( !shadowstack? (
276 - ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.xz
277 - ) )
278 - !jit? ( !shadowstack? (
279 - ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.xz
280 - ) )
281 - )
282 - !cpu_flags_x86_sse2? (
283 - !jit? ( !shadowstack? (
284 - ${BINHOST}/${P}-x86+bzip2+ncurses.tar.xz
285 - ) )
286 - )
287 - )"
288 -
289 -# Supported variants
290 -REQUIRED_USE="!jit? ( !shadowstack )
291 - x86? ( !cpu_flags_x86_sse2? ( !jit !shadowstack ) )"
292 -
293 -LICENSE="MIT"
294 -SLOT="0/$(get_version_component_range 1-2 ${PV})"
295 -KEYWORDS="~amd64 ~x86"
296 -IUSE="gdbm +jit +shadowstack sqlite cpu_flags_x86_sse2 test tk"
297 -
298 -# yep, world would be easier if people started filling subslots...
299 -RDEPEND="
300 - app-arch/bzip2:0
301 - dev-libs/expat:0
302 - dev-libs/libffi:0
303 - dev-libs/openssl:0
304 - sys-libs/glibc:2.2
305 - sys-libs/ncurses:0/6
306 - sys-libs/zlib:0
307 - gdbm? ( sys-libs/gdbm:0= )
308 - sqlite? ( dev-db/sqlite:3= )
309 - tk? (
310 - dev-lang/tk:0=
311 - dev-tcltk/tix:0=
312 - )
313 - !dev-python/pypy3:0"
314 -DEPEND="app-arch/xz-utils
315 - test? ( ${RDEPEND}
316 - ${PYTHON_DEPS} )"
317 -# doc? ( ${PYTHON_DEPS}
318 -# dev-python/sphinx )
319 -PDEPEND="app-admin/python-updater"
320 -
321 -S=${WORKDIR}/pypy3-${PV}-src
322 -
323 -src_prepare() {
324 - epatch "${FILESDIR}/4.0.0-gentoo-path.patch" \
325 - "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \
326 - "${FILESDIR}/2.4.0-ncurses6.patch"
327 -
328 - epatch_user
329 -}
330 -
331 -src_compile() {
332 - # Tadaam! PyPy compiled!
333 - mv "${WORKDIR}"/${P}*/{libpypy-c.so,pypy-c} . || die
334 - mv "${WORKDIR}"/${P}*/include/*.h include/ || die
335 - mv pypy/module/cpyext/include/*.h include/ || die
336 - mv pypy/module/cpyext/include/numpy include/ || die
337 -
338 - #use doc && emake -C pypy/doc/ html
339 - #needed even without jit :( also needed in both compile and install phases
340 - pax-mark m pypy-c
341 -
342 - # ctypes config cache
343 - # this one we need to do with python2 too...
344 - "${PYTHON}" lib_pypy/ctypes_config_cache/rebuild.py \
345 - || die "Failed to rebuild ctypes config cache"
346 -}
347 -
348 -src_test() {
349 - # (unset)
350 - local -x PYTHONDONTWRITEBYTECODE
351 -
352 - # Test runner requires Python 2 too. However, it spawns PyPy3
353 - # internally so that we end up testing the correct interpreter.
354 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die
355 -}
356 -
357 -src_install() {
358 - einfo "Installing PyPy ..."
359 - insinto "/usr/$(get_libdir)/pypy3"
360 - doins -r include lib_pypy lib-python pypy-c libpypy-c.so
361 - fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so
362 - pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so"
363 - dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3
364 - dodoc README.rst
365 -
366 - if ! use gdbm; then
367 - rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \
368 - "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die
369 - fi
370 - if ! use sqlite; then
371 - rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \
372 - "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \
373 - "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die
374 - fi
375 - if ! use tk; then
376 - rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \
377 - "${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \
378 - "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
379 - fi
380 -
381 - # Install docs
382 - #use doc && dohtml -r pypy/doc/_build/html/
383 -
384 - einfo "Generating caches and byte-compiling ..."
385 -
386 - local -x PYTHON=${ED%/}${INSDESTTREE}/pypy-c
387 - local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}"
388 - # we can't use eclass function since PyPy is dumb and always gives
389 - # paths relative to the interpreter
390 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
391 - python_export pypy3 EPYTHON
392 -
393 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
394 - python_domodule epython.py
395 -
396 - # Generate Grammar and PatternGrammar pickles.
397 - "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
398 - || die "Generation of Grammar and PatternGrammar pickles failed"
399 -
400 - # Generate cffi cache
401 - # Please keep in sync with pypy/tool/release/package.py!
402 - "${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)"
403 - "${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)"
404 - if use gdbm; then
405 - "${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)"
406 - fi
407 - if use sqlite; then
408 - "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)"
409 - fi
410 - if use tk; then
411 - "${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)"
412 - fi
413 -
414 - # Cleanup temporary objects
415 - find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die
416 - find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die
417 -
418 - # compile the installed modules
419 - python_optimize "${ED%/}${INSDESTTREE}"
420 -}