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: Thu, 01 Sep 2022 06:22:06
Message-Id: 1662012980.65659337d60e26297e76a777d64da32a40d11979.mgorny@gentoo
1 commit: 65659337d60e26297e76a777d64da32a40d11979
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 1 06:16:20 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 1 06:16:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65659337
7
8 dev-python/pypy: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pypy/pypy-7.3.9.ebuild | 183 --------------------------------------
13 1 file changed, 183 deletions(-)
14
15 diff --git a/dev-python/pypy/pypy-7.3.9.ebuild b/dev-python/pypy/pypy-7.3.9.ebuild
16 deleted file mode 100644
17 index 5d7b787836fc..000000000000
18 --- a/dev-python/pypy/pypy-7.3.9.ebuild
19 +++ /dev/null
20 @@ -1,183 +0,0 @@
21 -# Copyright 1999-2022 Gentoo Authors
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI=8
25 -
26 -inherit pax-utils python-utils-r1
27 -
28 -PYPY_PV=${PV%_p*}
29 -MY_P=pypy2.7-v${PYPY_PV/_}
30 -PATCHSET="pypy2.7-gentoo-patches-${PV/_rc/rc}"
31 -
32 -DESCRIPTION="A fast, compliant alternative implementation of the Python language"
33 -HOMEPAGE="https://www.pypy.org/"
34 -SRC_URI="
35 - https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2
36 - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
37 -"
38 -S="${WORKDIR}/${MY_P}-src"
39 -
40 -LICENSE="MIT"
41 -# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")'
42 -SLOT="0/73"
43 -KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-linux ~x86-linux"
44 -IUSE="bzip2 gdbm +jit ncurses sqlite tk"
45 -
46 -RDEPEND="
47 - || (
48 - >=dev-python/pypy-exe-${PYPY_PV}:${PYPY_PV}[bzip2?,ncurses?]
49 - >=dev-python/pypy-exe-bin-${PYPY_PV}:${PYPY_PV}
50 - )
51 - dev-libs/openssl:0=
52 - gdbm? ( sys-libs/gdbm:0= )
53 - sqlite? ( dev-db/sqlite:3= )
54 - tk? (
55 - dev-lang/tk:0=
56 - dev-tcltk/tix:0=
57 - )
58 - !<dev-python/pypy-bin-7.3.0:0
59 -"
60 -DEPEND="
61 - ${RDEPEND}
62 -"
63 -
64 -src_prepare() {
65 - local PATCHES=(
66 - "${WORKDIR}/${PATCHSET}"
67 - )
68 - default
69 -}
70 -
71 -src_compile() {
72 - # copy over to make sys.prefix happy
73 - cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PYPY_PV} pypy-c || die
74 - cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/* include/ || die
75 - # (not installed by pypy)
76 - rm pypy/module/cpyext/include/_numpypy/numpy/README || die
77 - mv pypy/module/cpyext/include/* include/ || die
78 - mv pypy/module/cpyext/parse/*.h include/ || die
79 - pax-mark m pypy-c
80 -
81 - # verify the subslot
82 - local soabi=$(
83 - ./pypy-c - <<-EOF
84 - import sysconfig
85 - print sysconfig.get_config_var("SOABI")
86 - EOF
87 - )
88 - [[ ${soabi#pypy-} == ${SLOT#*/} ]] || die "update subslot to ${soabi}"
89 -
90 - einfo "Generating caches and CFFI modules ..."
91 -
92 - # Generate Grammar and PatternGrammar pickles.
93 - ./pypy-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed"
94 - import lib2to3.pygram
95 - import lib2to3.patcomp
96 - lib2to3.patcomp.PatternCompiler()
97 - EOF
98 -
99 - # Generate cffi modules
100 - # Please keep in sync with pypy/tool/build_cffi_imports.py!
101 - cffi_targets=( pypy_util ssl audioop syslog pwdgrp resource )
102 - use gdbm && cffi_targets+=( gdbm )
103 - use ncurses && cffi_targets+=( curses )
104 - use sqlite && cffi_targets+=( sqlite3 )
105 - use tk && cffi_targets+=( tkinter/tklib )
106 -
107 - local t
108 - # all modules except tkinter output to .
109 - # tkinter outputs to the correct dir ...
110 - cd lib_pypy || die
111 - for t in "${cffi_targets[@]}"; do
112 - # tkinter doesn't work via -m
113 - ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}"
114 - done
115 -
116 - # Verify that CFFI module list is up-to-date
117 - local expected_cksum=2d3acf18
118 - local local_cksum=$(
119 - ../pypy-c - <<-EOF
120 - import binascii
121 - import json
122 - from pypy_tools.build_cffi_imports import cffi_build_scripts as x
123 - print("%08x" % (binascii.crc32(json.dumps(x)),))
124 - EOF
125 - )
126 - if [[ ${local_cksum} != ${expected_cksum} ]]; then
127 - die "Please verify cffi_targets and update checksum to ${local_cksum}"
128 - fi
129 -
130 - # Cleanup temporary objects
131 - find -name "_cffi_*.[co]" -delete || die
132 - find -type d -empty -delete || die
133 -}
134 -
135 -src_test() {
136 - # (unset)
137 - local -x PYTHONDONTWRITEBYTECODE=
138 - local -x COLUMNS=80
139 -
140 - local ignored_tests=(
141 - # network
142 - --ignore=lib-python/2.7/test/test_urllibnet.py
143 - --ignore=lib-python/2.7/test/test_urllib2net.py
144 - # lots of free space
145 - --ignore=lib-python/2.7/test/test_zipfile64.py
146 -
147 - # broken by expat-2.4.5
148 - --ignore=lib-python/2.7/test/test_minidom.py
149 - --ignore=lib-python/2.7/test/test_xml_etree.py
150 - --ignore=lib-python/2.7/test/test_xml_etree_c.py
151 - )
152 -
153 - ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \
154 - "${ignored_tests[@]}" lib-python || die
155 -}
156 -
157 -src_install() {
158 - local dest=/usr/lib/pypy2.7
159 - einfo "Installing PyPy ..."
160 - dosym pypy-c-${PYPY_PV} "${dest}/pypy-c"
161 - insinto "${dest}"
162 - # preserve mtimes to avoid obsoleting caches
163 - insopts -p
164 - doins -r include lib_pypy lib-python
165 -
166 - # replace copied headers with symlinks
167 - for x in "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/*; do
168 - dosym "${PYPY_PV}/${x##*/}" "${dest}/include/${x##*/}"
169 - done
170 -
171 - dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy
172 - dodoc README.rst
173 -
174 - if ! use gdbm; then
175 - rm -r "${ED}${dest}"/lib_pypy/gdbm.py \
176 - "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die
177 - fi
178 - if ! use sqlite; then
179 - rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \
180 - "${ED}${dest}"/lib_pypy/_sqlite3.py \
181 - "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die
182 - fi
183 - if ! use tk; then
184 - rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \
185 - "${ED}${dest}"/lib_pypy/_tkinter \
186 - "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die
187 - fi
188 -
189 - local -x EPYTHON=pypy
190 - local -x PYTHON=${ED}${dest}/pypy-c-${PYPY_PV}
191 - # temporarily copy to build tree to facilitate module builds
192 - cp -p "${BROOT}${dest}/pypy-c-${PYPY_PV}" "${PYTHON}" || die
193 -
194 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
195 - python_moduleinto /usr/lib/pypy2.7/site-packages
196 - python_domodule epython.py
197 -
198 - einfo "Byte-compiling Python standard library..."
199 - python_optimize "${ED}${dest}"
200 -
201 - # remove to avoid collisions
202 - rm "${PYTHON}" || die
203 -}