1 |
commit: 227af9169e3881b0f8b5740867467a95888f3d4d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 11 09:28:56 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 11 09:31:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=227af916 |
7 |
|
8 |
dev-python/pypy3-exe: Bump to 7.3.2_rc1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3-exe/Manifest | 1 + |
13 |
dev-python/pypy3-exe/pypy3-exe-7.3.2_rc1.ebuild | 151 ++++++++++++++++++++++++ |
14 |
2 files changed, 152 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest |
17 |
index c119fbd7162..0b16f02d6f2 100644 |
18 |
--- a/dev-python/pypy3-exe/Manifest |
19 |
+++ b/dev-python/pypy3-exe/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST pypy3.6-v7.3.0-src.tar.bz2 21937786 BLAKE2B c53ac32a9cca1c4624160eae9f11b5705a59613f1e5100fbb0ee86118de5a7845b8fa5087165d7f5a077d20337dfca14a1c7eadbe768995e20e249ec271ac10d SHA512 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 |
22 |
DIST pypy3.6-v7.3.1-src.tar.bz2 22712809 BLAKE2B 4250b3fe98c611b9635319c106b80e88ab469eab5f883babb738e175e7b7adc22c85f8ef3fdce1cdc127b521beef8d6c7862e188d8c8889c39f90136d6bbe374 SHA512 f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 |
23 |
+DIST pypy3.6-v7.3.2rc1-src.tar.bz2 22730858 BLAKE2B 41a0702d0077c0f546998b858bc8b76226fe8903f4819497aa284231edcb32bc8b047b0a2a35bacfb18ea11fb85de98b95998276c22a3f0dc716b16871b35a3a SHA512 1a6f93f7e767b0db5c40c1e06cadd781c6ddfb02ec86aa61a37f649fe1aa5cd71f7857052e5b48092e3bf8b5cbef6d6401097bf4c4e80c62f7dbdffcd20b70c0 |
24 |
|
25 |
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.2_rc1.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.2_rc1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..24b904343e1 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2_rc1.ebuild |
30 |
@@ -0,0 +1,151 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+# pypy3 needs to be built using python 2 |
37 |
+PYTHON_COMPAT=( python2_7 ) |
38 |
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
39 |
+ |
40 |
+MY_P=pypy3.6-v${PV/_/} |
41 |
+DESCRIPTION="PyPy3 executable (build from source)" |
42 |
+HOMEPAGE="https://pypy.org/" |
43 |
+SRC_URI="https://downloads.python.org/pypy/${MY_P}-src.tar.bz2" |
44 |
+S="${WORKDIR}/${MY_P}-src" |
45 |
+ |
46 |
+LICENSE="MIT" |
47 |
+SLOT="${PV}" |
48 |
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
49 |
+IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" |
50 |
+ |
51 |
+RDEPEND=">=sys-libs/zlib-1.1.3:0= |
52 |
+ dev-libs/libffi:0= |
53 |
+ virtual/libintl:0= |
54 |
+ dev-libs/expat:0= |
55 |
+ bzip2? ( app-arch/bzip2:0= ) |
56 |
+ ncurses? ( sys-libs/ncurses:0= ) |
57 |
+ !dev-python/pypy3-exe-bin:${PV}" |
58 |
+DEPEND="${RDEPEND}" |
59 |
+BDEPEND=" |
60 |
+ low-memory? ( dev-python/pypy ) |
61 |
+ !low-memory? ( |
62 |
+ || ( |
63 |
+ dev-python/pypy |
64 |
+ ( |
65 |
+ dev-lang/python:2.7 |
66 |
+ dev-python/pycparser[python_targets_python2_7(-),python_single_target_python2_7(+)] |
67 |
+ ) |
68 |
+ ) |
69 |
+ )" |
70 |
+ |
71 |
+check_env() { |
72 |
+ if use low-memory; then |
73 |
+ CHECKREQS_MEMORY="1750M" |
74 |
+ use amd64 && CHECKREQS_MEMORY="3500M" |
75 |
+ else |
76 |
+ CHECKREQS_MEMORY="3G" |
77 |
+ use amd64 && CHECKREQS_MEMORY="6G" |
78 |
+ fi |
79 |
+ |
80 |
+ check-reqs_pkg_pretend |
81 |
+} |
82 |
+ |
83 |
+pkg_pretend() { |
84 |
+ [[ ${MERGE_TYPE} != binary ]] && check_env |
85 |
+} |
86 |
+ |
87 |
+pkg_setup() { |
88 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
89 |
+ check_env |
90 |
+ |
91 |
+ # unset to allow forcing pypy below :) |
92 |
+ use low-memory && EPYTHON= |
93 |
+ if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] && |
94 |
+ { has_version -b dev-python/pypy || |
95 |
+ has_version -b dev-python/pypy-bin; } |
96 |
+ then |
97 |
+ einfo "Using PyPy to perform the translation." |
98 |
+ EPYTHON=pypy |
99 |
+ else |
100 |
+ einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" |
101 |
+ einfo "recommends using PyPy for that. If you wish to do so, please install" |
102 |
+ einfo "dev-python/pypy and ensure that EPYTHON variable is unset." |
103 |
+ python-any-r1_pkg_setup |
104 |
+ fi |
105 |
+ fi |
106 |
+} |
107 |
+ |
108 |
+src_configure() { |
109 |
+ tc-export CC |
110 |
+ |
111 |
+ local jit_backend |
112 |
+ if use jit; then |
113 |
+ jit_backend='--jit-backend=' |
114 |
+ |
115 |
+ # We only need the explicit sse2 switch for x86. |
116 |
+ # On other arches we can rely on autodetection which uses |
117 |
+ # compiler macros. Plus, --jit-backend= doesn't accept all |
118 |
+ # the modern values... |
119 |
+ |
120 |
+ if use x86; then |
121 |
+ if use cpu_flags_x86_sse2; then |
122 |
+ jit_backend+=x86 |
123 |
+ else |
124 |
+ jit_backend+=x86-without-sse2 |
125 |
+ fi |
126 |
+ else |
127 |
+ jit_backend+=auto |
128 |
+ fi |
129 |
+ fi |
130 |
+ |
131 |
+ local args=( |
132 |
+ --no-shared |
133 |
+ $(usex jit -Ojit -O2) |
134 |
+ |
135 |
+ ${jit_backend} |
136 |
+ |
137 |
+ pypy/goal/targetpypystandalone |
138 |
+ ) |
139 |
+ |
140 |
+ # Avoid linking against libraries disabled by use flags |
141 |
+ local opts=( |
142 |
+ bzip2:bz2 |
143 |
+ ncurses:_minimal_curses |
144 |
+ ) |
145 |
+ |
146 |
+ local opt |
147 |
+ for opt in "${opts[@]}"; do |
148 |
+ local flag=${opt%:*} |
149 |
+ local mod=${opt#*:} |
150 |
+ |
151 |
+ args+=( |
152 |
+ $(usex ${flag} --withmod --withoutmod)-${mod} |
153 |
+ ) |
154 |
+ done |
155 |
+ |
156 |
+ local interp=( "${EPYTHON}" ) |
157 |
+ if use low-memory; then |
158 |
+ interp=( env PYPY_GC_MAX_DELTA=200MB |
159 |
+ "${EPYTHON}" --jit loop_longevity=300 ) |
160 |
+ fi |
161 |
+ |
162 |
+ # translate into the C sources |
163 |
+ # we're going to make them ourselves since otherwise pypy does not |
164 |
+ # free up the unneeded memory before spawning the compiler |
165 |
+ set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
166 |
+ echo -e "\033[1m${@}\033[0m" |
167 |
+ "${@}" || die "translation failed" |
168 |
+} |
169 |
+ |
170 |
+src_compile() { |
171 |
+ emake -C "${T}"/usession*-0/testing_1 |
172 |
+} |
173 |
+ |
174 |
+src_install() { |
175 |
+ local dest=/usr/lib/pypy3.6 |
176 |
+ exeinto "${dest}" |
177 |
+ newexe "${T}"/usession*-0/testing_1/pypy3-c pypy3-c-${PV} |
178 |
+ insinto "${dest}"/include/${PV} |
179 |
+ doins include/pypy_* |
180 |
+ pax-mark m "${ED}${dest}/pypy3-c-${PV}" |
181 |
+} |