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: Sun, 29 Apr 2018 06:33:59
Message-Id: 1524983044.1840faee46f9b7cb5323b13cb89ec8d986ef79d4.mgorny@gentoo
1 commit: 1840faee46f9b7cb5323b13cb89ec8d986ef79d4
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 29 06:19:53 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 29 06:24:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1840faee
7
8 dev-python/pypy3-bin: Drop <5.10.1
9
10 dev-python/pypy3-bin/Manifest | 12 --
11 dev-python/pypy3-bin/pypy3-bin-5.10.0.ebuild | 183 -----------------------
12 dev-python/pypy3-bin/pypy3-bin-5.9.0-r3.ebuild | 191 -------------------------
13 3 files changed, 386 deletions(-)
14
15 diff --git a/dev-python/pypy3-bin/Manifest b/dev-python/pypy3-bin/Manifest
16 index bd6e0e0c2ef..78048a44c10 100644
17 --- a/dev-python/pypy3-bin/Manifest
18 +++ b/dev-python/pypy3-bin/Manifest
19 @@ -1,24 +1,12 @@
20 -DIST pypy3-bin-5.10.0-amd64+bzip2+jit+ncurses.tar.lz 10612860 BLAKE2B 57a840754e291240b8c64c583501c2ec881fddec0f97d407a5076dc1630751c8c35ebb369aff3b3bacdafddfefc39d8bb481cd0220691efc8e9dca4ea5fffd80 SHA512 abed6c09ce41c84eba9bc535a25f025417f9debb8235136410161f9b49111ed5d3667d54f42e4913f4cf8718fa08b724c77f944917252c6753ff23b6722ec152
21 -DIST pypy3-bin-5.10.0-amd64+bzip2+ncurses.tar.lz 6651701 BLAKE2B 2971b8c39eb7475e1e574486a273c7ba387d79acf965fdf3125e0457c59fbfbc48a31a76af54c07eed099de64098902951b80ca104c1a0eade92eec0264487d9 SHA512 faa52cff84422dc9280da60c574f7de9a69495ec48c58c7a24ca1ef8acdb096382732fb4145b43c71469de7c6531fc2cf538032205477c8c925d355df962a441
22 -DIST pypy3-bin-5.10.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8213224 BLAKE2B b168e80285afcc7fe6210d061d98337d4b8c5184d0d2a5eb2d2b30a7af391ba91c83aa543a9a9f82af71039a0bc86cbbf1db7017ed8a5d666b570df558d7ae05 SHA512 b5629c7a9a3097bd4a407293e01680ccbd8887a7c42530a08123112ed94291c63cac705491bff4e8b54eb33e4409b893a83adc2c385d04456825ff3d131fbf17
23 -DIST pypy3-bin-5.10.0-x86+bzip2+ncurses+sse2.tar.lz 5356294 BLAKE2B 01d282d28676cc7ebde528620aa4bbfea227b2130df4a2b9e14bb31d24a0063436a9961aa174b393bc9f7ab2615593e667cb773d155b634248da2a1e7ba3e5e7 SHA512 03d11482961a811b96ee75becdbdc97bf55dcf79fbc45b325fc43d86ca947e64b043edaa87fec3b2e5bb0fe777e035ad252a65e7b372cddc62efd2137f6148ff
24 -DIST pypy3-bin-5.10.0-x86+bzip2+ncurses.tar.lz 5334935 BLAKE2B 11be55a106f157fed0570d3fb684e8a7a7b42d061fa841511721adde0d5572d12cba989984b872efa76ed8ed15001a412abef115e65439d80a9497f911d3771e SHA512 b788008566bb409f55ebd1d7204784f322451fa6fd28db2a2adb3929c0dfa3e0490a71c697ca29cdf1251dd58090ad8dc6fa1c597c9cdac77d52fe84b77e3542
25 DIST pypy3-bin-5.10.1-amd64+bzip2+jit+ncurses.tar.lz 10635227 BLAKE2B 242509202f5dcc644043ecf69cc50006462146f443ce833d895661545f3270a70f7ddcd7f352084fd3ca71547b548a4b9102f198bf37fa9ed341b70a7e725a1a SHA512 9cb7a4ba15f9608b7925f5110262de2b8a06f05f8619d268d6aad4e492e942b8ecd3626dcb12b77fd4ab3f2742b4887d247e4126d2d5c4b55b765e92c3c3d159
26 DIST pypy3-bin-5.10.1-amd64+bzip2+ncurses.tar.lz 6648051 BLAKE2B d97d306076e293f9a1c4d2e413bd6d72811a93f7eee17a87622e809cd24994d039a23e8ba720d7d941791f4fbb4f1d47431bd477b76e9aadcade56163483b985 SHA512 9b1e9fe8f06dea1ed008992f7e3f0858a5c65d86cab2d6fe6736a0f4a9c0bb9e42adf609436e9aca4a363c297b4054a376360e1842c68b5d15728b651c1bd884
27 DIST pypy3-bin-5.10.1-x86+bzip2+jit+ncurses+sse2.tar.lz 8244224 BLAKE2B 3ad4a63cab485f151fbd2bd49c55fcc084ff51e50a7ac5fa00ead3e6867794b35f37b7ceb060e85eaecb2a6b2a6fc62dc5a3df832e72cdcb5baa49140e9770e8 SHA512 6f8bb0f575cfe29afcec4d75331ec78516167e6ea345eebdcb7b73c48e9ecf0431433e23b54d2b0fcc16e7e7bc0e6ebfa14b0748a0e4f6b558f6fb20411ca769
28 DIST pypy3-bin-5.10.1-x86+bzip2+ncurses+sse2.tar.lz 5351320 BLAKE2B e45ede827a98f6b1e6c00bc1bbeb2a422b53bb68efe9708235be034fe02e90f97352f04e1ab77dc56030942a407887542cf0308c3e4da41f55dcc0d3d251b0ac SHA512 71ba8ababf0ef380adf538989829e068b4353195f796d6d06c128803757d9e41b2e3fe5e96b7029494beb96f83bb8943158541ada7b4c27e46d0511ca62f6a89
29 DIST pypy3-bin-5.10.1-x86+bzip2+ncurses.tar.lz 5343927 BLAKE2B 27c5842a1f00ff9b56c1417c290ab677bc8e1cff36ce5d226f1e3e262b14c0f0e8a5f3d474e23bcaef467b8210357d0724e752d9249f275c16cc645e59cd1530 SHA512 6f7ff616d6d0532ce4919d5e6cd69a46fd81c548efda2869653ce07d736d83f256f302040726931d85c83a297ab4c7f6e15675a17576fbffa4313a48435e182e
30 -DIST pypy3-bin-5.9.0-amd64+bzip2+jit+ncurses.tar.lz 10510722 BLAKE2B d0f16b1c71686fa477484cb068c0e09f9a40bef83a0fed1721f5f60a5bd11eb39799e97b2da16fbea4f7255ea19d5e8c3f2a2da946eebe10a6d243f207ef2242 SHA512 659ed24c9f540168203098fc9b6086cc22a42767b55f3dbbf132b11cf8e1bc01a66baac78d7689dcc31d9f06e7f2ecfbda9969c9ba150d5af9c462e480aa288c
31 -DIST pypy3-bin-5.9.0-amd64+bzip2+ncurses.tar.lz 6589457 BLAKE2B 6b182a6bc25c7839a9465826f9c161c40d0e551ec74ce4d3ed6ba08ce8c7afcb4a2af73b7a525c76dbe30dbe2cb87ce331568679d0086450ee09bb0aabbe65f3 SHA512 7ad9e5934bc096b5087f8f1654e598dae1c2802b99b83f48b65c8d0b941a570d17c8f4e0f8b3f591600d7cdc471dc45cd903d166ea639e562453bf7ad93144eb
32 -DIST pypy3-bin-5.9.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8595527 BLAKE2B 67e749a5153d5d75c09d27dfa5ed57bac8e886770e5264a2596c4f9e5cdcb7fcae63b709951a8ad862f1bf658deb3cbdf25ac3d0a3af12aef2dfe40942016329 SHA512 6d118cf2e9a657dcf719ca5e508b5b4bb2ab7f85ec3597840706b748ea2f6d582ed884fc34697a3ec36e343de4a40b113d7c8749683a53f2dda299a9e106a2f8
33 -DIST pypy3-bin-5.9.0-x86+bzip2+ncurses+sse2.tar.lz 5654668 BLAKE2B 964c06920e2d5d69ee9d1f2133d2453e096bc871e63ecdd815370187510f9391738432578b5be49771ad8d24fc735882df266655d88924b2776849a61a943694 SHA512 a378159ca39654fbf117e3bd5a0cdcdb23100a21caf837bba5d764b63bf039a791b27d397a6be918a2539d721fc8564f2b10a163df3bae89a4ddb3991ac33ec8
34 -DIST pypy3-bin-5.9.0-x86+bzip2+ncurses.tar.lz 5640443 BLAKE2B 4aa4a8cdfa536aea52cf6b94813e6c70f071ed62bc1bceac0584b2ab1a0b9d5a60e6d219ffe67f09f418246847ccd1f32f280b38c9bd973eca2c30c002a42856 SHA512 663fae9004eb7f002b849d4697ef67fb72df33faddfba7272a6d795432ecca4c110dc1fab43617909f962584c7519582f085854f55829ccc63dc988654b6add5
35 DIST pypy3-bin-6.0.0-amd64+bzip2+jit+ncurses.tar.lz 10674209 BLAKE2B f9e00ba0cdc113ebe156212c5497e122a45bc9544cb242ad02273e06210eb691f930aee7faf1d4ed3a7b14080905a9cb6d30b309c38a2c3795f2183750b4469f SHA512 52e615e2b51a43a2c91f9a2a8f0cec16a6090bfd230ef08dda462bb530da9ee66acec9c449e77f299e0b3363d6bcbc7150b14e7adbe9862d36f4738dfc6be1ca
36 DIST pypy3-bin-6.0.0-amd64+bzip2+ncurses.tar.lz 6703329 BLAKE2B 64ad2b2ae1580833735dc5ce4b821f79458c98c5f761d7c9834624aff172204ac16e23582e3a776baa85accd221a9fd2225c22099de1de9c319b4f29b5f15071 SHA512 57b2e2f0ddc8d6f78beff6c049adb0a8d316db1d9f7bf5e07e4e593fa363e5ced37d212f549c0a5305459207694ac5a6aac9698a1ca3a4bf56a4437899b7e97b
37 DIST pypy3-bin-6.0.0-x86+bzip2+jit+ncurses+sse2.tar.lz 8268406 BLAKE2B 8200d7cfc5bd813cf3138017c96cace1c07bc031f68d5a9df2f71cb887a5dd3bb979dbc67d395389c965904037935a518bf6c1492b04ce5a9f21a9bb3bb5504a SHA512 4c09c454b25faa51024c5319ba5e91f4b1883bdd25f504694f83011ef1faffe7aa28a51369d3c5c6bb9f0d8eb53d1292d57608343b731c67ceeb99f41736b044
38 DIST pypy3-bin-6.0.0-x86+bzip2+ncurses+sse2.tar.lz 5363942 BLAKE2B d53b89ef73c2d4ee2bc00360a0c4a791fd8b6ac2d28dfeeb7510a465e6302f79c378aacebbaf4993b6ee55dbc6d85876149fe3f5a0d689713f029c928d93a729 SHA512 ce72d84200dd275841e691810dbf402423883b282cacbe8bbdae9285936869d40b3d43d053b0f3d4904c7ced72f35480d1780358180a1c98e8111852fef1f77f
39 DIST pypy3-bin-6.0.0-x86+bzip2+ncurses.tar.lz 5366917 BLAKE2B 338a9c221048dabc548250edec05256be64dd5d1aeb5b2fff839d7d5e8dda29e7d4e0a03b1fc0c9cd418685c558bb47598c625e2d28cd4caabc45e21eee9f4f8 SHA512 5274535d01564a9087aea486320921c8784cabcc7bde3634c27b9006988fdc745e6e5e5c2fb8e7b0318fd5ca6fda3fce208743cfa079a7474ea44277237ea873
40 -DIST pypy3-v5.10.0-src.tar.bz2 29075971 BLAKE2B 02fb64d514ab292e09ced57e1c206b04d0fb38353ad6ec0e836448344a6d126d0fccfb61cbd278ea3acaa227032640e82f9ffd7efe3b33ade1ca34a18831b3e4 SHA512 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b
41 DIST pypy3-v5.10.1-src.tar.bz2 29071765 BLAKE2B d5c163697d8dd36a9a61e9a355719628902de0c9a4c038d31cd134d9bb26b8058abfdf85b09715208146295c37e343fae5e1e4a3c8d1999306eeea93791e326c SHA512 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5
42 -DIST pypy3-v5.9.0-src.tar.bz2 29055111 BLAKE2B 181d87ebe4a83a3f03b28d891f248f718ad120ed54621f8054f19a65aebbe90b65c69e40ca656612356b2019aa9ac22d5e242e688a80190b046511a8ceb9c040 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd
43 DIST pypy3-v6.0.0-src.tar.bz2 22648140 BLAKE2B b8678859b0c24494788ddf6f410a3ec1a56a04663452e1aba25d3f41c5073a95866d1623f00cb1a6c9d0256df728fa60d1edb5b58d26c0d88577769cc8a6205d SHA512 ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e
44
45 diff --git a/dev-python/pypy3-bin/pypy3-bin-5.10.0.ebuild b/dev-python/pypy3-bin/pypy3-bin-5.10.0.ebuild
46 deleted file mode 100644
47 index 2457cda763f..00000000000
48 --- a/dev-python/pypy3-bin/pypy3-bin-5.10.0.ebuild
49 +++ /dev/null
50 @@ -1,183 +0,0 @@
51 -# Copyright 1999-2018 Gentoo Foundation
52 -# Distributed under the terms of the GNU General Public License v2
53 -
54 -EAPI=6
55 -
56 -# Test runner needs Python 2.
57 -PYTHON_COMPAT=( python2_7 pypy )
58 -inherit pax-utils python-any-r1 unpacker versionator
59 -
60 -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
61 -MY_P=pypy3-v${PV}
62 -
63 -DESCRIPTION="A fast, compliant alternative implementation of Python 3.3 (binary package)"
64 -HOMEPAGE="http://pypy.org/"
65 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
66 - amd64? (
67 - jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
68 - !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
69 - )
70 - x86? (
71 - cpu_flags_x86_sse2? (
72 - jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
73 - !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
74 - )
75 - !cpu_flags_x86_sse2? (
76 - !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
77 - )
78 - )"
79 -
80 -# Supported variants
81 -REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
82 -
83 -LICENSE="MIT"
84 -# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
85 -SLOT="0/510"
86 -KEYWORDS="~amd64 ~x86"
87 -IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
88 -
89 -RDEPEND="
90 - app-arch/bzip2:0/1
91 - dev-libs/expat:0/0
92 - dev-libs/libffi:0/0
93 - sys-devel/gcc:*
94 - sys-libs/glibc
95 - sys-libs/ncurses:0/6
96 - sys-libs/zlib:0/1
97 - gdbm? ( sys-libs/gdbm:0= )
98 - !libressl? ( dev-libs/openssl:0=[-bindist] )
99 - libressl? ( dev-libs/libressl:0= )
100 - sqlite? ( dev-db/sqlite:3= )
101 - tk? (
102 - dev-lang/tk:0=
103 - dev-tcltk/tix:0=
104 - )
105 - !dev-python/pypy3:0"
106 -DEPEND="${RDEPEND}
107 - app-arch/lzip
108 - app-arch/xz-utils
109 - test? ( ${PYTHON_DEPS} )"
110 -
111 -S=${WORKDIR}/${MY_P}-src
112 -
113 -QA_PREBUILT="
114 - usr/lib*/pypy3/pypy3-c
115 - usr/lib*/pypy3/libpypy3-c.so"
116 -
117 -src_prepare() {
118 - eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
119 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
120 -
121 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
122 - -e "s^@libdir@^$(get_libdir)^" \
123 - -i lib-python/3/distutils/command/install.py || die
124 -
125 - # apply CPython stdlib patches
126 - pushd lib-python/3 > /dev/null || die
127 - eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
128 - eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
129 - popd > /dev/null || die
130 -
131 - eapply_user
132 -}
133 -
134 -src_compile() {
135 - # Tadaam! PyPy compiled!
136 - mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
137 - mv "${WORKDIR}"/${P}*/include/*.h include/ || die
138 - mv pypy/module/cpyext/include/*.h include/ || die
139 - mv pypy/module/cpyext/parse/*.h include/ || die
140 -
141 - pax-mark m pypy3-c libpypy3-c.so
142 -
143 - einfo "Generating caches and CFFI modules ..."
144 -
145 - # Generate Grammar and PatternGrammar pickles.
146 - ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
147 - || die "Generation of Grammar and PatternGrammar pickles failed"
148 -
149 - # Generate cffi modules
150 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
151 -#cffi_build_scripts = {
152 -# "sqlite3": "_sqlite3_build.py",
153 -# "audioop": "_audioop_build.py",
154 -# "tk": "_tkinter/tklib_build.py",
155 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
156 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
157 -# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
158 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
159 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
160 -# "lzma": "_lzma_build.py",
161 -# "_decimal": "_decimal_build.py",
162 -# "ssl": "_ssl_build.py",
163 - cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl )
164 - use gdbm && cffi_targets+=( gdbm )
165 - use sqlite && cffi_targets+=( sqlite3 )
166 - use tk && cffi_targets+=( tkinter/tklib )
167 -
168 - local t
169 - # all modules except tkinter output to .
170 - # tkinter outputs to the correct dir ...
171 - cd lib_pypy || die
172 - for t in "${cffi_targets[@]}"; do
173 - # tkinter doesn't work via -m
174 - ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
175 - done
176 -
177 - # Cleanup temporary objects
178 - find -name "_cffi_*.[co]" -delete || die
179 - find -type d -empty -delete || die
180 -}
181 -
182 -src_test() {
183 - # (unset)
184 - local -x PYTHONDONTWRITEBYTECODE
185 -
186 - # Test runner requires Python 2 too. However, it spawns PyPy3
187 - # internally so that we end up testing the correct interpreter.
188 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die
189 -}
190 -
191 -src_install() {
192 - local dest=/usr/$(get_libdir)/pypy3
193 - einfo "Installing PyPy ..."
194 - exeinto "${dest}"
195 - doexe pypy3-c libpypy3-c.so
196 - pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
197 - insinto "${dest}"
198 - # preserve mtimes to avoid obsoleting caches
199 - insopts -p
200 - doins -r include lib_pypy lib-python
201 - dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
202 - dodoc README.rst
203 -
204 - if ! use gdbm; then
205 - rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
206 - fi
207 - if ! use sqlite; then
208 - rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
209 - "${ED%/}${dest}"/lib_pypy/_sqlite3* \
210 - "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
211 - fi
212 - if ! use tk; then
213 - rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
214 - "${ED%/}${dest}"/lib_pypy/_tkinter \
215 - "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
216 - fi
217 -
218 - einfo "Generating caches and byte-compiling ..."
219 -
220 - local -x PYTHON=${ED%/}${dest}/pypy3-c
221 - # we can't use eclass function since PyPy is dumb and always gives
222 - # paths relative to the interpreter
223 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
224 - python_export pypy3 EPYTHON
225 -
226 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
227 - python_domodule epython.py
228 -
229 - einfo "Byte-compiling Python standard library..."
230 -
231 - # compile the installed modules
232 - python_optimize "${ED%/}${dest}"
233 -}
234
235 diff --git a/dev-python/pypy3-bin/pypy3-bin-5.9.0-r3.ebuild b/dev-python/pypy3-bin/pypy3-bin-5.9.0-r3.ebuild
236 deleted file mode 100644
237 index 4ac56798f83..00000000000
238 --- a/dev-python/pypy3-bin/pypy3-bin-5.9.0-r3.ebuild
239 +++ /dev/null
240 @@ -1,191 +0,0 @@
241 -# Copyright 1999-2017 Gentoo Foundation
242 -# Distributed under the terms of the GNU General Public License v2
243 -
244 -EAPI=6
245 -
246 -# some random parts need python 2...
247 -PYTHON_COMPAT=( python2_7 pypy )
248 -inherit pax-utils python-any-r1 unpacker versionator
249 -
250 -BINHOST="https://dev.gentoo.org/~mgorny/dist/pypy3-bin/${PV}"
251 -MY_P=pypy3-v${PV}
252 -
253 -DESCRIPTION="A fast, compliant alternative implementation of Python 3.3 (binary package)"
254 -HOMEPAGE="http://pypy.org/"
255 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
256 - amd64? (
257 - jit? ( ${BINHOST}/${P}-amd64+bzip2+jit+ncurses.tar.lz )
258 - !jit? ( ${BINHOST}/${P}-amd64+bzip2+ncurses.tar.lz )
259 - )
260 - x86? (
261 - cpu_flags_x86_sse2? (
262 - jit? ( ${BINHOST}/${P}-x86+bzip2+jit+ncurses+sse2.tar.lz )
263 - !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses+sse2.tar.lz )
264 - )
265 - !cpu_flags_x86_sse2? (
266 - !jit? ( ${BINHOST}/${P}-x86+bzip2+ncurses.tar.lz )
267 - )
268 - )"
269 -
270 -# Supported variants
271 -REQUIRED_USE="x86? ( !cpu_flags_x86_sse2? ( !jit ) )"
272 -
273 -LICENSE="MIT"
274 -# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
275 -SLOT="0/59"
276 -KEYWORDS="~amd64 ~x86"
277 -IUSE="gdbm +jit libressl sqlite cpu_flags_x86_sse2 test tk"
278 -
279 -RDEPEND="
280 - app-arch/bzip2:0/1
281 - dev-libs/expat:0/0
282 - dev-libs/libffi:0/0
283 - sys-devel/gcc:*
284 - sys-libs/glibc
285 - sys-libs/ncurses:0/6
286 - sys-libs/zlib:0/1
287 - gdbm? ( sys-libs/gdbm:0= )
288 - !libressl? ( dev-libs/openssl:0=[-bindist] )
289 - libressl? ( dev-libs/libressl:0= )
290 - sqlite? ( dev-db/sqlite:3= )
291 - tk? (
292 - dev-lang/tk:0=
293 - dev-tcltk/tix:0=
294 - )
295 - !dev-python/pypy3:0"
296 -DEPEND="${RDEPEND}
297 - app-arch/lzip
298 - app-arch/xz-utils
299 - test? ( ${PYTHON_DEPS} )"
300 -# doc? ( ${PYTHON_DEPS}
301 -# dev-python/sphinx )
302 -
303 -S=${WORKDIR}/${MY_P}-src
304 -
305 -QA_PREBUILT="
306 - usr/lib*/pypy3/pypy3-c
307 - usr/lib*/pypy3/libpypy3-c.so"
308 -
309 -src_prepare() {
310 - eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
311 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
312 -
313 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
314 - -e "s^@libdir@^$(get_libdir)^" \
315 - -i lib-python/3/distutils/command/install.py || die
316 -
317 - # apply CPython stdlib patches
318 - pushd lib-python/3 > /dev/null || die
319 - eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
320 - eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch
321 - popd > /dev/null || die
322 -
323 - eapply_user
324 -}
325 -
326 -src_compile() {
327 - # Tadaam! PyPy compiled!
328 - mv "${WORKDIR}"/${P}*/{libpypy3-c.so,pypy3-c} . || die
329 - mv "${WORKDIR}"/${P}*/include/*.h include/ || die
330 - mv pypy/module/cpyext/include/*.h include/ || die
331 - mv pypy/module/cpyext/parse/*.h include/ || die
332 -
333 - #use doc && emake -C pypy/doc/ html
334 - pax-mark m pypy3-c libpypy3-c.so
335 -
336 - #use doc && emake -C pypy/doc html
337 -
338 - einfo "Generating caches and CFFI modules ..."
339 -
340 - # Generate Grammar and PatternGrammar pickles.
341 - ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
342 - || die "Generation of Grammar and PatternGrammar pickles failed"
343 -
344 - # Generate cffi modules
345 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
346 -#cffi_build_scripts = {
347 -# "sqlite3": "_sqlite3_build.py",
348 -# "audioop": "_audioop_build.py",
349 -# "tk": "_tkinter/tklib_build.py",
350 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
351 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
352 -# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
353 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
354 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
355 -# "lzma": "_lzma_build.py",
356 -# "_decimal": "_decimal_build.py",
357 -# "ssl": "_ssl_build.py",
358 - cffi_targets=( audioop curses syslog pwdgrp resource lzma decimal ssl )
359 - use gdbm && cffi_targets+=( gdbm )
360 - use sqlite && cffi_targets+=( sqlite3 )
361 - use tk && cffi_targets+=( tkinter/tklib )
362 -
363 - local t
364 - # all modules except tkinter output to .
365 - # tkinter outputs to the correct dir ...
366 - cd lib_pypy || die
367 - for t in "${cffi_targets[@]}"; do
368 - # tkinter doesn't work via -m
369 - ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
370 - done
371 -
372 - # Cleanup temporary objects
373 - find -name "_cffi_*.[co]" -delete || die
374 - find -type d -empty -delete || die
375 -}
376 -
377 -src_test() {
378 - # (unset)
379 - local -x PYTHONDONTWRITEBYTECODE
380 -
381 - # Test runner requires Python 2 too. However, it spawns PyPy3
382 - # internally so that we end up testing the correct interpreter.
383 - "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die
384 -}
385 -
386 -src_install() {
387 - local dest=/usr/$(get_libdir)/pypy3
388 - einfo "Installing PyPy ..."
389 - exeinto "${dest}"
390 - doexe pypy3-c libpypy3-c.so
391 - pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so"
392 - insinto "${dest}"
393 - # preserve mtimes to avoid obsoleting caches
394 - insopts -p
395 - doins -r include lib_pypy lib-python
396 - dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3
397 - dodoc README.rst
398 -
399 - if ! use gdbm; then
400 - rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die
401 - fi
402 - if ! use sqlite; then
403 - rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \
404 - "${ED%/}${dest}"/lib_pypy/_sqlite3* \
405 - "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die
406 - fi
407 - if ! use tk; then
408 - rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \
409 - "${ED%/}${dest}"/lib_pypy/_tkinter \
410 - "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die
411 - fi
412 -
413 - # Install docs
414 - #use doc && dodoc -r pypy/doc/_build/html
415 -
416 - einfo "Generating caches and byte-compiling ..."
417 -
418 - local -x PYTHON=${ED%/}${dest}/pypy3-c
419 - # we can't use eclass function since PyPy is dumb and always gives
420 - # paths relative to the interpreter
421 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages
422 - python_export pypy3 EPYTHON
423 -
424 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
425 - python_domodule epython.py
426 -
427 - einfo "Byte-compiling Python standard library..."
428 -
429 - # compile the installed modules
430 - python_optimize "${ED%/}${dest}"
431 -}