1 |
commit: c1a3387e29099d79b39b4b712031a76eeb250bce |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 3 09:57:09 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 3 10:47:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1a3387e |
7 |
|
8 |
dev-python/pypy3: Drop old |
9 |
|
10 |
dev-python/pypy3/files/1.9-scripts-location.patch | 11 -- |
11 |
dev-python/pypy3/pypy3-2.4.0.ebuild | 231 ---------------------- |
12 |
2 files changed, 242 deletions(-) |
13 |
|
14 |
diff --git a/dev-python/pypy3/files/1.9-scripts-location.patch b/dev-python/pypy3/files/1.9-scripts-location.patch |
15 |
deleted file mode 100644 |
16 |
index 6ed1285..0000000 |
17 |
--- a/dev-python/pypy3/files/1.9-scripts-location.patch |
18 |
+++ /dev/null |
19 |
@@ -1,11 +0,0 @@ |
20 |
---- a/lib-python/3/distutils/command/install.py |
21 |
-+++ b/lib-python/3/distutils/command/install.py |
22 |
-@@ -87,7 +87,7 @@ |
23 |
- 'purelib': '$base/site-packages', |
24 |
- 'platlib': '$base/site-packages', |
25 |
- 'headers': '$base/include', |
26 |
-- 'scripts': '$base/bin', |
27 |
-+ 'scripts': '/usr/bin', |
28 |
- 'data' : '$base', |
29 |
- }, |
30 |
- } |
31 |
|
32 |
diff --git a/dev-python/pypy3/pypy3-2.4.0.ebuild b/dev-python/pypy3/pypy3-2.4.0.ebuild |
33 |
deleted file mode 100644 |
34 |
index fdff56a..0000000 |
35 |
--- a/dev-python/pypy3/pypy3-2.4.0.ebuild |
36 |
+++ /dev/null |
37 |
@@ -1,231 +0,0 @@ |
38 |
-# Copyright 1999-2015 Gentoo Foundation |
39 |
-# Distributed under the terms of the GNU General Public License v2 |
40 |
-# $Id$ |
41 |
- |
42 |
-EAPI=5 |
43 |
- |
44 |
-# pypy3 needs to be built using python 2 |
45 |
-PYTHON_COMPAT=( python2_7 pypy ) |
46 |
-inherit check-reqs eutils multilib multiprocessing pax-utils \ |
47 |
- python-any-r1 toolchain-funcs versionator |
48 |
- |
49 |
-DESCRIPTION="A fast, compliant alternative implementation of Python 3" |
50 |
-HOMEPAGE="http://pypy.org/" |
51 |
-SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${P}-src.tar.bz2" |
52 |
- |
53 |
-LICENSE="MIT" |
54 |
-SLOT="0/$(get_version_component_range 1-2 ${PV})" |
55 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
56 |
-IUSE="bzip2 gdbm +jit libressl low-memory ncurses sandbox +shadowstack sqlite cpu_flags_x86_sse2 tk" |
57 |
- |
58 |
-RDEPEND=">=sys-libs/zlib-1.1.3:0= |
59 |
- virtual/libffi:0= |
60 |
- virtual/libintl:0= |
61 |
- dev-libs/expat:0= |
62 |
- !libressl? ( dev-libs/openssl:0= ) |
63 |
- libressl? ( dev-libs/libressl:= ) |
64 |
- bzip2? ( app-arch/bzip2:0= ) |
65 |
- gdbm? ( sys-libs/gdbm:0= ) |
66 |
- ncurses? ( =sys-libs/ncurses-5*:0= ) |
67 |
- sqlite? ( dev-db/sqlite:3= ) |
68 |
- tk? ( |
69 |
- dev-lang/tk:0= |
70 |
- dev-tcltk/tix:0= |
71 |
- ) |
72 |
- !dev-python/pypy3-bin:0" |
73 |
-DEPEND="${RDEPEND} |
74 |
- low-memory? ( virtual/pypy:0 ) |
75 |
- !low-memory? ( ${PYTHON_DEPS} )" |
76 |
-# doc? ( dev-python/sphinx ) |
77 |
-PDEPEND="app-admin/python-updater" |
78 |
- |
79 |
-S="${WORKDIR}/${P}-src" |
80 |
- |
81 |
-pkg_pretend() { |
82 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
83 |
- if use low-memory; then |
84 |
- CHECKREQS_MEMORY="1750M" |
85 |
- use amd64 && CHECKREQS_MEMORY="3500M" |
86 |
- else |
87 |
- CHECKREQS_MEMORY="3G" |
88 |
- use amd64 && CHECKREQS_MEMORY="6G" |
89 |
- fi |
90 |
- fi |
91 |
- |
92 |
- check-reqs_pkg_pretend |
93 |
-} |
94 |
- |
95 |
-pkg_setup() { |
96 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
97 |
- pkg_pretend |
98 |
- |
99 |
- # unset to allow forcing pypy below :) |
100 |
- use low-memory && local EPYTHON= |
101 |
- if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then |
102 |
- einfo "Using PyPy to perform the translation." |
103 |
- local EPYTHON=pypy |
104 |
- else |
105 |
- einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" |
106 |
- einfo "recommends using PyPy for that. If you wish to do so, please install" |
107 |
- einfo "virtual/pypy and ensure that EPYTHON variable is unset." |
108 |
- fi |
109 |
- |
110 |
- python-any-r1_pkg_setup |
111 |
- fi |
112 |
-} |
113 |
- |
114 |
-src_prepare() { |
115 |
- epatch \ |
116 |
- "${FILESDIR}"/${P}-gcc-4.9.patch \ |
117 |
- "${FILESDIR}/1.9-scripts-location.patch" \ |
118 |
- "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" \ |
119 |
- "${FILESDIR}"/2.3.1-shared-lib.patch # 517002 |
120 |
- epatch "${FILESDIR}"/${PN}-2.4.0-libressl.patch |
121 |
- |
122 |
- epatch_user |
123 |
-} |
124 |
- |
125 |
-src_compile() { |
126 |
- tc-export CC |
127 |
- |
128 |
- local jit_backend |
129 |
- if use jit; then |
130 |
- jit_backend='--jit-backend=' |
131 |
- |
132 |
- # We only need the explicit sse2 switch for x86. |
133 |
- # On other arches we can rely on autodetection which uses |
134 |
- # compiler macros. Plus, --jit-backend= doesn't accept all |
135 |
- # the modern values... |
136 |
- |
137 |
- if use x86; then |
138 |
- if use cpu_flags_x86_sse2; then |
139 |
- jit_backend+=x86 |
140 |
- else |
141 |
- jit_backend+=x86-without-sse2 |
142 |
- fi |
143 |
- else |
144 |
- jit_backend+=auto |
145 |
- fi |
146 |
- fi |
147 |
- |
148 |
- local args=( |
149 |
- --shared |
150 |
- $(usex jit -Ojit -O2) |
151 |
- $(usex shadowstack --gcrootfinder=shadowstack '') |
152 |
- $(usex sandbox --sandbox '') |
153 |
- |
154 |
- ${jit_backend} |
155 |
- --make-jobs=$(makeopts_jobs) |
156 |
- |
157 |
- pypy/goal/targetpypystandalone |
158 |
- ) |
159 |
- |
160 |
- # Avoid linking against libraries disabled by use flags |
161 |
- local opts=( |
162 |
- bzip2:bz2 |
163 |
- ncurses:_minimal_curses |
164 |
- ) |
165 |
- |
166 |
- local opt |
167 |
- for opt in "${opts[@]}"; do |
168 |
- local flag=${opt%:*} |
169 |
- local mod=${opt#*:} |
170 |
- |
171 |
- args+=( |
172 |
- $(usex ${flag} --withmod --withoutmod)-${mod} |
173 |
- ) |
174 |
- done |
175 |
- |
176 |
- local interp=( "${PYTHON}" ) |
177 |
- if use low-memory; then |
178 |
- interp=( env PYPY_GC_MAX_DELTA=200MB |
179 |
- "${PYTHON}" --jit loop_longevity=300 ) |
180 |
- fi |
181 |
- |
182 |
- set -- "${interp[@]}" rpython/bin/rpython --batch "${args[@]}" |
183 |
- echo -e "\033[1m${@}\033[0m" |
184 |
- "${@}" || die "compile error" |
185 |
- |
186 |
- # Exception occurred: |
187 |
- # File "/tmp/1/pypy3-2.4.0-src/pypy/config/makerestdoc.py", line 199, in config_role |
188 |
- # assert txt.check() |
189 |
- # AssertionError |
190 |
- #use doc && emake -C pypy/doc/ html |
191 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" |
192 |
-} |
193 |
- |
194 |
-src_test() { |
195 |
- # (unset) |
196 |
- local -x PYTHONDONTWRITEBYTECODE |
197 |
- |
198 |
- # Test runner requires Python 2 too. However, it spawns PyPy3 |
199 |
- # internally so that we end up testing the correct interpreter. |
200 |
- "${PYTHON}" ./pypy/test_all.py --pypy=./pypy-c lib-python || die |
201 |
-} |
202 |
- |
203 |
-src_install() { |
204 |
- einfo "Installing PyPy ..." |
205 |
- insinto "/usr/$(get_libdir)/pypy3" |
206 |
- doins -r include lib_pypy lib-python pypy-c libpypy-c.so |
207 |
- fperms a+x ${INSDESTTREE}/pypy-c ${INSDESTTREE}/libpypy-c.so |
208 |
- pax-mark m "${ED%/}${INSDESTTREE}/pypy-c" "${ED%/}${INSDESTTREE}/libpypy-c.so" |
209 |
- dosym ../$(get_libdir)/pypy3/pypy-c /usr/bin/pypy3 |
210 |
- dodoc README.rst |
211 |
- |
212 |
- if ! use gdbm; then |
213 |
- rm -r "${ED%/}${INSDESTTREE}"/lib_pypy/gdbm.py \ |
214 |
- "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_gdbm.py || die |
215 |
- fi |
216 |
- if ! use sqlite; then |
217 |
- rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/sqlite3 \ |
218 |
- "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py \ |
219 |
- "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_sqlite.py || die |
220 |
- fi |
221 |
- if ! use tk; then |
222 |
- rm -r "${ED%/}${INSDESTTREE}"/lib-python/*3/{idlelib,tkinter} \ |
223 |
- "${ED%/}${INSDESTTREE}"/lib_pypy/_tkinter \ |
224 |
- "${ED%/}${INSDESTTREE}"/lib-python/*3/test/test_{tcl,tk,ttk*}.py || die |
225 |
- fi |
226 |
- |
227 |
- # Install docs |
228 |
- #use doc && dohtml -r pypy/doc/_build/html/ |
229 |
- |
230 |
- einfo "Generating caches and byte-compiling ..." |
231 |
- |
232 |
- local -x PYTHON=${ED%/}${INSDESTTREE}/pypy-c |
233 |
- local -x LD_LIBRARY_PATH="${ED%/}${INSDESTTREE}" |
234 |
- # we can't use eclass function since PyPy is dumb and always gives |
235 |
- # paths relative to the interpreter |
236 |
- local PYTHON_SITEDIR=${EPREFIX}/usr/$(get_libdir)/pypy3/site-packages |
237 |
- python_export pypy3 EPYTHON |
238 |
- |
239 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
240 |
- python_domodule epython.py |
241 |
- |
242 |
- # Generate Grammar and PatternGrammar pickles. |
243 |
- "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \ |
244 |
- || die "Generation of Grammar and PatternGrammar pickles failed" |
245 |
- |
246 |
- # Generate cffi cache |
247 |
- # Please keep in sync with pypy/tool/release/package.py! |
248 |
- "${PYTHON}" -c "import syslog" || die "Failed to import syslog (cffi)" |
249 |
- if use gdbm; then |
250 |
- "${PYTHON}" -c "import _gdbm" || die "Failed to import gdbm (cffi)" |
251 |
- fi |
252 |
- if use ncurses; then |
253 |
- "${PYTHON}" -c "import _curses" || die "Failed to import _curses (cffi)" |
254 |
- fi |
255 |
- if use sqlite; then |
256 |
- "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3 (cffi)" |
257 |
- fi |
258 |
- if use tk; then |
259 |
- "${PYTHON}" -c "import _tkinter" || die "Failed to import _tkinter (cffi)" |
260 |
- fi |
261 |
- |
262 |
- # Cleanup temporary objects |
263 |
- find "${ED%/}${INSDESTTREE}" -name "_cffi_*.[co]" -delete || die |
264 |
- find "${ED%/}${INSDESTTREE}" -type d -empty -delete || die |
265 |
- |
266 |
- # compile the installed modules |
267 |
- python_optimize "${ED%/}${INSDESTTREE}" |
268 |
-} |