1 |
commit: 2f4e7e05a61966935a24da9f36fdddd7c09af7aa |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 12 13:59:55 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 12 15:17:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f4e7e05 |
7 |
|
8 |
dev-python/pypy3-exe: Bump to 7.3.6_rc3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3-exe/Manifest | 2 + |
13 |
dev-python/pypy3-exe/pypy3-exe-7.3.6_rc3.ebuild | 166 ++++++++++++++++++++++++ |
14 |
2 files changed, 168 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pypy3-exe/Manifest b/dev-python/pypy3-exe/Manifest |
17 |
index 70b86a08bb9..ed17644ac38 100644 |
18 |
--- a/dev-python/pypy3-exe/Manifest |
19 |
+++ b/dev-python/pypy3-exe/Manifest |
20 |
@@ -2,5 +2,7 @@ DIST pypy3.7-gentoo-patches-7.3.5.tar.xz 8164 BLAKE2B 0f8707fda16c0358c1d3a2a60d |
21 |
DIST pypy3.7-v7.3.5-src.tar.bz2 25350766 BLAKE2B 34d5c83284271b184f71492dbd65b8760cc0fcdec71e41ef48b9561280dd67ef4c37fdd70759d0b95114d127446fc0ea5d04feb99022c1a725233862b2028834 SHA512 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b |
22 |
DIST pypy3.8-gentoo-patches-7.3.6rc1.tar.xz 4660 BLAKE2B 2a1fff331707a29dfb232ce4c2c6d3cada127b4452036172c3aac7579d89b8e0d4ea41300ffcadf0ec04b9cde32044371d55d225a477f2178dddb03642aa569b SHA512 bb781369d4e0dd387659fc474c7a23d8c54ab88477fdd007d3552c95e870a1896a0628dbba876e870956c5a1efeb52efbfd343a08f8a70a4515f41b1dc8ed60d |
23 |
DIST pypy3.8-gentoo-patches-7.3.6rc2.tar.xz 4380 BLAKE2B 1ad68c088d4888d3579c0b48789be3a95413ab8f11d971f9f616a1701ceed2b8eba595612e28dbbdbc1732e4f8a7cd08cbbb89cdc413d1a3e9eabbcd78fdde76 SHA512 c2d68610b78ed33aaa67ce5244d289409256f66f2505ac19f0a679c0c10e6024993bbc7d37a59547daac38d321653b8b1a63c55e3f52d1409969f0961842fdd7 |
24 |
+DIST pypy3.8-gentoo-patches-7.3.6rc3.tar.xz 4380 BLAKE2B 03159baf9fb33b65406df47272940cf6adfe2891994787b057d6925edd74063c4f1e4ac115b17d7a41a5d220e9ba27a68f4138792624cc50c2c6aee3a6d385ff SHA512 d88b3f97880735d84746970ef6ac05babde9d88ae6740411a646cec8618816d982a99ccf0628b73690cacc5a4ac9485160242c85756adad75ab7e3ad860b4e42 |
25 |
DIST pypy3.8-v7.3.6rc1-src.tar.bz2 24320127 BLAKE2B 920738d1d9a346dca8e76602fc5a1502ff6f610897e1f5b841b5207a32f82c52770684ba4ea076209e18b664cb9ba5df555a21f838ae581b436cbff9e2adb506 SHA512 334baf973397f8068137382c29632afd1288b76b57f21047bef59397d2718d8c420ba68acc2f1082501aadf7fbf8ee6a9fa86405c2a54d720a9a02dd7a7371aa |
26 |
DIST pypy3.8-v7.3.6rc2-src.tar.bz2 24350986 BLAKE2B fe167b7e1f4f81e1737220bb679874a1e0faa8605b0ec7d10db275c08226e12f8fcff5b958a5a2c42efba5125d88dea150b707441af13bd9b7ef0c9ef36d9c1b SHA512 98715c4053d995a442877f93b32ecb976ffc4160df869d35843718bacfd97d2bbd697f85b5961c420f8130d22e64d740d8d180a4f9ff802250897b4b8c216a6a |
27 |
+DIST pypy3.8-v7.3.6rc3-src.tar.bz2 24374611 BLAKE2B 5b04bf5fa2f3f2f25a837add74ad716146681e1203ccdb915eed6d1f7f70cd9cb73426f63d310fd76fef2daf6537137d99fa14483886b2cf9946e979243de26f SHA512 872252ff8f090523d79c8d9acec07390587ab38075f35d25f2010ed5ea85537aaa9acb14d049a0a8059757f6c2c1411e9b5e23fec0b1ec2cfcca70e82e6e1c8f |
28 |
|
29 |
diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.6_rc3.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.6_rc3.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..89b01acb0ce |
32 |
--- /dev/null |
33 |
+++ b/dev-python/pypy3-exe/pypy3-exe-7.3.6_rc3.ebuild |
34 |
@@ -0,0 +1,166 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+# pypy3 needs to be built using python 2 |
41 |
+PYTHON_COMPAT=( python2_7 ) |
42 |
+inherit check-reqs pax-utils python-any-r1 toolchain-funcs |
43 |
+ |
44 |
+PYPY_PV=${PV%_p*} |
45 |
+MY_P=pypy3.8-v${PYPY_PV/_} |
46 |
+PATCHSET="pypy3.8-gentoo-patches-${PV/_}" |
47 |
+ |
48 |
+DESCRIPTION="PyPy3 executable (build from source)" |
49 |
+HOMEPAGE="https://www.pypy.org/" |
50 |
+SRC_URI="https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 |
51 |
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
52 |
+S="${WORKDIR}/${MY_P}-src" |
53 |
+ |
54 |
+LICENSE="MIT" |
55 |
+SLOT="${PYPY_PV}" |
56 |
+KEYWORDS="" |
57 |
+IUSE="bzip2 +jit low-memory ncurses cpu_flags_x86_sse2" |
58 |
+ |
59 |
+RDEPEND=">=sys-libs/zlib-1.1.3:0= |
60 |
+ dev-libs/libffi:0= |
61 |
+ virtual/libintl:0= |
62 |
+ dev-libs/expat:0= |
63 |
+ bzip2? ( app-arch/bzip2:0= ) |
64 |
+ ncurses? ( sys-libs/ncurses:0= ) |
65 |
+ !dev-python/pypy3-exe-bin:${PYPY_PV}" |
66 |
+DEPEND="${RDEPEND}" |
67 |
+BDEPEND=" |
68 |
+ low-memory? ( dev-python/pypy ) |
69 |
+ !low-memory? ( |
70 |
+ || ( |
71 |
+ dev-python/pypy |
72 |
+ dev-lang/python:2.7 |
73 |
+ ) |
74 |
+ )" |
75 |
+ |
76 |
+check_env() { |
77 |
+ if use low-memory; then |
78 |
+ CHECKREQS_MEMORY="1750M" |
79 |
+ use amd64 && CHECKREQS_MEMORY="3500M" |
80 |
+ else |
81 |
+ CHECKREQS_MEMORY="3G" |
82 |
+ use amd64 && CHECKREQS_MEMORY="6G" |
83 |
+ fi |
84 |
+ |
85 |
+ check-reqs_pkg_pretend |
86 |
+} |
87 |
+ |
88 |
+pkg_pretend() { |
89 |
+ [[ ${MERGE_TYPE} != binary ]] && check_env |
90 |
+} |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
94 |
+ check_env |
95 |
+ |
96 |
+ # unset to allow forcing pypy below :) |
97 |
+ use low-memory && EPYTHON= |
98 |
+ if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] && |
99 |
+ { has_version -b dev-python/pypy || |
100 |
+ has_version -b dev-python/pypy-bin; } |
101 |
+ then |
102 |
+ einfo "Using PyPy to perform the translation." |
103 |
+ 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 "dev-python/pypy and ensure that EPYTHON variable is unset." |
108 |
+ python-any-r1_pkg_setup |
109 |
+ fi |
110 |
+ fi |
111 |
+} |
112 |
+ |
113 |
+src_prepare() { |
114 |
+ local PATCHES=( |
115 |
+ "${WORKDIR}/${PATCHSET}" |
116 |
+ ) |
117 |
+ default |
118 |
+} |
119 |
+ |
120 |
+src_configure() { |
121 |
+ tc-export CC |
122 |
+ |
123 |
+ local jit_backend |
124 |
+ if use jit; then |
125 |
+ jit_backend='--jit-backend=' |
126 |
+ |
127 |
+ # We only need the explicit sse2 switch for x86. |
128 |
+ # On other arches we can rely on autodetection which uses |
129 |
+ # compiler macros. Plus, --jit-backend= doesn't accept all |
130 |
+ # the modern values... |
131 |
+ |
132 |
+ if use x86; then |
133 |
+ if use cpu_flags_x86_sse2; then |
134 |
+ jit_backend+=x86 |
135 |
+ else |
136 |
+ jit_backend+=x86-without-sse2 |
137 |
+ fi |
138 |
+ else |
139 |
+ jit_backend+=auto |
140 |
+ fi |
141 |
+ fi |
142 |
+ |
143 |
+ local args=( |
144 |
+ --no-shared |
145 |
+ $(usex jit -Ojit -O2) |
146 |
+ |
147 |
+ ${jit_backend} |
148 |
+ |
149 |
+ pypy/goal/targetpypystandalone |
150 |
+ ) |
151 |
+ |
152 |
+ # Avoid linking against libraries disabled by use flags |
153 |
+ local opts=( |
154 |
+ bzip2:bz2 |
155 |
+ ncurses:_minimal_curses |
156 |
+ ) |
157 |
+ |
158 |
+ local opt |
159 |
+ for opt in "${opts[@]}"; do |
160 |
+ local flag=${opt%:*} |
161 |
+ local mod=${opt#*:} |
162 |
+ |
163 |
+ args+=( |
164 |
+ $(usex ${flag} --withmod --withoutmod)-${mod} |
165 |
+ ) |
166 |
+ done |
167 |
+ |
168 |
+ local interp=( "${EPYTHON}" ) |
169 |
+ if use low-memory; then |
170 |
+ interp=( env PYPY_GC_MAX_DELTA=200MB |
171 |
+ "${EPYTHON}" --jit loop_longevity=300 ) |
172 |
+ fi |
173 |
+ |
174 |
+ if [[ ${EPYTHON} != pypy ]]; then |
175 |
+ # reuse bundled pycparser to avoid external dep |
176 |
+ mkdir -p "${T}"/pymod/cffi || die |
177 |
+ : > "${T}"/pymod/cffi/__init__.py || die |
178 |
+ cp -r lib_pypy/cffi/_pycparser "${T}"/pymod/cffi/ || die |
179 |
+ local -x PYTHONPATH=${T}/pymod:${PYTHONPATH} |
180 |
+ fi |
181 |
+ |
182 |
+ # translate into the C sources |
183 |
+ # we're going to build them ourselves since otherwise pypy does not |
184 |
+ # free up the unneeded memory before spawning the compiler |
185 |
+ set -- "${interp[@]}" rpython/bin/rpython --batch --source "${args[@]}" |
186 |
+ echo -e "\033[1m${@}\033[0m" |
187 |
+ "${@}" || die "translation failed" |
188 |
+} |
189 |
+ |
190 |
+src_compile() { |
191 |
+ emake -C "${T}"/usession*-0/testing_1 |
192 |
+} |
193 |
+ |
194 |
+src_install() { |
195 |
+ cd "${T}"/usession*-0 || die |
196 |
+ newbin testing_1/pypy3-c pypy3-c-${PYPY_PV} |
197 |
+ insinto /usr/include/pypy3.8/${PYPY_PV} |
198 |
+ doins pypy_*.h |
199 |
+ pax-mark m "${ED}/usr/bin/pypy3-c-${PYPY_PV}" |
200 |
+} |