1 |
commit: a66de70174f72fa1a45cfa2527ae3d1809e761a1 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 24 13:49:48 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 24 13:50:20 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a66de701 |
7 |
|
8 |
dev-lang/python: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-lang/python/Manifest | 3 - |
13 |
dev-lang/python/python-3.10.1-r2.ebuild | 376 --------------------------- |
14 |
dev-lang/python/python-3.11.0_alpha3.ebuild | 383 ---------------------------- |
15 |
3 files changed, 762 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
18 |
index afda926b044b..6120be2f30ff 100644 |
19 |
--- a/dev-lang/python/Manifest |
20 |
+++ b/dev-lang/python/Manifest |
21 |
@@ -6,8 +6,6 @@ DIST Python-3.10.1.tar.xz 18775460 BLAKE2B d2dbf875ef5f9cee6dfd66e2d2489b884813c |
22 |
DIST Python-3.10.1.tar.xz.asc 833 BLAKE2B a5678c522b486a246993616ee36ddb3f74a093fb5729d8d2da3cfc4de5c3e1fcf3f4f55504b7bbf929050204d22a89ff3c7750b599034a3d5c941666f54fcad4 SHA512 645d5f40e6e80a590923a48763f20dea7da3f3eea5825bb79e08618d81d1b8eee0ddee2b57503321a584280536e0671e4913e5ad450568fbbb44509c01d3907d |
23 |
DIST Python-3.10.2.tar.xz 18780936 BLAKE2B ce202f7b45858b88ffdefe8217422fa9dccccc58000c6f3d40c9791d28ab58f67fa033b5102cacaf0ccec5524510becec9870c9bf5238b78203a0a354e8f526c SHA512 215a7159face84788fe547c1e2689b8d0ae510275157cf01636bef2902d0ff465f844eb0328c9f39fd1cd03a1d1736d4cf258992f2788e492a801a372032c08b |
24 |
DIST Python-3.10.2.tar.xz.asc 833 BLAKE2B ff3b1f8c1c62e75a00ac70bbe3a2e87406f0f44fba8bfa1ea5c0d8b8175a8720af62c57664bf50fa5f7ec7caeeb2669c17917e457daf43755f1583e92eb410ba SHA512 086aeaa999d3005cc1f9057d90230c7a9e65d80f436febf16b0e8ba6f49645870ef21170ca1af50c8e2f51e6f46338cfad73a2d91320ad4a3315a2ae87eb70b4 |
25 |
-DIST Python-3.11.0a3.tar.xz 18775072 BLAKE2B 5d1650e2258d0f9fe4d5b3ab09b94e2269844a44a20f7b6425097755200fb022d3c1df8a59bf147dfd7759766769ca9c88d3c202667ff275c02a3a73eb79daa8 SHA512 69fe7a4c80ab4e7674685b072b9dea435dc7968306a1ce8b1356a1bb9b998ed6b9e35c17b5ecae3c490f5c71f524fa791bd996431d5dac550773cf5e8362a7ba |
26 |
-DIST Python-3.11.0a3.tar.xz.asc 833 BLAKE2B ed366bd939f7168b0ef41ef991ee74c142f4e8d8118fcc67c149f7ac5e70488fe1e9822ad79eb47576749902f4c28edd4584ade1aa2796376335c54b323a64ef SHA512 890d9092d2a155d65588f3a8f34e93b6e3e549b0507af856ffae1fbb3a2f3f1446f6bc69684c23116bed4e3a547a331173e83c3d52a7bff8caa368f955fe293d |
27 |
DIST Python-3.11.0a4.tar.xz 18805548 BLAKE2B 3315ee4392c3a7312273c705779415f5456e3d19d5e7b4008a67b4ea68a9d8aac2ecb06524b856a3522723f628ff687b01f2a5a48a04c24b4883ba357c30d685 SHA512 721ed64f3fde360e9eae6d8f8a046091c7c08f14c860572ac868132dffa4ae0a46f3f57a3872fcc096551a66e4fa3b1c87f77baa52d8524da026bbdaa74837ec |
28 |
DIST Python-3.11.0a4.tar.xz.asc 833 BLAKE2B fd12a6381eb137ef99ed508f8a704b4794d554d8e62a3febd8f87f226ad86efb1f5e5607d088fdba33ee2215118bb05e2357bad5ceba5159a76821fc74b079db SHA512 21e56475186c3e6a029a51799cf8c86ac74d3810b5aa76e4b4bc063bacb2624b21b6ec3450dd9f91722162e57390617efb521351b11d262d6583655081277611 |
29 |
DIST Python-3.6.15.tar.xz 17223796 BLAKE2B c139c6f93ea70ad898d5626dfa964280a14de9676f0d9d55668ad91618b1ba330874cbba8d6526a87e53b585ff34e3bf242613ca3fb17ee60f362a9676306c7d SHA512 f1894d704c91669d94ec83b5631288bf1e0c73ddcf33cea0977575f262eb672caebc8ac00e34e9b99c321c19cc9a71d6081fa957bb8e23cf5bfba50f345145ef |
30 |
@@ -24,7 +22,6 @@ DIST python-gentoo-patches-2.7.18_p13.tar.xz 33296 BLAKE2B 91b711458aff4f6337ee1 |
31 |
DIST python-gentoo-patches-3.10.0_p1.tar.xz 10068 BLAKE2B 1c9817b449831559f0a0b722c02a5f55d94b3dfde98e5882c1403fe24a4addf7074ab39c09b91cff6fd7ace2e4b6e8ed899d9a0b9ffd6612ce315c4c192bd309 SHA512 39aa41dbf17b6dc5255491c75031a3dae6962b44125e426dbfdce365a6533c5dae9856b1fff8016a189124b7cff72d2665ce99da344c2f9dff005ba685e8c2c4 |
32 |
DIST python-gentoo-patches-3.10.1.tar.xz 8580 BLAKE2B 58d165c6c21a6736787d77d5bbeb770adff7f3729a47f62d0b7c4f0982c15c6a50b326be33638f3fca5574936cbce35d26e9ce0868faa3b5a3412b30586b066a SHA512 f86adf4e5195b1eb13cedbf24c1956964ce56745f0524a62b1e7c6baf74c6f1802e05cf4c08519b147579945c0526ff0a0ffc01cfb4372c0ec4f403b25e81012 |
33 |
DIST python-gentoo-patches-3.10.2.tar.xz 8584 BLAKE2B 4328b21d7b8b0e39d0d6761c3a52cb5369aff7dfa890a1496fe5c01720bd9d8ef38d915188ad6079158104f8acf5847e220d58c092a9682615aa366dce9f20d2 SHA512 063c53022525cea988a9a27643bf0b2b5e674259de487826ee3b3cbca50c369857908d53cee9be59adf09db7ac0dcaed65639c40204ff4519b812b215de588a6 |
34 |
-DIST python-gentoo-patches-3.11.0a3.tar.xz 3656 BLAKE2B a80380a2a64822bb63ceeec80c58d5482c4d2719d50e8091fe2a6deb199de3f22a4d794a76cb95792cc5b49567176a6e2e8bfc213e593782ec7f4211d2e00837 SHA512 71247cedf34cd195237d1eaae9cd3a24159e9631b726bf2e4d22840d0f166b12557657eba0686df7b8a8d272c52a584827ea4b7b62e1ce3b56eda4d9a2e05927 |
35 |
DIST python-gentoo-patches-3.11.0a4.tar.xz 3652 BLAKE2B 19beab7c85e93414f392f2fda89a5ec0fc0a8339bf3804cb88c349cbb57b2c2cd6338d59307a950abe387958cbe7d3b958a73004b5fc51788235660aed3dea6a SHA512 97745cc7dd9c0849f1e5cc577322878f831e7af0b45ef6d23e0cee1b02879386bbf22d84ff73b8a5f70f2b193788f3dff003ddc248bd8ea19779c371fe706bdc |
36 |
DIST python-gentoo-patches-3.6.15.tar.xz 15300 BLAKE2B f49fd96f6ad1a1c94fea6b83acd229a81754b86061e243044ead4b9a9d5122a2e43b270b68722c359c084c05a566a3ad70aa46588ab7a005ee560ee118b92b8b SHA512 cc33491a33f3f1d990cf494d53b91b74db761142e8aebe1bd4b128ef10a268ff945e5ba08daad39cee095612a8e52265d6988873ecf9c073377cbbc10735aa39 |
37 |
DIST python-gentoo-patches-3.7.12_p1.tar.xz 19112 BLAKE2B e9964244af3db544dd6e96d85ca4bc24d7131b48eda85df5bafa3fb36474a024cecbbf4b27324e1f35f76ae6a1aed31dd7896e831b79b574b45a4371afcc7e5b SHA512 9ec996c2904f99bd6651ed1b700eabd91f2b82b1e9e0f3d9572243886a9c7139bf8ac2af04169485d3ca6339e1a87044cba203f6f0aee9609d2a1d53c812548d |
38 |
|
39 |
diff --git a/dev-lang/python/python-3.10.1-r2.ebuild b/dev-lang/python/python-3.10.1-r2.ebuild |
40 |
deleted file mode 100644 |
41 |
index 9731ebca9cc9..000000000000 |
42 |
--- a/dev-lang/python/python-3.10.1-r2.ebuild |
43 |
+++ /dev/null |
44 |
@@ -1,376 +0,0 @@ |
45 |
-# Copyright 1999-2022 Gentoo Authors |
46 |
-# Distributed under the terms of the GNU General Public License v2 |
47 |
- |
48 |
-EAPI="7" |
49 |
-WANT_LIBTOOL="none" |
50 |
- |
51 |
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
52 |
- python-utils-r1 toolchain-funcs verify-sig |
53 |
- |
54 |
-MY_PV=${PV/_rc/rc} |
55 |
-MY_P="Python-${MY_PV%_p*}" |
56 |
-PYVER=$(ver_cut 1-2) |
57 |
-PATCHSET="python-gentoo-patches-${MY_PV}" |
58 |
- |
59 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
60 |
-HOMEPAGE="https://www.python.org/" |
61 |
-SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz |
62 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
63 |
- verify-sig? ( |
64 |
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc |
65 |
- )" |
66 |
-S="${WORKDIR}/${MY_P}" |
67 |
- |
68 |
-LICENSE="PSF-2" |
69 |
-SLOT="${PYVER}" |
70 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
71 |
-IUSE="bluetooth build examples gdbm hardened lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml" |
72 |
-RESTRICT="!test? ( test )" |
73 |
- |
74 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
75 |
-# If you need to apply a patch which requires python for bootstrapping, please |
76 |
-# run the bootstrap code on your dev box and include the results in the |
77 |
-# patchset. See bug 447752. |
78 |
- |
79 |
-RDEPEND="app-arch/bzip2:= |
80 |
- app-arch/xz-utils:= |
81 |
- dev-lang/python-exec[python_targets_python3_10(-)] |
82 |
- dev-libs/libffi:= |
83 |
- sys-apps/util-linux:= |
84 |
- >=sys-libs/zlib-1.1.3:= |
85 |
- virtual/libcrypt:= |
86 |
- virtual/libintl |
87 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
88 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
89 |
- readline? ( >=sys-libs/readline-4.1:= ) |
90 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
91 |
- ssl? ( >=dev-libs/openssl-1.1.1:= ) |
92 |
- tk? ( |
93 |
- >=dev-lang/tcl-8.0:= |
94 |
- >=dev-lang/tk-8.0:= |
95 |
- dev-tcltk/blt:= |
96 |
- dev-tcltk/tix |
97 |
- ) |
98 |
- xml? ( >=dev-libs/expat-2.1:= ) |
99 |
- !!<sys-apps/sandbox-2.21" |
100 |
-# bluetooth requires headers from bluez |
101 |
-DEPEND="${RDEPEND} |
102 |
- bluetooth? ( net-wireless/bluez ) |
103 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
104 |
-# autoconf-archive needed to eautoreconf |
105 |
-BDEPEND=" |
106 |
- sys-devel/autoconf-archive |
107 |
- virtual/awk |
108 |
- virtual/pkgconfig |
109 |
- verify-sig? ( sec-keys/openpgp-keys-python ) |
110 |
- !sys-devel/gcc[libffi(-)]" |
111 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
112 |
- |
113 |
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc |
114 |
- |
115 |
-# large file tests involve a 2.5G file being copied (duplicated) |
116 |
-CHECKREQS_DISK_BUILD=5500M |
117 |
- |
118 |
-pkg_pretend() { |
119 |
- use test && check-reqs_pkg_pretend |
120 |
-} |
121 |
- |
122 |
-pkg_setup() { |
123 |
- use test && check-reqs_pkg_setup |
124 |
-} |
125 |
- |
126 |
-src_unpack() { |
127 |
- if use verify-sig; then |
128 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
129 |
- fi |
130 |
- default |
131 |
-} |
132 |
- |
133 |
-src_prepare() { |
134 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
135 |
- rm -fr Modules/expat || die |
136 |
- rm -fr Modules/_ctypes/libffi* || die |
137 |
- rm -fr Modules/zlib || die |
138 |
- |
139 |
- local PATCHES=( |
140 |
- "${WORKDIR}/${PATCHSET}" |
141 |
- ) |
142 |
- |
143 |
- default |
144 |
- |
145 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
146 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
147 |
- |
148 |
- # force correct number of jobs |
149 |
- # https://bugs.gentoo.org/737660 |
150 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
151 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
152 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
153 |
- |
154 |
- eautoreconf |
155 |
-} |
156 |
- |
157 |
-src_configure() { |
158 |
- local disable |
159 |
- # disable automagic bluetooth headers detection |
160 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
161 |
- use gdbm || disable+=" gdbm" |
162 |
- use ncurses || disable+=" _curses _curses_panel" |
163 |
- use readline || disable+=" readline" |
164 |
- use sqlite || disable+=" _sqlite3" |
165 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
166 |
- use tk || disable+=" _tkinter" |
167 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
168 |
- export PYTHON_DISABLE_MODULES="${disable}" |
169 |
- |
170 |
- if ! use xml; then |
171 |
- ewarn "You have configured Python without XML support." |
172 |
- ewarn "This is NOT a recommended configuration as you" |
173 |
- ewarn "may face problems parsing any XML documents." |
174 |
- fi |
175 |
- |
176 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
177 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
178 |
- fi |
179 |
- |
180 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
181 |
- append-flags -fwrapv |
182 |
- fi |
183 |
- |
184 |
- filter-flags -malign-double |
185 |
- |
186 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
187 |
- if is-flagq -O3; then |
188 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
189 |
- use hardened && replace-flags -O3 -O2 |
190 |
- fi |
191 |
- |
192 |
- # https://bugs.gentoo.org/700012 |
193 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
194 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
195 |
- fi |
196 |
- |
197 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
198 |
- tc-export CXX |
199 |
- |
200 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
201 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
202 |
- |
203 |
- local dbmliborder |
204 |
- if use gdbm; then |
205 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
206 |
- fi |
207 |
- |
208 |
- if use pgo; then |
209 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
210 |
- export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network" |
211 |
- |
212 |
- # All of these seem to occasionally hang for PGO inconsistently |
213 |
- # They'll even hang here but be fine in src_test sometimes. |
214 |
- # bug #828535 (and related: bug #788022) |
215 |
- PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc" |
216 |
- |
217 |
- if has_version "app-arch/rpm" ; then |
218 |
- # Avoid sandbox failure (attempts to write to /var/lib/rpm) |
219 |
- PROFILE_TASK+=" -x test_distutils" |
220 |
- fi |
221 |
- fi |
222 |
- |
223 |
- local myeconfargs=( |
224 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
225 |
- # Python on glibc upgrade, remove it proactively to give |
226 |
- # a chance for users rebuilding python before glibc |
227 |
- ac_cv_header_stropts_h=no |
228 |
- |
229 |
- --enable-shared |
230 |
- --without-static-libpython |
231 |
- --enable-ipv6 |
232 |
- --infodir='${prefix}/share/info' |
233 |
- --mandir='${prefix}/share/man' |
234 |
- --with-computed-gotos |
235 |
- --with-dbmliborder="${dbmliborder}" |
236 |
- --with-libc= |
237 |
- --enable-loadable-sqlite-extensions |
238 |
- --without-ensurepip |
239 |
- --with-system-expat |
240 |
- --with-system-ffi |
241 |
- |
242 |
- $(use_with lto) |
243 |
- $(use_enable pgo optimizations) |
244 |
- ) |
245 |
- |
246 |
- OPT="" econf "${myeconfargs[@]}" |
247 |
- |
248 |
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
249 |
- eerror "configure has detected that the sem_open function is broken." |
250 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
251 |
- die "Broken sem_open function (bug 496328)" |
252 |
- fi |
253 |
-} |
254 |
- |
255 |
-src_compile() { |
256 |
- # Ensure sed works as expected |
257 |
- # https://bugs.gentoo.org/594768 |
258 |
- local -x LC_ALL=C |
259 |
- # Prevent using distutils bundled by setuptools. |
260 |
- # https://bugs.gentoo.org/823728 |
261 |
- export SETUPTOOLS_USE_DISTUTILS=stdlib |
262 |
- |
263 |
- if use pgo ; then |
264 |
- # bug 660358 |
265 |
- local -x COLUMNS=80 |
266 |
- local -x PYTHONDONTWRITEBYTECODE= |
267 |
- |
268 |
- addpredict /usr/lib/python3.10/site-packages |
269 |
- fi |
270 |
- |
271 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
272 |
- |
273 |
- # Work around bug 329499. See also bug 413751 and 457194. |
274 |
- if has_version dev-libs/libffi[pax-kernel]; then |
275 |
- pax-mark E python |
276 |
- else |
277 |
- pax-mark m python |
278 |
- fi |
279 |
-} |
280 |
- |
281 |
-src_test() { |
282 |
- # Tests will not work when cross compiling. |
283 |
- if tc-is-cross-compiler; then |
284 |
- elog "Disabling tests due to crosscompiling." |
285 |
- return |
286 |
- fi |
287 |
- |
288 |
- # Skip failing tests. |
289 |
- local skipped_tests="gdb" |
290 |
- |
291 |
- for test in ${skipped_tests}; do |
292 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
293 |
- done |
294 |
- |
295 |
- # bug 660358 |
296 |
- local -x COLUMNS=80 |
297 |
- local -x PYTHONDONTWRITEBYTECODE= |
298 |
- addpredict /usr/lib/python3.10/site-packages |
299 |
- |
300 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
301 |
- |
302 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
303 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
304 |
- local result=$? |
305 |
- |
306 |
- for test in ${skipped_tests}; do |
307 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
308 |
- done |
309 |
- |
310 |
- elog "The following tests have been skipped:" |
311 |
- for test in ${skipped_tests}; do |
312 |
- elog "test_${test}.py" |
313 |
- done |
314 |
- |
315 |
- elog "If you would like to run them, you may:" |
316 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
317 |
- elog "and run the tests separately." |
318 |
- |
319 |
- if [[ ${result} -ne 0 ]]; then |
320 |
- die "emake test failed" |
321 |
- fi |
322 |
-} |
323 |
- |
324 |
-src_install() { |
325 |
- local libdir=${ED}/usr/lib/python${PYVER} |
326 |
- |
327 |
- emake DESTDIR="${D}" altinstall |
328 |
- |
329 |
- sed \ |
330 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
331 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
332 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
333 |
- |
334 |
- # Fix collisions between different slots of Python. |
335 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
336 |
- |
337 |
- # Cheap hack to get version with ABIFLAGS |
338 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
339 |
- if [[ ${abiver} != python${PYVER} ]]; then |
340 |
- # Replace python3.X with a symlink to python3.Xm |
341 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
342 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
343 |
- # Create python3.X-config symlink |
344 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
345 |
- # Create python-3.5m.pc symlink |
346 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
347 |
- fi |
348 |
- |
349 |
- # python seems to get rebuilt in src_install (bug 569908) |
350 |
- # Work around it for now. |
351 |
- if has_version dev-libs/libffi[pax-kernel]; then |
352 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
353 |
- else |
354 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
355 |
- fi |
356 |
- |
357 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
358 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
359 |
- |
360 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
361 |
- |
362 |
- if use examples; then |
363 |
- docinto examples |
364 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
365 |
- dodoc -r Tools |
366 |
- fi |
367 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
368 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
369 |
- emake --no-print-directory -s -f - 2>/dev/null) |
370 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
371 |
- |
372 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
373 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
374 |
- sed \ |
375 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
376 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
377 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
378 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
379 |
- |
380 |
- local -x EPYTHON=python${PYVER} |
381 |
- # if not using a cross-compiler, use the fresh binary |
382 |
- if ! tc-is-cross-compiler; then |
383 |
- local -x PYTHON=./python |
384 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
385 |
- else |
386 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
387 |
- fi |
388 |
- |
389 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
390 |
- python_domodule epython.py |
391 |
- |
392 |
- # python-exec wrapping support |
393 |
- local pymajor=${PYVER%.*} |
394 |
- local scriptdir=${D}$(python_get_scriptdir) |
395 |
- mkdir -p "${scriptdir}" || die |
396 |
- # python and pythonX |
397 |
- ln -s "../../../bin/${abiver}" \ |
398 |
- "${scriptdir}/python${pymajor}" || die |
399 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
400 |
- # python-config and pythonX-config |
401 |
- # note: we need to create a wrapper rather than symlinking it due |
402 |
- # to some random dirname(argv[0]) magic performed by python-config |
403 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
404 |
- #!/bin/sh |
405 |
- exec "${abiver}-config" "\${@}" |
406 |
- EOF |
407 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
408 |
- ln -s "python${pymajor}-config" \ |
409 |
- "${scriptdir}/python-config" || die |
410 |
- # 2to3, pydoc |
411 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
412 |
- "${scriptdir}/2to3" || die |
413 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
414 |
- "${scriptdir}/pydoc" || die |
415 |
- # idle |
416 |
- if use tk; then |
417 |
- ln -s "../../../bin/idle${PYVER}" \ |
418 |
- "${scriptdir}/idle" || die |
419 |
- fi |
420 |
-} |
421 |
|
422 |
diff --git a/dev-lang/python/python-3.11.0_alpha3.ebuild b/dev-lang/python/python-3.11.0_alpha3.ebuild |
423 |
deleted file mode 100644 |
424 |
index 68bc01ac1c4f..000000000000 |
425 |
--- a/dev-lang/python/python-3.11.0_alpha3.ebuild |
426 |
+++ /dev/null |
427 |
@@ -1,383 +0,0 @@ |
428 |
-# Copyright 1999-2022 Gentoo Authors |
429 |
-# Distributed under the terms of the GNU General Public License v2 |
430 |
- |
431 |
-EAPI="7" |
432 |
-WANT_LIBTOOL="none" |
433 |
- |
434 |
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ |
435 |
- python-utils-r1 toolchain-funcs verify-sig |
436 |
- |
437 |
-MY_PV=${PV/_alpha/a} |
438 |
-MY_P="Python-${MY_PV%_p*}" |
439 |
-PYVER=$(ver_cut 1-2) |
440 |
-PATCHSET="python-gentoo-patches-${MY_PV}" |
441 |
- |
442 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
443 |
-HOMEPAGE="https://www.python.org/" |
444 |
-SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz |
445 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz |
446 |
- verify-sig? ( |
447 |
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc |
448 |
- )" |
449 |
-S="${WORKDIR}/${MY_P}" |
450 |
- |
451 |
-LICENSE="PSF-2" |
452 |
-SLOT="${PYVER}" |
453 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
454 |
-IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst" |
455 |
-RESTRICT="!test? ( test )" |
456 |
- |
457 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
458 |
-# If you need to apply a patch which requires python for bootstrapping, please |
459 |
-# run the bootstrap code on your dev box and include the results in the |
460 |
-# patchset. See bug 447752. |
461 |
- |
462 |
-RDEPEND="app-arch/bzip2:= |
463 |
- app-arch/xz-utils:= |
464 |
- >=dev-libs/expat-2.1:= |
465 |
- dev-libs/libffi:= |
466 |
- sys-apps/util-linux:= |
467 |
- >=sys-libs/zlib-1.1.3:= |
468 |
- virtual/libcrypt:= |
469 |
- virtual/libintl |
470 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
471 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
472 |
- readline? ( |
473 |
- !libedit? ( >=sys-libs/readline-4.1:= ) |
474 |
- libedit? ( dev-libs/libedit:= ) |
475 |
- ) |
476 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
477 |
- ssl? ( >=dev-libs/openssl-1.1.1:= ) |
478 |
- tk? ( |
479 |
- >=dev-lang/tcl-8.0:= |
480 |
- >=dev-lang/tk-8.0:= |
481 |
- dev-tcltk/blt:= |
482 |
- dev-tcltk/tix |
483 |
- ) |
484 |
- !!<sys-apps/sandbox-2.21" |
485 |
-# bluetooth requires headers from bluez |
486 |
-DEPEND="${RDEPEND} |
487 |
- bluetooth? ( net-wireless/bluez ) |
488 |
- test? ( app-arch/xz-utils[extra-filters(+)] )" |
489 |
-# autoconf-archive needed to eautoreconf |
490 |
-BDEPEND=" |
491 |
- sys-devel/autoconf-archive |
492 |
- virtual/awk |
493 |
- virtual/pkgconfig |
494 |
- verify-sig? ( sec-keys/openpgp-keys-python ) |
495 |
- !sys-devel/gcc[libffi(-)]" |
496 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
497 |
-[[ ${PV} != *_alpha* ]] && |
498 |
- RDEPEND+=" dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]" |
499 |
- |
500 |
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc |
501 |
- |
502 |
-# large file tests involve a 2.5G file being copied (duplicated) |
503 |
-CHECKREQS_DISK_BUILD=5500M |
504 |
- |
505 |
-pkg_pretend() { |
506 |
- use test && check-reqs_pkg_pretend |
507 |
-} |
508 |
- |
509 |
-pkg_setup() { |
510 |
- use test && check-reqs_pkg_setup |
511 |
-} |
512 |
- |
513 |
-src_unpack() { |
514 |
- if use verify-sig; then |
515 |
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} |
516 |
- fi |
517 |
- default |
518 |
-} |
519 |
- |
520 |
-src_prepare() { |
521 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
522 |
- rm -fr Modules/expat || die |
523 |
- rm -fr Modules/_ctypes/libffi* || die |
524 |
- rm -fr Modules/zlib || die |
525 |
- |
526 |
- local PATCHES=( |
527 |
- "${WORKDIR}/${PATCHSET}" |
528 |
- ) |
529 |
- |
530 |
- default |
531 |
- |
532 |
- # force correct number of jobs |
533 |
- # https://bugs.gentoo.org/737660 |
534 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
535 |
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die |
536 |
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die |
537 |
- |
538 |
- eautoreconf |
539 |
-} |
540 |
- |
541 |
-src_configure() { |
542 |
- local disable |
543 |
- # disable automagic bluetooth headers detection |
544 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
545 |
- |
546 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
547 |
- append-flags -fwrapv |
548 |
- fi |
549 |
- |
550 |
- filter-flags -malign-double |
551 |
- |
552 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
553 |
- if is-flagq -O3; then |
554 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
555 |
- use hardened && replace-flags -O3 -O2 |
556 |
- fi |
557 |
- |
558 |
- # https://bugs.gentoo.org/700012 |
559 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
560 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
561 |
- fi |
562 |
- |
563 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
564 |
- tc-export CXX |
565 |
- |
566 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
567 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
568 |
- |
569 |
- local dbmliborder |
570 |
- if use gdbm; then |
571 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
572 |
- fi |
573 |
- |
574 |
- if use pgo; then |
575 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
576 |
- export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network" |
577 |
- |
578 |
- # All of these seem to occasionally hang for PGO inconsistently |
579 |
- # They'll even hang here but be fine in src_test sometimes. |
580 |
- # bug #828535 (and related: bug #788022) |
581 |
- PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc" |
582 |
- |
583 |
- if has_version "app-arch/rpm" ; then |
584 |
- # Avoid sandbox failure (attempts to write to /var/lib/rpm) |
585 |
- PROFILE_TASK+=" -x test_distutils" |
586 |
- fi |
587 |
- fi |
588 |
- |
589 |
- local myeconfargs=( |
590 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
591 |
- # Python on glibc upgrade, remove it proactively to give |
592 |
- # a chance for users rebuilding python before glibc |
593 |
- ac_cv_header_stropts_h=no |
594 |
- |
595 |
- --enable-shared |
596 |
- --without-static-libpython |
597 |
- --enable-ipv6 |
598 |
- --infodir='${prefix}/share/info' |
599 |
- --mandir='${prefix}/share/man' |
600 |
- --with-computed-gotos |
601 |
- --with-dbmliborder="${dbmliborder}" |
602 |
- --with-libc= |
603 |
- --enable-loadable-sqlite-extensions |
604 |
- --without-ensurepip |
605 |
- --with-system-expat |
606 |
- --with-system-ffi |
607 |
- --with-platlibdir=lib |
608 |
- |
609 |
- $(use_with lto) |
610 |
- $(use_enable pgo optimizations) |
611 |
- $(use_with readline readline "$(usex libedit editline readline)") |
612 |
- ) |
613 |
- |
614 |
- OPT="" econf "${myeconfargs[@]}" |
615 |
- |
616 |
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
617 |
- eerror "configure has detected that the sem_open function is broken." |
618 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
619 |
- die "Broken sem_open function (bug 496328)" |
620 |
- fi |
621 |
- |
622 |
- # force-disable modules we don't want built |
623 |
- local disable_modules=( |
624 |
- NIS |
625 |
- ) |
626 |
- use gdbm || disable_modules+=( _GDBM _DBM ) |
627 |
- use sqlite || disable_modules+=( _SQLITE3 ) |
628 |
- use ssl || disable_modules+=( _HASHLIB _SSL ) |
629 |
- use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) |
630 |
- use readline || disable_modules+=( READLINE ) |
631 |
- use tk || disable_modules+=( _TKINTER ) |
632 |
- |
633 |
- local mod |
634 |
- for mod in "${disable_modules[@]}"; do |
635 |
- echo "MODULE_${mod}=disabled" |
636 |
- done >> Makefile || die |
637 |
-} |
638 |
- |
639 |
-src_compile() { |
640 |
- # Ensure sed works as expected |
641 |
- # https://bugs.gentoo.org/594768 |
642 |
- local -x LC_ALL=C |
643 |
- # Prevent using distutils bundled by setuptools. |
644 |
- # https://bugs.gentoo.org/823728 |
645 |
- export SETUPTOOLS_USE_DISTUTILS=stdlib |
646 |
- export PYTHONSTRICTEXTENSIONBUILD=1 |
647 |
- |
648 |
- if use pgo ; then |
649 |
- # bug 660358 |
650 |
- local -x COLUMNS=80 |
651 |
- local -x PYTHONDONTWRITEBYTECODE= |
652 |
- |
653 |
- addpredict /usr/lib/python3.11/site-packages |
654 |
- fi |
655 |
- |
656 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
657 |
- |
658 |
- # Work around bug 329499. See also bug 413751 and 457194. |
659 |
- if has_version dev-libs/libffi[pax-kernel]; then |
660 |
- pax-mark E python |
661 |
- else |
662 |
- pax-mark m python |
663 |
- fi |
664 |
-} |
665 |
- |
666 |
-src_test() { |
667 |
- # Tests will not work when cross compiling. |
668 |
- if tc-is-cross-compiler; then |
669 |
- elog "Disabling tests due to crosscompiling." |
670 |
- return |
671 |
- fi |
672 |
- |
673 |
- # Skip failing tests. |
674 |
- local skipped_tests="gdb" |
675 |
- |
676 |
- for test in ${skipped_tests}; do |
677 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
678 |
- done |
679 |
- |
680 |
- # Expects to find skipped tests and fails |
681 |
- mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die |
682 |
- |
683 |
- # bug 660358 |
684 |
- local -x COLUMNS=80 |
685 |
- local -x PYTHONDONTWRITEBYTECODE= |
686 |
- addpredict /usr/lib/python3.11/site-packages |
687 |
- |
688 |
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
689 |
- |
690 |
- emake test EXTRATESTOPTS="-u-network -j${jobs}" \ |
691 |
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
692 |
- local result=$? |
693 |
- |
694 |
- for test in ${skipped_tests}; do |
695 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
696 |
- done |
697 |
- |
698 |
- mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die |
699 |
- |
700 |
- elog "The following tests have been skipped:" |
701 |
- for test in ${skipped_tests}; do |
702 |
- elog "test_${test}.py" |
703 |
- done |
704 |
- |
705 |
- elog "If you would like to run them, you may:" |
706 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
707 |
- elog "and run the tests separately." |
708 |
- |
709 |
- if [[ ${result} -ne 0 ]]; then |
710 |
- die "emake test failed" |
711 |
- fi |
712 |
-} |
713 |
- |
714 |
-src_install() { |
715 |
- local libdir=${ED}/usr/lib/python${PYVER} |
716 |
- |
717 |
- emake DESTDIR="${D}" altinstall |
718 |
- |
719 |
- sed \ |
720 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
721 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
722 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
723 |
- |
724 |
- # Fix collisions between different slots of Python. |
725 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
726 |
- |
727 |
- # Cheap hack to get version with ABIFLAGS |
728 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
729 |
- if [[ ${abiver} != python${PYVER} ]]; then |
730 |
- # Replace python3.X with a symlink to python3.Xm |
731 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
732 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
733 |
- # Create python3.X-config symlink |
734 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
735 |
- # Create python-3.5m.pc symlink |
736 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
737 |
- fi |
738 |
- |
739 |
- # python seems to get rebuilt in src_install (bug 569908) |
740 |
- # Work around it for now. |
741 |
- if has_version dev-libs/libffi[pax-kernel]; then |
742 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
743 |
- else |
744 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
745 |
- fi |
746 |
- |
747 |
- use sqlite || rm -r "${libdir}/"sqlite3 || die |
748 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
749 |
- |
750 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
751 |
- |
752 |
- if use examples; then |
753 |
- docinto examples |
754 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
755 |
- dodoc -r Tools |
756 |
- fi |
757 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
758 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
759 |
- emake --no-print-directory -s -f - 2>/dev/null) |
760 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
761 |
- |
762 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
763 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
764 |
- sed \ |
765 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
766 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
767 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
768 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
769 |
- |
770 |
- local -x EPYTHON=python${PYVER} |
771 |
- # if not using a cross-compiler, use the fresh binary |
772 |
- if ! tc-is-cross-compiler; then |
773 |
- local -x PYTHON=./python |
774 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
775 |
- else |
776 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
777 |
- fi |
778 |
- |
779 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
780 |
- python_domodule epython.py |
781 |
- |
782 |
- # python-exec wrapping support |
783 |
- local pymajor=${PYVER%.*} |
784 |
- local scriptdir=${D}$(python_get_scriptdir) |
785 |
- mkdir -p "${scriptdir}" || die |
786 |
- # python and pythonX |
787 |
- ln -s "../../../bin/${abiver}" \ |
788 |
- "${scriptdir}/python${pymajor}" || die |
789 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
790 |
- # python-config and pythonX-config |
791 |
- # note: we need to create a wrapper rather than symlinking it due |
792 |
- # to some random dirname(argv[0]) magic performed by python-config |
793 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
794 |
- #!/bin/sh |
795 |
- exec "${abiver}-config" "\${@}" |
796 |
- EOF |
797 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
798 |
- ln -s "python${pymajor}-config" \ |
799 |
- "${scriptdir}/python-config" || die |
800 |
- # 2to3, pydoc |
801 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
802 |
- "${scriptdir}/2to3" || die |
803 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
804 |
- "${scriptdir}/pydoc" || die |
805 |
- # idle |
806 |
- if use tk; then |
807 |
- ln -s "../../../bin/idle${PYVER}" \ |
808 |
- "${scriptdir}/idle" || die |
809 |
- fi |
810 |
-} |