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/
Date: Sat, 05 Jan 2019 13:40:05
Message-Id: 1546695588.5e614e855fa28cb172af1304a66392bc7253d078.mgorny@gentoo
1 commit: 5e614e855fa28cb172af1304a66392bc7253d078
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 5 13:27:05 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 5 13:39:48 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e614e85
7
8 dev-python/pypy: Remove 5.10.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pypy/Manifest | 1 -
13 dev-python/pypy/pypy-5.10.0.ebuild | 275 -------------------------------------
14 2 files changed, 276 deletions(-)
15
16 diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest
17 index 222168a0e5c..40d382a050f 100644
18 --- a/dev-python/pypy/Manifest
19 +++ b/dev-python/pypy/Manifest
20 @@ -1,3 +1,2 @@
21 -DIST pypy2-v5.10.0-src.tar.bz2 19181430 BLAKE2B 4a0808c74fb167a7e98625f1d5b8559bb3a0383445387a0c48f951d75d009c57806eb600a141a84a7cb800e2f53fe091367cbb0b23192bc52b995cb65246c076 SHA512 11892418d753ddc59e928a5f59b3406b7c22b8689ad6995eeb183182dbb5184117e68bb567c770ffa60a14d6763550d658e260584e65da5025ed481f48501379
22 DIST pypy2-v6.0.0-src.tar.bz2 19741694 BLAKE2B 55f5000e590613b516b12c3682a658fe6a17fbe264be3d61a81698cdf098b39177cf4355eb3f28980209c7a0e005498201cbad8884e3aa02cc86a228d1552046 SHA512 d3bdcd65fc83f2fda3203a604733fe6765049a17cca2715cd6045dc302a6159b4741a821c53fa4c97acf7297cef4c62e941a6a6eb7f8a253a93a28dcf2aa2ca0
23 DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1
24
25 diff --git a/dev-python/pypy/pypy-5.10.0.ebuild b/dev-python/pypy/pypy-5.10.0.ebuild
26 deleted file mode 100644
27 index 286b7be69e1..00000000000
28 --- a/dev-python/pypy/pypy-5.10.0.ebuild
29 +++ /dev/null
30 @@ -1,275 +0,0 @@
31 -# Copyright 1999-2018 Gentoo Foundation
32 -# Distributed under the terms of the GNU General Public License v2
33 -
34 -EAPI=6
35 -
36 -PYTHON_COMPAT=( python2_7 pypy )
37 -inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator
38 -
39 -# note: remember to update this to newest dev-lang/python:2.7 on bump
40 -CPY_PATCHSET_VERSION="2.7.14-0"
41 -MY_P=pypy2-v${PV}
42 -
43 -DESCRIPTION="A fast, compliant alternative implementation of the Python language"
44 -HOMEPAGE="http://pypy.org/"
45 -SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2
46 - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${CPY_PATCHSET_VERSION}.tar.xz"
47 -
48 -LICENSE="MIT"
49 -# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
50 -SLOT="0/41"
51 -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
52 -IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite cpu_flags_x86_sse2 test tk"
53 -
54 -RDEPEND=">=sys-libs/zlib-1.1.3:0=
55 - virtual/libffi:0=
56 - virtual/libintl:0=
57 - dev-libs/expat:0=
58 - !libressl? ( dev-libs/openssl:0=[-bindist] )
59 - libressl? ( dev-libs/libressl:0= )
60 - bzip2? ( app-arch/bzip2:0= )
61 - gdbm? ( sys-libs/gdbm:0= )
62 - ncurses? ( sys-libs/ncurses:0= )
63 - sqlite? ( dev-db/sqlite:3= )
64 - tk? (
65 - dev-lang/tk:0=
66 - dev-tcltk/tix:0=
67 - )
68 - !dev-python/pypy-bin:0"
69 -# don't enforce the dep on pypy with USE=low-memory since it's going
70 -# to cause either collisions or circular dep on itself
71 -DEPEND="${RDEPEND}
72 - !low-memory? (
73 - || (
74 - dev-python/pypy
75 - dev-python/pypy-bin
76 - (
77 - dev-lang/python:2.7
78 - dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)]
79 - )
80 - )
81 - )"
82 -
83 -S="${WORKDIR}/${MY_P}-src"
84 -
85 -check_env() {
86 - if use low-memory; then
87 - if ! python_is_installed pypy; then
88 - eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy"
89 - eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:"
90 - eerror
91 - eerror " $ emerge -1v dev-python/pypy-bin"
92 - eerror
93 - eerror "before attempting to build dev-python/pypy[low-memory]."
94 - die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory"
95 - fi
96 -
97 - CHECKREQS_MEMORY="1750M"
98 - use amd64 && CHECKREQS_MEMORY="3500M"
99 - else
100 - CHECKREQS_MEMORY="3G"
101 - use amd64 && CHECKREQS_MEMORY="6G"
102 - fi
103 -
104 - check-reqs_pkg_pretend
105 -}
106 -
107 -pkg_pretend() {
108 - [[ ${MERGE_TYPE} != binary ]] && check_env
109 -}
110 -
111 -pkg_setup() {
112 - if [[ ${MERGE_TYPE} != binary ]]; then
113 - check_env
114 -
115 - if python_is_installed pypy; then
116 - if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then
117 - einfo "Using already-installed PyPy to perform the translation."
118 - local EPYTHON=pypy
119 - else
120 - einfo "Using ${EPYTHON} to perform the translation. Please note that upstream"
121 - einfo "recommends using PyPy for that. If you wish to do so, please unset"
122 - einfo "the EPYTHON variable."
123 - fi
124 - fi
125 -
126 - python-any-r1_pkg_setup
127 - fi
128 -}
129 -
130 -src_prepare() {
131 - eapply "${FILESDIR}/4.0.0-gentoo-path.patch"
132 - eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
133 - eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002
134 -
135 - sed -e "s^@EPREFIX@^${EPREFIX}^" \
136 - -e "s^@libdir@^$(get_libdir)^" \
137 - -i lib-python/2.7/distutils/command/install.py || die
138 -
139 - # apply CPython stdlib patches
140 - pushd lib-python/2.7 > /dev/null || die
141 - # TODO: cpy turkish locale patch now fixes C code
142 - # probably needs better port to pypy, if it is broken there
143 - eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch
144 - eapply "${WORKDIR}"/patches/62_all_xml.use_pyxml.patch
145 - popd > /dev/null || die
146 -
147 - eapply_user
148 -}
149 -
150 -src_configure() {
151 - tc-export CC
152 -
153 - local jit_backend
154 - if use jit; then
155 - jit_backend='--jit-backend='
156 -
157 - # We only need the explicit sse2 switch for x86.
158 - # On other arches we can rely on autodetection which uses
159 - # compiler macros. Plus, --jit-backend= doesn't accept all
160 - # the modern values...
161 -
162 - if use x86; then
163 - if use cpu_flags_x86_sse2; then
164 - jit_backend+=x86
165 - else
166 - jit_backend+=x86-without-sse2
167 - fi
168 - else
169 - jit_backend+=auto
170 - fi
171 - fi
172 -
173 - local args=(
174 - --shared
175 - $(usex jit -Ojit -O2)
176 - $(usex sandbox --sandbox '')
177 -
178 - ${jit_backend}
179 -
180 - pypy/goal/targetpypystandalone
181 - )
182 -
183 - # Avoid linking against libraries disabled by use flags
184 - local opts=(
185 - bzip2:bz2
186 - ncurses:_minimal_curses
187 - )
188 -
189 - local opt
190 - for opt in "${opts[@]}"; do
191 - local flag=${opt%:*}
192 - local mod=${opt#*:}
193 -
194 - args+=(
195 - $(usex ${flag} --withmod --withoutmod)-${mod}
196 - )
197 - done
198 -
199 - local interp=( "${PYTHON}" )
200 - if use low-memory; then
201 - interp=( env PYPY_GC_MAX_DELTA=200MB
202 - "${PYTHON}" --jit loop_longevity=300 )
203 - fi
204 -
205 - # translate into the C sources
206 - # we're going to make them ourselves since otherwise pypy does not
207 - # free up the unneeded memory before spawning the compiler
208 - set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}"
209 - echo -e "\033[1m${@}\033[0m"
210 - "${@}" || die "translation failed"
211 -}
212 -
213 -src_compile() {
214 - emake -C "${T}"/usession*-0/testing_1
215 -
216 - # copy back to make sys.prefix happy
217 - cp -p "${T}"/usession*-0/testing_1/{pypy-c,libpypy-c.so} . || die
218 - pax-mark m pypy-c libpypy-c.so
219 -
220 - einfo "Generating caches and CFFI modules ..."
221 -
222 - # Generate Grammar and PatternGrammar pickles.
223 - ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
224 - || die "Generation of Grammar and PatternGrammar pickles failed"
225 -
226 - # Generate cffi modules
227 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
228 -#cffi_build_scripts = {
229 -# "sqlite3": "_sqlite3_build.py",
230 -# "audioop": "_audioop_build.py",
231 -# "tk": "_tkinter/tklib_build.py",
232 -# "curses": "_curses_build.py" if sys.platform != "win32" else None,
233 -# "syslog": "_syslog_build.py" if sys.platform != "win32" else None,
234 -# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None,
235 -# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None,
236 -# "resource": "_resource_build.py" if sys.platform != "win32" else None,
237 - cffi_targets=( audioop syslog pwdgrp resource )
238 - use gdbm && cffi_targets+=( gdbm )
239 - use ncurses && cffi_targets+=( curses )
240 - use sqlite && cffi_targets+=( sqlite3 )
241 - use tk && cffi_targets+=( tkinter/tklib )
242 -
243 - local t
244 - # all modules except tkinter output to .
245 - # tkinter outputs to the correct dir ...
246 - cd lib_pypy || die
247 - for t in "${cffi_targets[@]}"; do
248 - # tkinter doesn't work via -m
249 - ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
250 - done
251 -
252 - # Cleanup temporary objects
253 - find -name "_cffi_*.[co]" -delete || die
254 - find -type d -empty -delete || die
255 -}
256 -
257 -src_test() {
258 - # (unset)
259 - local -x PYTHONDONTWRITEBYTECODE
260 -
261 - ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
262 -}
263 -
264 -src_install() {
265 - local dest=/usr/$(get_libdir)/pypy
266 - einfo "Installing PyPy ..."
267 - exeinto "${dest}"
268 - doexe pypy-c libpypy-c.so
269 - pax-mark m "${ED%/}${dest}/pypy-c" "${ED%/}${dest}/libpypy-c.so"
270 - insinto "${dest}"
271 - # preserve mtimes to avoid obsoleting caches
272 - insopts -p
273 - doins -r include lib_pypy lib-python
274 - dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy
275 - dodoc README.rst
276 -
277 - if ! use gdbm; then
278 - rm -r "${ED%/}${dest}"/lib_pypy/gdbm.py \
279 - "${ED%/}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
280 - fi
281 - if ! use sqlite; then
282 - rm -r "${ED%/}${dest}"/lib-python/*2.7/sqlite3 \
283 - "${ED%/}${dest}"/lib_pypy/_sqlite3.py \
284 - "${ED%/}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
285 - fi
286 - if ! use tk; then
287 - rm -r "${ED%/}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
288 - "${ED%/}${dest}"/lib_pypy/_tkinter \
289 - "${ED%/}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
290 - fi
291 -
292 - local -x PYTHON=${ED%/}${dest}/pypy-c
293 - # we can't use eclass function since PyPy is dumb and always gives
294 - # paths relative to the interpreter
295 - local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy/site-packages
296 - python_export pypy EPYTHON
297 -
298 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
299 - python_domodule epython.py
300 -
301 - einfo "Byte-compiling Python standard library..."
302 -
303 - # compile the installed modules
304 - python_optimize "${ED%/}${dest}"
305 -}