1 |
commit: e106c34cf8d3786faa62b91f79feb430a2e3d7eb |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 5 22:19:47 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 5 23:19:26 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e106c34c |
7 |
|
8 |
dev-python/pypy3: Clean old up |
9 |
|
10 |
dev-python/pypy3/Manifest | 1 - |
11 |
dev-python/pypy3/files/2.5.0-shared-lib.patch | 12 -- |
12 |
dev-python/pypy3/pypy3-5.8.0.ebuild | 238 -------------------------- |
13 |
3 files changed, 251 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/pypy3/Manifest b/dev-python/pypy3/Manifest |
16 |
index 0cf5fe7f341..4e6e3227823 100644 |
17 |
--- a/dev-python/pypy3/Manifest |
18 |
+++ b/dev-python/pypy3/Manifest |
19 |
@@ -1,3 +1,2 @@ |
20 |
DIST pypy3-v5.10.0-src.tar.bz2 29075971 BLAKE2B 02fb64d514ab292e09ced57e1c206b04d0fb38353ad6ec0e836448344a6d126d0fccfb61cbd278ea3acaa227032640e82f9ffd7efe3b33ade1ca34a18831b3e4 SHA512 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b |
21 |
-DIST pypy3-v5.8.0-src.tar.bz2 28986883 BLAKE2B dc6c906109269e8d1bd6b171cabf6475aa803e4326a9974ded86fbb0943798317761bc0ae0ab09829a48c073b3755c8a2bdcb03bed4b06b9a70cee061867edb6 SHA512 d78b4c899a5643028664365ed973a7b292a8e5b3989cc75203cd381ea3cda7dd73121c574726e23dca86e8364fcfcf42c372c9deee438c805f30d6e1c4ac115a |
22 |
DIST pypy3-v5.9.0-src.tar.bz2 29055111 BLAKE2B 181d87ebe4a83a3f03b28d891f248f718ad120ed54621f8054f19a65aebbe90b65c69e40ca656612356b2019aa9ac22d5e242e688a80190b046511a8ceb9c040 SHA512 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd |
23 |
|
24 |
diff --git a/dev-python/pypy3/files/2.5.0-shared-lib.patch b/dev-python/pypy3/files/2.5.0-shared-lib.patch |
25 |
deleted file mode 100644 |
26 |
index b5c877bd58b..00000000000 |
27 |
--- a/dev-python/pypy3/files/2.5.0-shared-lib.patch |
28 |
+++ /dev/null |
29 |
@@ -1,12 +0,0 @@ |
30 |
-diff -ur pypy-2.5.0-src.orig/rpython/translator/platform/posix.py pypy-2.5.0-src/rpython/translator/platform/posix.py |
31 |
---- a/rpython/translator/platform/posix.py 2015-02-03 05:12:49.000000000 +0800 |
32 |
-+++ b/rpython/translator/platform/posix.py 2015-03-22 07:36:01.420116684 +0800 |
33 |
-@@ -183,7 +183,7 @@ |
34 |
- 'int main(int argc, char* argv[]) ' |
35 |
- '{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@') |
36 |
- m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'], |
37 |
-- '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)') |
38 |
-+ '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. -l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@') |
39 |
- |
40 |
- return m |
41 |
- |
42 |
|
43 |
diff --git a/dev-python/pypy3/pypy3-5.8.0.ebuild b/dev-python/pypy3/pypy3-5.8.0.ebuild |
44 |
deleted file mode 100644 |
45 |
index b286c989e72..00000000000 |
46 |
--- a/dev-python/pypy3/pypy3-5.8.0.ebuild |
47 |
+++ /dev/null |
48 |
@@ -1,238 +0,0 @@ |
49 |
-# Copyright 1999-2017 Gentoo Foundation |
50 |
-# Distributed under the terms of the GNU General Public License v2 |
51 |
- |
52 |
-EAPI=6 |
53 |
- |
54 |
-# pypy3 needs to be built using python 2 |
55 |
-PYTHON_COMPAT=( python2_7 pypy ) |
56 |
-inherit check-reqs pax-utils python-any-r1 toolchain-funcs versionator |
57 |
- |
58 |
-MY_P=pypy3-v${PV} |
59 |
- |
60 |
-DESCRIPTION="A fast, compliant alternative implementation of the Python (3.3) language" |
61 |
-HOMEPAGE="http://pypy.org/" |
62 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2" |
63 |
- |
64 |
-LICENSE="MIT" |
65 |
-# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' |
66 |
-SLOT="0/58" |
67 |
-KEYWORDS="~amd64 ~amd64-linux" |
68 |
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox sqlite tk" |
69 |
- |
70 |
-RDEPEND=">=sys-libs/zlib-1.1.3:0= |
71 |
- virtual/libffi:0= |
72 |
- virtual/libintl:0= |
73 |
- dev-libs/expat:0= |
74 |
- !libressl? ( dev-libs/openssl:0=[-bindist] ) |
75 |
- libressl? ( dev-libs/libressl:0= ) |
76 |
- bzip2? ( app-arch/bzip2:0= ) |
77 |
- gdbm? ( sys-libs/gdbm:0= ) |
78 |
- ncurses? ( sys-libs/ncurses:0= ) |
79 |
- sqlite? ( dev-db/sqlite:3= ) |
80 |
- tk? ( |
81 |
- dev-lang/tk:0= |
82 |
- dev-tcltk/tix:0= |
83 |
- ) |
84 |
- !dev-python/pypy3-bin:0" |
85 |
-DEPEND="${RDEPEND} |
86 |
- low-memory? ( virtual/pypy:0 ) |
87 |
- !low-memory? ( ${PYTHON_DEPS} )" |
88 |
-# doc? ( dev-python/sphinx ) |
89 |
- |
90 |
-S="${WORKDIR}/${MY_P}-src" |
91 |
- |
92 |
-check_env() { |
93 |
- if use low-memory; then |
94 |
- CHECKREQS_MEMORY="1750M" |
95 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
96 |
- else |
97 |
- CHECKREQS_MEMORY="3G" |
98 |
- use amd64 && CHECKREQS_MEMORY="6G" |
99 |
- fi |
100 |
- |
101 |
- check-reqs_pkg_pretend |
102 |
-} |
103 |
- |
104 |
-pkg_pretend() { |
105 |
- [[ ${MERGE_TYPE} != binary ]] && check_env |
106 |
-} |
107 |
- |
108 |
-pkg_setup() { |
109 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
110 |
- check_env |
111 |
- |
112 |
- # unset to allow forcing pypy below :) |
113 |
- use low-memory && local EPYTHON= |
114 |
- if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then |
115 |
- einfo "Using PyPy to perform the translation." |
116 |
- local EPYTHON=pypy |
117 |
- else |
118 |
- einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" |
119 |
- einfo "recommends using PyPy for that. If you wish to do so, please install" |
120 |
- einfo "virtual/pypy and ensure that EPYTHON variable is unset." |
121 |
- fi |
122 |
- |
123 |
- python-any-r1_pkg_setup |
124 |
- fi |
125 |
-} |
126 |
- |
127 |
-src_prepare() { |
128 |
- eapply "${FILESDIR}/4.0.0-gentoo-path.patch" |
129 |
- eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
130 |
- eapply "${FILESDIR}"/2.5.0-shared-lib.patch # 517002 |
131 |
- |
132 |
- sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
133 |
- -e "s^@libdir@^$(get_libdir)^" \ |
134 |
- -i lib-python/3/distutils/command/install.py || die |
135 |
- |
136 |
- # apply CPython stdlib patches |
137 |
- pushd lib-python/3 > /dev/null || die |
138 |
- eapply "${FILESDIR}"/5.8.0_all_distutils_cxx.patch |
139 |
- eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
140 |
- popd > /dev/null || die |
141 |
- |
142 |
- eapply_user |
143 |
-} |
144 |
- |
145 |
-src_configure() { |
146 |
- tc-export CC |
147 |
- |
148 |
- local args=( |
149 |
- --shared |
150 |
- $(usex jit -Ojit -O2) |
151 |
- $(usex sandbox --sandbox '') |
152 |
- |
153 |
- --jit-backend=auto |
154 |
- |
155 |
- pypy/goal/targetpypystandalone |
156 |
- ) |
157 |
- |
158 |
- # Avoid linking against libraries disabled by use flags |
159 |
- local opts=( |
160 |
- bzip2:bz2 |
161 |
- ncurses:_minimal_curses |
162 |
- ) |
163 |
- |
164 |
- local opt |
165 |
- for opt in "${opts[@]}"; do |
166 |
- local flag=${opt%:*} |
167 |
- local mod=${opt#*:} |
168 |
- |
169 |
- args+=( |
170 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
171 |
- ) |
172 |
- done |
173 |
- |
174 |
- local interp=( "${PYTHON}" ) |
175 |
- if use low-memory; then |
176 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
177 |
- "${PYTHON}" --jit loop_longevity=300 ) |
178 |
- fi |
179 |
- |
180 |
- # translate into the C sources |
181 |
- # we're going to make them ourselves since otherwise pypy does not |
182 |
- # free up the unneeded memory before spawning the compiler |
183 |
- set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
184 |
- echo -e "\033[1m${@}\033[0m" |
185 |
- "${@}" || die "translation failed" |
186 |
-} |
187 |
- |
188 |
-src_compile() { |
189 |
- emake -C "${T}"/usession*-0/testing_1 |
190 |
- |
191 |
- # copy back to make sys.prefix happy |
192 |
- cp -p "${T}"/usession*-0/testing_1/{pypy3-c,libpypy3-c.so} . || die |
193 |
- pax-mark m pypy3-c libpypy3-c.so |
194 |
- |
195 |
- #use doc && emake -C pypy/doc html |
196 |
-} |
197 |
- |
198 |
-src_test() { |
199 |
- # (unset) |
200 |
- local -x PYTHONDONTWRITEBYTECODE |
201 |
- |
202 |
- # Test runner requires Python 2 too. However, it spawns PyPy3 |
203 |
- # internally so that we end up testing the correct interpreter. |
204 |
- "${PYTHON}" ./pypy/test_all.py --pypy=./pypy3-c lib-python || die |
205 |
-} |
206 |
- |
207 |
-src_install() { |
208 |
- local dest=/usr/$(get_libdir)/pypy3 |
209 |
- einfo "Installing PyPy ..." |
210 |
- exeinto "${dest}" |
211 |
- doexe pypy3-c libpypy3-c.so |
212 |
- pax-mark m "${ED%/}${dest}/pypy3-c" "${ED%/}${dest}/libpypy3-c.so" |
213 |
- insinto "${dest}" |
214 |
- doins -r include lib_pypy lib-python |
215 |
- dosym ../$(get_libdir)/pypy3/pypy3-c /usr/bin/pypy3 |
216 |
- dodoc README.rst |
217 |
- |
218 |
- if ! use gdbm; then |
219 |
- rm -r "${ED%/}${dest}"/lib_pypy/_gdbm* || die |
220 |
- fi |
221 |
- if ! use sqlite; then |
222 |
- rm -r "${ED%/}${dest}"/lib-python/*3/sqlite3 \ |
223 |
- "${ED%/}${dest}"/lib_pypy/_sqlite3* \ |
224 |
- "${ED%/}${dest}"/lib-python/*3/test/test_sqlite.py || die |
225 |
- fi |
226 |
- if ! use tk; then |
227 |
- rm -r "${ED%/}${dest}"/lib-python/*3/{idlelib,tkinter} \ |
228 |
- "${ED%/}${dest}"/lib_pypy/_tkinter \ |
229 |
- "${ED%/}${dest}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
230 |
- fi |
231 |
- |
232 |
- # Install docs |
233 |
- #use doc && dohtml -r pypy/doc/_build/html/ |
234 |
- |
235 |
- einfo "Generating caches and byte-compiling ..." |
236 |
- |
237 |
- local -x PYTHON=${ED%/}${dest}/pypy3-c |
238 |
- local -x LD_LIBRARY_PATH="${ED%/}${dest}" |
239 |
- # we can't use eclass function since PyPy is dumb and always gives |
240 |
- # paths relative to the interpreter |
241 |
- local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages |
242 |
- python_export pypy3 EPYTHON |
243 |
- |
244 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
245 |
- python_domodule epython.py |
246 |
- |
247 |
- # Generate Grammar and PatternGrammar pickles. |
248 |
- "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
249 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
250 |
- |
251 |
- # Generate cffi modules |
252 |
- # Please keep in sync with pypy/tool/build_cffi_imports.py! |
253 |
-#cffi_build_scripts = { |
254 |
-# "sqlite3": "_sqlite3_build.py", |
255 |
-# "audioop": "_audioop_build.py", |
256 |
-# "tk": "_tkinter/tklib_build.py", |
257 |
-# "curses": "_curses_build.py" if sys.platform != "win32" else None, |
258 |
-# "syslog": "_syslog_build.py" if sys.platform != "win32" else None, |
259 |
-# "_gdbm": "_gdbm_build.py" if sys.platform != "win32" else None, |
260 |
-# "pwdgrp": "_pwdgrp_build.py" if sys.platform != "win32" else None, |
261 |
-# "resource": "_resource_build.py" if sys.platform != "win32" else None, |
262 |
-# "lzma": "_lzma_build.py", |
263 |
-# "_decimal": "_decimal_build.py", |
264 |
-# "ssl": "_ssl_build.py", |
265 |
- cffi_targets=( audioop syslog pwdgrp resource lzma decimal ssl ) |
266 |
- use gdbm && cffi_targets+=( gdbm ) |
267 |
- use ncurses && cffi_targets+=( curses ) |
268 |
- use sqlite && cffi_targets+=( sqlite3 ) |
269 |
- use tk && cffi_targets+=( tkinter/tklib ) |
270 |
- |
271 |
- local t |
272 |
- # all modules except tkinter output to . |
273 |
- # tkinter outputs to the correct dir ... |
274 |
- cd "${ED%/}${dest}"/lib_pypy || die |
275 |
- for t in "${cffi_targets[@]}"; do |
276 |
- # tkinter doesn't work via -m |
277 |
- "${PYTHON}" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" |
278 |
- done |
279 |
- |
280 |
- # Cleanup temporary objects |
281 |
- find "${ED%/}${dest}" -name "_cffi_*.[co]" -delete || die |
282 |
- find "${ED%/}${dest}" -type d -empty -delete || die |
283 |
- |
284 |
- # compile the installed modules |
285 |
- python_optimize "${ED%/}${dest}" |
286 |
-} |