1 |
commit: 8b6e17460145c9d2ecf83fc7e6811a46cde82051 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 31 13:55:43 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 13:55:43 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b6e1746 |
7 |
|
8 |
dev-python/pypy3: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3/Manifest | 1 - |
13 |
dev-python/pypy3/pypy3-7.3.9_p5-r2.ebuild | 210 ------------------------------ |
14 |
2 files changed, 211 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest |
17 |
index 91ac0fee820d..a9979da5d7fd 100644 |
18 |
--- a/dev-python/pypy3/Manifest |
19 |
+++ b/dev-python/pypy3/Manifest |
20 |
@@ -1,3 +1,2 @@ |
21 |
-DIST pypy3.9-gentoo-patches-7.3.9_p5.tar.xz 13044 BLAKE2B 0a6119c3393a8b2d599659cee2a57b2a06b18c8dbe0f04fcdbcdde98098c1f19f51c2f387b20fd8db48c6e9dc52f08baeea5f722caf751c0a13078df00538450 SHA512 7965425e107058231657d94e923d132368f11fbc1451f5ae93379f4fc8f8ea62f9e22786b1a97b37a8b4bdb8a295fc5517f07143d04e21b4990f653c0e5f1f05 |
22 |
DIST pypy3.9-gentoo-patches-7.3.9_p8.tar.xz 15660 BLAKE2B 0d2d2c6e4795b7a30eb1e0e6ccd617cff347c318de46794fc677f8200bf95d1f6c79c180b9e0deff4af60f55f9f3c962dc415f30dc75815d4889290574a64967 SHA512 426acc3345f4629106ace49fbce6256002ae4178d2e24ab9bb44d804adc31990bc6a6873d0e4a55a54c807910fa859b9b0759e7a691fed210ccb4c5c1b650851 |
23 |
DIST pypy3.9-v7.3.9-src.tar.bz2 26976726 BLAKE2B bf1ed21c575901abac020120aaff07ab57f1404713211b19cbd1eb4d6ffc675b7933be8c6fffc2b69ab467963d6598534cd5aa90c02feddad596611d2a6b6581 SHA512 83f8a6a2da351c190d2d224242cbc35e35529c7a8e8d842eaf5c945cbce2e172b02a340f32af3d49df8d5288370d794d5bc95fc12dd4a13d817c925abf06198a |
24 |
|
25 |
diff --git a/dev-python/pypy3/pypy3-7.3.9_p5-r2.ebuild b/dev-python/pypy3/pypy3-7.3.9_p5-r2.ebuild |
26 |
deleted file mode 100644 |
27 |
index 9da05e3e37f9..000000000000 |
28 |
--- a/dev-python/pypy3/pypy3-7.3.9_p5-r2.ebuild |
29 |
+++ /dev/null |
30 |
@@ -1,210 +0,0 @@ |
31 |
-# Copyright 1999-2022 Gentoo Authors |
32 |
-# Distributed under the terms of the GNU General Public License v2 |
33 |
- |
34 |
-EAPI=8 |
35 |
- |
36 |
-PYTHON_COMPAT=( python2_7 ) |
37 |
-inherit pax-utils python-any-r1 toolchain-funcs |
38 |
- |
39 |
-PYPY_PV=${PV%_p*} |
40 |
-MY_P=pypy3.9-v${PYPY_PV/_rc/rc} |
41 |
-PATCHSET="pypy3.9-gentoo-patches-${PV/_rc/rc}" |
42 |
- |
43 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.9) language" |
44 |
-HOMEPAGE=" |
45 |
- https://www.pypy.org/ |
46 |
- https://foss.heptapod.net/pypy/pypy/ |
47 |
-" |
48 |
-SRC_URI=" |
49 |
- https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 |
50 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
51 |
-" |
52 |
-S="${WORKDIR}/${MY_P}-src" |
53 |
- |
54 |
-LICENSE="MIT" |
55 |
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
56 |
-# also check pypy/interpreter/pycode.py -> pypy_incremental_magic |
57 |
-SLOT="0/pypy39-pp73-336" |
58 |
-KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-linux ~x86-linux" |
59 |
-IUSE="+ensurepip gdbm +jit ncurses sqlite test tk" |
60 |
-# many tests are failing upstream |
61 |
-# see https://buildbot.pypy.org/summary?branch=py3.9 |
62 |
-RESTRICT="test" |
63 |
- |
64 |
-RDEPEND=" |
65 |
- || ( |
66 |
- >=dev-python/pypy3-exe-${PYPY_PV}_p3:3.9-${PYPY_PV}[bzip2(+),ncurses?] |
67 |
- >=dev-python/pypy3-exe-bin-${PYPY_PV}_p3:3.9-${PYPY_PV} |
68 |
- ) |
69 |
- dev-lang/python-exec[python_targets_pypy3(-)] |
70 |
- dev-libs/openssl:0= |
71 |
- ensurepip? ( dev-python/ensurepip-wheels ) |
72 |
- gdbm? ( sys-libs/gdbm:0= ) |
73 |
- sqlite? ( dev-db/sqlite:3= ) |
74 |
- tk? ( |
75 |
- dev-lang/tk:0= |
76 |
- dev-tcltk/tix:0= |
77 |
- ) |
78 |
- !<dev-python/pypy3-bin-7.3.0:0 |
79 |
-" |
80 |
-DEPEND=" |
81 |
- ${RDEPEND} |
82 |
- test? ( |
83 |
- ${PYTHON_DEPS} |
84 |
- !!dev-python/pytest-forked |
85 |
- ) |
86 |
-" |
87 |
- |
88 |
-pkg_setup() { |
89 |
- use test && python-any-r1_pkg_setup |
90 |
-} |
91 |
- |
92 |
-src_prepare() { |
93 |
- local PATCHES=( |
94 |
- "${WORKDIR}/${PATCHSET}" |
95 |
- ) |
96 |
- default |
97 |
- |
98 |
- eapply_user |
99 |
-} |
100 |
- |
101 |
-src_configure() { |
102 |
- tc-export CC |
103 |
-} |
104 |
- |
105 |
-src_compile() { |
106 |
- mkdir bin || die |
107 |
- # switch to the layout expected for cffi module builds |
108 |
- mkdir include/pypy3.9 || die |
109 |
- # copy over to make sys.prefix happy |
110 |
- cp -p "${BROOT}"/usr/bin/pypy3.9-c-${PYPY_PV} pypy3.9-c || die |
111 |
- cp -p "${BROOT}"/usr/include/pypy3.9/${PYPY_PV}/* include/pypy3.9/ || die |
112 |
- # (not installed by pypy-exe) |
113 |
- rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
114 |
- mv pypy/module/cpyext/include/* include/pypy3.9/ || die |
115 |
- mv pypy/module/cpyext/parse/*.h include/pypy3.9/ || die |
116 |
- pax-mark m pypy3.9-c |
117 |
- |
118 |
- # verify the subslot |
119 |
- local soabi=$( |
120 |
- ./pypy3.9-c - <<-EOF |
121 |
- import importlib.util |
122 |
- import sysconfig |
123 |
- soabi = sysconfig.get_config_var("SOABI") |
124 |
- magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff |
125 |
- print(f"{soabi}-{magic}") |
126 |
- EOF |
127 |
- ) |
128 |
- [[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}" |
129 |
- |
130 |
- # Add epython.py to the distribution |
131 |
- echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die |
132 |
- |
133 |
- einfo "Generating caches and CFFI modules ..." |
134 |
- |
135 |
- # Generate Grammar and PatternGrammar pickles. |
136 |
- ./pypy3.9-c - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed" |
137 |
- import lib2to3.pygram |
138 |
- import lib2to3.patcomp |
139 |
- lib2to3.patcomp.PatternCompiler() |
140 |
- EOF |
141 |
- |
142 |
- # Generate cffi modules |
143 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
144 |
- # (NB: we build CFFI modules first to avoid error log when importing |
145 |
- # build_cffi_imports). |
146 |
- cffi_targets=( pypy_util blake2/_blake2 sha3/_sha3 ssl |
147 |
- audioop syslog pwdgrp resource lzma posixshmem ) |
148 |
- use gdbm && cffi_targets+=( gdbm ) |
149 |
- use ncurses && cffi_targets+=( curses ) |
150 |
- use sqlite && cffi_targets+=( sqlite3 ) |
151 |
- use tk && cffi_targets+=( tkinter/tklib ) |
152 |
- |
153 |
- local t |
154 |
- # all modules except tkinter output to . |
155 |
- # tkinter outputs to the correct dir ... |
156 |
- cd lib_pypy || die |
157 |
- for t in "${cffi_targets[@]}"; do |
158 |
- # tkinter doesn't work via -m |
159 |
- ../pypy3.9-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
160 |
- done |
161 |
- |
162 |
- # Verify that CFFI module list is up-to-date |
163 |
- local expected_cksum=63d4659f |
164 |
- local local_cksum=$( |
165 |
- ../pypy3.9-c - <<-EOF |
166 |
- import binascii |
167 |
- import json |
168 |
- from pypy_tools.build_cffi_imports import cffi_build_scripts as x |
169 |
- print("%08x" % (binascii.crc32(json.dumps(x).encode()),)) |
170 |
- EOF |
171 |
- ) |
172 |
- if [[ ${local_cksum} != ${expected_cksum} ]]; then |
173 |
- die "Please verify cffi_targets and update checksum to ${local_cksum}" |
174 |
- fi |
175 |
- |
176 |
- # Cleanup temporary objects |
177 |
- find -name "*_cffi.[co]" -delete || die |
178 |
- find -type d -empty -delete || die |
179 |
-} |
180 |
- |
181 |
-src_test() { |
182 |
- # (unset) |
183 |
- local -x PYTHONDONTWRITEBYTECODE= |
184 |
- local -x COLUMNS=80 |
185 |
- |
186 |
- # Test runner requires Python 2 too. However, it spawns PyPy3 |
187 |
- # internally so that we end up testing the correct interpreter. |
188 |
- # (--deselect for failing doctests) |
189 |
- "${EPYTHON}" ./pypy/test_all.py --pypy=./pypy3.9-c -vv lib-python || die |
190 |
-} |
191 |
- |
192 |
-src_install() { |
193 |
- einfo "Installing PyPy ..." |
194 |
- dodir /usr/bin |
195 |
- dosym pypy3.9-c-${PYPY_PV} /usr/bin/pypy3.9 |
196 |
- dosym pypy3.9 /usr/bin/pypy3 |
197 |
- insinto /usr/lib/pypy3.9 |
198 |
- # preserve mtimes to avoid obsoleting caches |
199 |
- insopts -p |
200 |
- doins -r lib-python/3/. lib_pypy/. |
201 |
- insinto /usr/include |
202 |
- doins -r include/pypy3.9 |
203 |
- |
204 |
- # replace copied headers with symlinks |
205 |
- for x in "${BROOT}"/usr/include/pypy3.9/${PYPY_PV}/*; do |
206 |
- dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy3.9/${x##*/}" |
207 |
- done |
208 |
- |
209 |
- dodoc README.rst |
210 |
- |
211 |
- local dest=/usr/lib/pypy3.9 |
212 |
- rm -r "${ED}${dest}"/ensurepip/_bundled || die |
213 |
- if ! use ensurepip; then |
214 |
- rm -r "${ED}${dest}"/ensurepip || die |
215 |
- fi |
216 |
- if ! use gdbm; then |
217 |
- rm -r "${ED}${dest}"/_gdbm* || die |
218 |
- fi |
219 |
- if ! use sqlite; then |
220 |
- rm -r "${ED}${dest}"/sqlite3 \ |
221 |
- "${ED}${dest}"/_sqlite3* \ |
222 |
- "${ED}${dest}"/test/test_sqlite.py || die |
223 |
- fi |
224 |
- if ! use tk; then |
225 |
- rm -r "${ED}${dest}"/{idlelib,tkinter} \ |
226 |
- "${ED}${dest}"/_tkinter \ |
227 |
- "${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die |
228 |
- fi |
229 |
- |
230 |
- local -x EPYTHON=pypy3 |
231 |
- local -x PYTHON=${ED}/usr/bin/pypy3.9-c-${PYPY_PV} |
232 |
- # temporarily copy to build tree to facilitate module builds |
233 |
- cp -p "${BROOT}/usr/bin/pypy3.9-c-${PYPY_PV}" "${PYTHON}" || die |
234 |
- |
235 |
- einfo "Byte-compiling Python standard library..." |
236 |
- python_optimize "${ED}${dest}" |
237 |
- |
238 |
- # remove to avoid collisions |
239 |
- rm "${PYTHON}" || die |
240 |
-} |