1 |
commit: 3ea2cd4be3d7a511b4f0e428fd0a3bc294b6c72f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 25 17:09:57 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 25 18:38:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ea2cd4b |
7 |
|
8 |
dev-python/pypy3: Bump to 7.3.0 (now using split pypy3-exe) |
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.0.ebuild | 166 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 167 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest |
17 |
index 6c5c4157952..c62cafb9ced 100644 |
18 |
--- a/dev-python/pypy3/Manifest |
19 |
+++ b/dev-python/pypy3/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST pypy3.6-v7.2.0-src.tar.bz2 21850076 BLAKE2B 756ea3034fe8971c979ec83c9cbfac55a680f3ef03b276475aa4318f3480ae5ede609b8413412df64db553a33979670498b1f97184f3b57406619c9db7f01127 SHA512 bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc |
22 |
+DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 |
23 |
DIST pypy3.6-v7.3.0rc1-src.tar.bz2 22009224 BLAKE2B f5b2557369a8ba101ef38c46437a6b2af03521a5cdbedd2d1b1ee6c1349b66b7bf740290620e1143b544ca7cbcac960192cca889ac253585185bd7776b487110 SHA512 3f39b0b1454f2063b321221453487b42ee96d08ecaf5a19dc788a2b9975e9601c39ccb6e7b0de54ee81c24f4def217d8ddaa09ed5541a857c77d05f9cfc62c05 |
24 |
|
25 |
diff --git a/dev-python/pypy3/pypy3-7.3.0.ebuild b/dev-python/pypy3/pypy3-7.3.0.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..2a8526a95cb |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pypy3/pypy3-7.3.0.ebuild |
30 |
@@ -0,0 +1,166 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python2_7 pypy ) |
37 |
+inherit pax-utils python-any-r1 |
38 |
+ |
39 |
+MY_P=pypy3.6-v${PV/_/} |
40 |
+ |
41 |
+DESCRIPTION="A fast, compliant alternative implementation of the Python (3.6) language" |
42 |
+HOMEPAGE="https://pypy.org/" |
43 |
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
44 |
+S="${WORKDIR}/${MY_P}-src" |
45 |
+ |
46 |
+LICENSE="MIT" |
47 |
+# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
48 |
+SLOT="0/pypy36-pp73" |
49 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
50 |
+IUSE="bzip2 gdbm +jit libressl ncurses sandbox sqlite test tk" |
51 |
+RESTRICT="!test? ( test )" |
52 |
+ |
53 |
+RDEPEND=" |
54 |
+ || ( |
55 |
+ dev-python/pypy3-exe:${PV}[bzip2?,ncurses?] |
56 |
+ dev-python/pypy3-exe-bin:${PV} |
57 |
+ ) |
58 |
+ !libressl? ( dev-libs/openssl:0= ) |
59 |
+ libressl? ( dev-libs/libressl:0= ) |
60 |
+ gdbm? ( sys-libs/gdbm:0= ) |
61 |
+ sqlite? ( dev-db/sqlite:3= ) |
62 |
+ tk? ( |
63 |
+ dev-lang/tk:0= |
64 |
+ dev-tcltk/tix:0= |
65 |
+ ) |
66 |
+ !<dev-python/pypy3-bin-7.3.0:0" |
67 |
+DEPEND="${RDEPEND} |
68 |
+ test? ( ${PYTHON_DEPS} )" |
69 |
+ |
70 |
+pkg_setup() { |
71 |
+ use test && python-any-r1_pkg_setup |
72 |
+} |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
76 |
+ eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
77 |
+ eapply "${FILESDIR}"/7.2.0-distutils-cxx.patch |
78 |
+ |
79 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
80 |
+ -i lib-python/3/distutils/command/install.py || die |
81 |
+ |
82 |
+ # apply CPython stdlib patches |
83 |
+ pushd lib-python/3 > /dev/null || die |
84 |
+ eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
85 |
+ popd > /dev/null || die |
86 |
+ |
87 |
+ eapply_user |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ # copy over to make sys.prefix happy |
92 |
+ cp -p "${BROOT}"/usr/lib/pypy3.6/pypy3-c-${PV} pypy3-c || die |
93 |
+ cp -p "${BROOT}"/usr/lib/pypy3.6/include/${PV}/* include/ || die |
94 |
+ # (not installed by pypy) |
95 |
+ rm pypy/module/cpyext/include/_numpypy/numpy/README || die |
96 |
+ mv pypy/module/cpyext/include/* include/ || die |
97 |
+ mv pypy/module/cpyext/parse/*.h include/ || die |
98 |
+ pax-mark m pypy3-c |
99 |
+ |
100 |
+ einfo "Generating caches and CFFI modules ..." |
101 |
+ |
102 |
+ # Generate Grammar and PatternGrammar pickles. |
103 |
+ ./pypy3-c -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
104 |
+ || die "Generation of Grammar and PatternGrammar pickles failed" |
105 |
+ |
106 |
+ # Generate cffi modules |
107 |
+ # Please keep in sync with pypy/tool/build_cffi_imports.py! |
108 |
+#cffi_build_scripts = { |
109 |
+# "_blake2": "_blake2/_blake2_build.py", |
110 |
+# "_ssl": "_ssl_build.py", |
111 |
+# "sqlite3": "_sqlite3_build.py", |
112 |
+# "audioop": "_audioop_build.py", |
113 |
+# "tk": "_tkinter/tklib_build.py", |
114 |
+# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
115 |
+# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
116 |
+# "gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
117 |
+# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
118 |
+# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
119 |
+# "lzma": "_lzma_build.py", |
120 |
+# "_decimal": "_decimal_build.py", |
121 |
+# "_sha3": "_sha3/_sha3_build.py", |
122 |
+ cffi_targets=( blake2/_blake2 sha3/_sha3 ssl |
123 |
+ audioop syslog pwdgrp resource lzma decimal ) |
124 |
+ use gdbm && cffi_targets+=( gdbm ) |
125 |
+ use ncurses && cffi_targets+=( curses ) |
126 |
+ use sqlite && cffi_targets+=( sqlite3 ) |
127 |
+ use tk && cffi_targets+=( tkinter/tklib ) |
128 |
+ |
129 |
+ local t |
130 |
+ # all modules except tkinter output to . |
131 |
+ # tkinter outputs to the correct dir ... |
132 |
+ cd lib_pypy || die |
133 |
+ for t in "${cffi_targets[@]}"; do |
134 |
+ # tkinter doesn't work via -m |
135 |
+ ../pypy3-c "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
136 |
+ done |
137 |
+ |
138 |
+ # Cleanup temporary objects |
139 |
+ find -name "_cffi_*.[co]" -delete || die |
140 |
+ find -type d -empty -delete || die |
141 |
+} |
142 |
+ |
143 |
+src_test() { |
144 |
+ # (unset) |
145 |
+ local -x PYTHONDONTWRITEBYTECODE= |
146 |
+ |
147 |
+ # Test runner requires Python 2 too. However, it spawns PyPy3 |
148 |
+ # internally so that we end up testing the correct interpreter. |
149 |
+ "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c -vv lib-python || die |
150 |
+} |
151 |
+ |
152 |
+src_install() { |
153 |
+ local dest=/usr/lib/pypy3.6 |
154 |
+ einfo "Installing PyPy ..." |
155 |
+ dosym pypy3-c-${PV} "${dest}/pypy3-c" |
156 |
+ insinto "${dest}" |
157 |
+ # preserve mtimes to avoid obsoleting caches |
158 |
+ insopts -p |
159 |
+ doins -r include lib_pypy lib-python |
160 |
+ |
161 |
+ # replace copied headers with symlinks |
162 |
+ for x in "${BROOT}"/usr/lib/pypy3.6/include/${PV}/*; do |
163 |
+ dosym "${PV}/${x##*/}" "${dest}/include/${x##*/}" |
164 |
+ done |
165 |
+ |
166 |
+ dosym ../lib/pypy3.6/pypy3-c /usr/bin/pypy3 |
167 |
+ dodoc README.rst |
168 |
+ |
169 |
+ if ! use gdbm; then |
170 |
+ rm -r "${ED}${dest}"/lib_pypy/_gdbm* || die |
171 |
+ fi |
172 |
+ if ! use sqlite; then |
173 |
+ rm -r "${ED}${dest}"/lib-python/*3/sqlite3 \ |
174 |
+ "${ED}${dest}"/lib_pypy/_sqlite3* \ |
175 |
+ "${ED}${dest}"/lib-python/*3/test/test_sqlite.py || die |
176 |
+ fi |
177 |
+ if ! use tk; then |
178 |
+ rm -r "${ED}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
179 |
+ "${ED}${dest}"/lib_pypy/_tkinter \ |
180 |
+ "${ED}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
181 |
+ fi |
182 |
+ |
183 |
+ local -x PYTHON=${ED}${dest}/pypy3-c |
184 |
+ # we can't use eclass function since PyPy is dumb and always gives |
185 |
+ # paths relative to the interpreter |
186 |
+ local PYTHON_SITEDIR=${EPREFIX}/usr/lib/pypy3.6/site-packages |
187 |
+ python_export pypy3 EPYTHON |
188 |
+ |
189 |
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die |
190 |
+ python_domodule epython.py |
191 |
+ |
192 |
+ einfo "Byte-compiling Python standard library..." |
193 |
+ |
194 |
+ # compile the installed modules |
195 |
+ python_optimize "${ED}${dest}" |
196 |
+} |