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