1 |
commit: 3ba89e722d9775eadc3a8e0aba0282cacc9096b8 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 14 20:02:18 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 14 21:58:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ba89e72 |
7 |
|
8 |
dev-python/pypy: Bump to 7.3.5rc2 |
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.5_rc2.ebuild | 160 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 162 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy/Manifest b/dev-python/pypy/Manifest |
17 |
index 433d96e1c4e..ce23a54a40e 100644 |
18 |
--- a/dev-python/pypy/Manifest |
19 |
+++ b/dev-python/pypy/Manifest |
20 |
@@ -1,5 +1,7 @@ |
21 |
DIST pypy2.7-gentoo-patches-7.3.3_p2.tar.xz 11184 BLAKE2B b2b9b94478609372d616c65a87cbb12a07e217928beef9fac26c428f81c662ef390db3fd85bf368ffcc8c6fa3802e506412b7bebd14bdc453009008bc3459d25 SHA512 9ab8ed99b42b36e9c212683ef93f7f1fb99caecf056293ab9a5734f8b52eedec192860702baa121630558530cb5c4652f8542300ecaaaa282377ea6456618b95 |
22 |
DIST pypy2.7-gentoo-patches-7.3.3_p3.tar.xz 12936 BLAKE2B 7d00353f79d535044e4e2c9cb8ad06d637bca4707123a566989b0ab97ac2f22d9f631d1d5f4e32bf1e0d5202dbc31fffa8d39718963da2a4594f814b90aa8132 SHA512 818910bbe3c01399a0da361a48098a4e875ddd7d4fd50f23bc06501dae7ed5eb3ee773b0dd76d256d141ba190d55b5c725fa4d7ed8d7a9841e6be81babaf518b |
23 |
DIST pypy2.7-gentoo-patches-7.3.4.tar.xz 7844 BLAKE2B d06694fa085667e40ef8805c29f7ccf95b49f9de4e99e3ebfa3d69c4202a0ddcebb54c524d7d9f9ec67573a8d2ebe38fb7023d4d3ecef67afc907ecef5c16c02 SHA512 aa8ffefb5d30070ae86c1c14c55c277e39d3da66aea3a0951319158fb65e716e7fa7864e8bf5d26314d4b2a8030c766b63cad6a3663822d2875cd8cc1f3f2de5 |
24 |
+DIST pypy2.7-gentoo-patches-7.3.5rc2.tar.xz 5792 BLAKE2B 2380dc09be7e8dccfcc151e5c3cc5cc0aeb6a5a284b3b3fa8d12bdc0c6352d0da4fc3cb52762c1b5a38b97b3736147cb10986e0e6fdb622ff277445ba7228252 SHA512 1e269a02fc70b67fe44a8d57303a1565acbdb4b7f8065ec489b6bdd9275281e4b516fd1e01223e9635e4759a71c73be941f02e6bc561ab728d6a67e22bda47e3 |
25 |
DIST pypy2.7-v7.3.3-src.tar.bz2 20881821 BLAKE2B ce1ecdd1fffe40574c7662da6038b84d2bca47ab168939ef0c12be2c6348317f17a94a3026e7fa53c71601edc153aefd98f770bd148e7af07ca751c0a5fc1252 SHA512 c2b6c44fdcac5f9445fab01572f859228fc286891fd09a4ddb95d283683d805276c853ec8e61fcd04cb9ee811d0e959d19bb03fdd7442c044f28a773633122e7 |
26 |
DIST pypy2.7-v7.3.4-src.tar.bz2 21571561 BLAKE2B d0ac56fadec63fe7e65728c36c2aaf96fc5f54919dddbca9571a24c42a9e3e21f672f84555a18a384c4715f0489bd7aef009c0a47b635de88c472a93e2ae8d71 SHA512 4c18c2dbfbf0cc1034bea773828204df77aec7ef82119fb94e5cb762ce1783e00ad70e99d1432b4948dc132e726bdc6015f4a5bf10a5b10415bcfe99da2ecd17 |
27 |
+DIST pypy2.7-v7.3.5rc2-src.tar.bz2 21561927 BLAKE2B 1fd8aeba0698c95015716109d6a3aec74f95d1a4faea130ffe872b43d0ef8e1e8f8b742aeae6048ab596c5b78634e83c83c95ce3ed047d068dae7bddc02e1281 SHA512 d1d4b45c29c5e4c1735744b4aac46c87787bda7db496c8865e099e669f666f223ed9c014f3637065bb7762eda39a0116bab54078cf10ce8fbd8505d1ab952575 |
28 |
|
29 |
diff --git a/dev-python/pypy/pypy-7.3.5_rc2.ebuild b/dev-python/pypy/pypy-7.3.5_rc2.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..82edf15baf9 |
32 |
--- /dev/null |
33 |
+++ b/dev-python/pypy/pypy-7.3.5_rc2.ebuild |
34 |
@@ -0,0 +1,160 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+inherit pax-utils python-utils-r1 |
41 |
+ |
42 |
+PYPY_PV=${PV%_p*} |
43 |
+MY_P=pypy2.7-v${PYPY_PV/_} |
44 |
+PATCHSET="pypy2.7-gentoo-patches-${PV/_}" |
45 |
+ |
46 |
+DESCRIPTION="A fast, compliant alternative implementation of the Python language" |
47 |
+HOMEPAGE="https://www.pypy.org/" |
48 |
+SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 |
49 |
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
50 |
+S="${WORKDIR}/${MY_P}-src" |
51 |
+ |
52 |
+LICENSE="MIT" |
53 |
+# pypy -c 'import sysconfig; print sysconfig.get_config_var("SOABI")' |
54 |
+SLOT="0/73" |
55 |
+KEYWORDS="" |
56 |
+IUSE="bzip2 gdbm +jit ncurses sqlite tk" |
57 |
+ |
58 |
+RDEPEND=" |
59 |
+ || ( |
60 |
+ >=dev-python/pypy-exe-${PV}:${PYPY_PV}[bzip2?,ncurses?] |
61 |
+ >=dev-python/pypy-exe-bin-${PV}:${PYPY_PV} |
62 |
+ ) |
63 |
+ dev-libs/openssl:0= |
64 |
+ gdbm? ( sys-libs/gdbm:0= ) |
65 |
+ sqlite? ( dev-db/sqlite:3= ) |
66 |
+ tk? ( |
67 |
+ dev-lang/tk:0= |
68 |
+ dev-tcltk/tix:0= |
69 |
+ ) |
70 |
+ !<dev-python/pypy-bin-7.3.0:0" |
71 |
+DEPEND="${RDEPEND}" |
72 |
+ |
73 |
+src_prepare() { |
74 |
+ local PATCHES=( |
75 |
+ "${WORKDIR}/${PATCHSET}" |
76 |
+ ) |
77 |
+ default |
78 |
+ |
79 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
80 |
+ -i lib-python/2.7/distutils/command/install.py || die |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ # copy over to make sys.prefix happy |
85 |
+ cp -p "${BROOT}"/usr/lib/pypy2.7/pypy-c-${PYPY_PV} pypy-c || die |
86 |
+ cp -p "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/* include/ || die |
87 |
+ # (not installed by pypy) |
88 |
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
89 |
+ mv pypy/module/cpyext/include/* include/ || die |
90 |
+ mv pypy/module/cpyext/parse/*.h include/ || die |
91 |
+ pax-mark m pypy-c |
92 |
+ |
93 |
+ einfo "Generating caches and CFFI modules ..." |
94 |
+ |
95 |
+ # Generate Grammar and PatternGrammar pickles. |
96 |
+ ./pypy-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
97 |
+ || die "Generation of Grammar and PatternGrammar pickles failed" |
98 |
+ |
99 |
+ # Generate cffi modules |
100 |
+ # Please keep in sync with pypy/tool/build_cffi_imports.py! |
101 |
+#cffi_build_scripts = { |
102 |
+# "_ssl": "_ssl_build.py", |
103 |
+# "sqlite3": "_sqlite3_build.py", |
104 |
+# "audioop": "_audioop_build.py", |
105 |
+# "tk": "_tkinter/tklib_build.py", |
106 |
+# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
107 |
+# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
108 |
+# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
109 |
+# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
110 |
+# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
111 |
+ cffi_targets=( ssl audioop syslog pwdgrp resource ) |
112 |
+ use gdbm && cffi_targets+=( gdbm ) |
113 |
+ use ncurses && cffi_targets+=( curses ) |
114 |
+ use sqlite && cffi_targets+=( sqlite3 ) |
115 |
+ use tk && cffi_targets+=( tkinter/tklib ) |
116 |
+ |
117 |
+ local t |
118 |
+ # all modules except tkinter output to . |
119 |
+ # tkinter outputs to the correct dir ... |
120 |
+ cd lib_pypy || die |
121 |
+ for t in "${cffi_targets[@]}"; do |
122 |
+ # tkinter doesn't work via -m |
123 |
+ ../pypy-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
124 |
+ done |
125 |
+ |
126 |
+ # Cleanup temporary objects |
127 |
+ find -name "_cffi_*.[co]" -delete || die |
128 |
+ find -type d -empty -delete || die |
129 |
+} |
130 |
+ |
131 |
+src_test() { |
132 |
+ # (unset) |
133 |
+ local -x PYTHONDONTWRITEBYTECODE= |
134 |
+ local -x COLUMNS=80 |
135 |
+ |
136 |
+ local ignored_tests=( |
137 |
+ # network |
138 |
+ --ignore=lib-python/2.7/test/test_urllibnet.py |
139 |
+ --ignore=lib-python/2.7/test/test_urllib2net.py |
140 |
+ # lots of free space |
141 |
+ --ignore=lib-python/2.7/test/test_zipfile64.py |
142 |
+ ) |
143 |
+ |
144 |
+ ./pypy-c ./pypy/test_all.py --pypy=./pypy-c -vv \ |
145 |
+ "${ignored_tests[@]}" lib-python || die |
146 |
+} |
147 |
+ |
148 |
+src_install() { |
149 |
+ local dest=/usr/lib/pypy2.7 |
150 |
+ einfo "Installing PyPy ..." |
151 |
+ dosym pypy-c-${PYPY_PV} "${dest}/pypy-c" |
152 |
+ insinto "${dest}" |
153 |
+ # preserve mtimes to avoid obsoleting caches |
154 |
+ insopts -p |
155 |
+ doins -r include lib_pypy lib-python |
156 |
+ |
157 |
+ # replace copied headers with symlinks |
158 |
+ for x in "${BROOT}"/usr/lib/pypy2.7/include/${PYPY_PV}/*; do |
159 |
+ dosym "${PYPY_PV}/${x##*/}" "${dest}/include/${x##*/}" |
160 |
+ done |
161 |
+ |
162 |
+ dosym ../lib/pypy2.7/pypy-c /usr/bin/pypy |
163 |
+ dodoc README.rst |
164 |
+ |
165 |
+ if ! use gdbm; then |
166 |
+ rm -r "${ED}${dest}"/lib_pypy/gdbm.py \ |
167 |
+ "${ED}${dest}"/lib-python/*2.7/test/test_gdbm.py || die |
168 |
+ fi |
169 |
+ if ! use sqlite; then |
170 |
+ rm -r "${ED}${dest}"/lib-python/*2.7/sqlite3 \ |
171 |
+ "${ED}${dest}"/lib_pypy/_sqlite3.py \ |
172 |
+ "${ED}${dest}"/lib-python/*2.7/test/test_sqlite.py || die |
173 |
+ fi |
174 |
+ if ! use tk; then |
175 |
+ rm -r "${ED}${dest}"/lib-python/*2.7/{idlelib,lib-tk} \ |
176 |
+ "${ED}${dest}"/lib_pypy/_tkinter \ |
177 |
+ "${ED}${dest}"/lib-python/*2.7/test/test_{tcl,tk,ttk*}.py || die |
178 |
+ fi |
179 |
+ |
180 |
+ local -x EPYTHON=pypy |
181 |
+ local -x PYTHON=${ED}${dest}/pypy-c-${PYPY_PV} |
182 |
+ # temporarily copy to build tree to facilitate module builds |
183 |
+ cp -p "${BROOT}${dest}/pypy-c-${PYPY_PV}" "${PYTHON}" || die |
184 |
+ |
185 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
186 |
+ python_moduleinto /usr/lib/pypy2.7/site-packages |
187 |
+ python_domodule epython.py |
188 |
+ |
189 |
+ einfo "Byte-compiling Python standard library..." |
190 |
+ python_optimize "${ED}${dest}" |
191 |
+ |
192 |
+ # remove to avoid collisions |
193 |
+ rm "${PYTHON}" || die |
194 |
+} |