1 |
commit: 7fc5957ee0cb88e607f4c1988d91a07cebaf6d96 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 7 15:39:28 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 7 15:39:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fc5957e |
7 |
|
8 |
dev-lang/python: Remove redundant versions |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-lang/python/Manifest | 7 - |
13 |
.../python-2.7.10-cross-compile-warn-test.patch | 24 -- |
14 |
.../python/files/python-2.7.10-system-libffi.patch | 36 -- |
15 |
.../files/python-2.7.5-nonfatal-compileall.patch | 18 - |
16 |
.../files/python-2.7.9-ncurses-pkg-config.patch | 13 - |
17 |
dev-lang/python/files/python-3.7.5-hashlib.patch | 25 -- |
18 |
dev-lang/python/python-2.7.17.ebuild | 361 --------------------- |
19 |
dev-lang/python/python-3.6.9.ebuild | 348 -------------------- |
20 |
dev-lang/python/python-3.7.5-r1.ebuild | 328 ------------------- |
21 |
dev-lang/python/python-3.8.1.ebuild | 343 -------------------- |
22 |
dev-lang/python/python-3.9.0_alpha2.ebuild | 324 ------------------ |
23 |
11 files changed, 1827 deletions(-) |
24 |
|
25 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
26 |
index d98cd07888d..84e356a15b4 100644 |
27 |
--- a/dev-lang/python/Manifest |
28 |
+++ b/dev-lang/python/Manifest |
29 |
@@ -1,17 +1,10 @@ |
30 |
DIST Python-2.7.17.tar.xz 12855568 BLAKE2B 6d09214a51d6595fe5253a279ee556d7510dcb9a0e8ad71e9cf73b4fb00c3abd3680e2429f4f87d9387d1fc16d4887f5f33fc600b24b0ca2c70f36bf34df2157 SHA512 2dc19a0b0d818c71429dae94783e58b2aac0fa31f5faa1e840cac06245a59932ecc4658d913515736601bcf70a78c9ec60367aed75f4567d1e41ff3bb104da9a |
31 |
DIST Python-3.6.10.tar.xz 17212220 BLAKE2B 822e231cf2755e6477e49e9128a983185a4f1e30e9d6c221f1b5720891c0de345e8c5402af458d3627eba124e75fea4b5daa94e01b0eaddc116dc3281263ecbe SHA512 26147099e1f1a0ffc85febad26e18e991f019599a150887ea0b925e34663fad8e03b3c2a941e2770c1a63960695e173ef32709572c9361e7f2cb862ccf75b28a |
32 |
-DIST Python-3.6.9.tar.xz 17212164 BLAKE2B ef33dbc1ea3bbeaf92092de867279d759e3a204ca4e8bf0e5c6a1adbb17a9220d8829245fa9f067ec6497a5789a4f60b8db8c727bb2bd8126df470921d552a53 SHA512 05de9c6f44d96a52bfce10ede4312de892573edaf8bece65926d19973a3a800d65eed7a857af945f69efcfb25efa3788e7a54016b03d80b611eb51c3ea074819 |
33 |
-DIST Python-3.7.5.tar.xz 17236432 BLAKE2B fb49a3bfd9b1944d567a45682f789ef840e63ed610e0dddb5695da7a84a0bcb50a6fa52097722f09b57d6fc15a5f89aeaa46a061125219e597897086f3dffe40 SHA512 f4f3879881f260f58dbb041fb0f2f210d4b70b02a739e41e50e6fea67d31855a7a29ce4ebef66bfde3d0edf54b946a48f78490f986da965357b835d4dbb3f414 |
34 |
DIST Python-3.7.6.tar.xz 17246360 BLAKE2B b83a440a1ad5b1a2210e03be0522d39f53778774ea725fa41aaaab28cccfcdf007996f1a1d3cb95f8040b71b692189e28db67ba6ec136af82158363a1aadbba6 SHA512 5be022c384728b0c6709d165486f66226d126c521b466ed24d0c4c3c5910ec786a734f4c2c916ac409213c54a492b9fb230fb721c41e3de281676a7e9d8f3171 |
35 |
-DIST Python-3.8.1.tar.xz 17828408 BLAKE2B db1841625de89b812cadcd538a990401a4e49d43968dce733c289121e9de9749eaf39e1c772a32e10ed2b40bef215b19ae9c7d88e0ec9e99cd3d467406ea063c SHA512 d41381848cc1ec8009643b71875f395a9ac2c8e12a5b1efef33caf8a9e99a337c790d4354695c85352d11b62092ae372b5af62f78724363fcbf3504ff9a6ddca |
36 |
DIST Python-3.8.2.tar.xz 17869888 BLAKE2B f42b35bea5e65f1f0a3fa6f1fd3d749fba3fa46d958608a314c1a98d0e3ca890e856da4d40ee489fe546fc02ce0fc9fa2daaaba96a8928d92ae7eb3d2dda3fe4 SHA512 ca37ad0e7c5845f5f228566aa8ff654a8f428c7d4a5aaabff29baebb0ca3219b31ba8bb2607f89e37cf3fc564f023b8407e53a4f2c47bd99122c1cc222613e37 |
37 |
-DIST Python-3.9.0a2.tar.xz 17988748 BLAKE2B 3d6a6facacb49d8eeaf01c3194bad8e6c920bd03a8f50ac171016fd61288120dfa06af50583c647e5850b5965fc41e03515042ef1594ec4dcbf39794e999b61a SHA512 3f17869f3ca4db423f66e145e67c9fb4935d8c908c5362de585898343190edb901861701e27ab9187a287880ee42bbb4897aa298967c1862f44b12dbab19d412 |
38 |
DIST Python-3.9.0a4.tar.xz 18032300 BLAKE2B 1c9ad55c7c055c3a704c4062e092d44b8d778e334e05589e7166777da328df54ef257aeb2e203416710bb9f9f1571d7700c2c12aed5b8e63adf7a1b3aedb08b5 SHA512 8f7ca0a891fb7e7868dfe5f040e9ceb7ce14d036bc5d9eae1493570c5a9631832e796a1972590c444d2347c585b0c8216345375dd1476b4da7bd47e187591afc |
39 |
DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f |
40 |
-DIST python-gentoo-patches-2.7.17.tar.xz 13476 BLAKE2B 788688e2941d2d6d4f768168881b2c3639213a97e214557b3a93f8db44d81e2b6d70be847b7462e54e3786660ebee4ee331402081d92167d74ad149279c3f389 SHA512 1641737635d33607a77ed2ee2462854cec603be39737de3f81abb188702aaf46f039d1616f9dcd413da1f4a8040175c66a2883e496132c2e4ebe8f860b36f9f1 |
41 |
DIST python-gentoo-patches-3.6.10.tar.xz 10964 BLAKE2B e32c8cb3050c7324ee234f585be7fc40cfacc6ad87759eaa300e57289e6dc6cbaed3913f33ad632b8754638e8d71983d8364ceeaad8ef325cfa6d4d2dfb56df0 SHA512 71fea7306c876c63888c4547eaf14dc2e0413dec343609d748cd1b5888e4605d47888758ebc5120a287ce833b69dd538073f91989460da7c40462b53eefca7ce |
42 |
-DIST python-gentoo-patches-3.6.8.tar.xz 11224 BLAKE2B 5fe38282bcf28df18e0bd37756c880ae191ea738dc92f1cf83f682cfdc52525b9c44287dc99191a73d75c90672ab501b56adf49515b35ff1fdee88c8dc07b175 SHA512 89e700663db25d6d78eee1d4bfdab686c5341a794062f3a63df3485ac0b58deb4b4885d24701f3ae138d06ca783be92e310e1100c6d633910c33732f3cb0d7df |
43 |
-DIST python-gentoo-patches-3.7.4-1.tar.xz 10100 BLAKE2B 63e8fada89b64b59ba083745626a1e8a07bec0cf93b7b6ab405c33a0f2932cbe497a331c52895a07f10434b230c438f27c9582efecdd57f3bad15d9aa604d157 SHA512 11b0e811a9890a1235c85426061b35f9964eba64cac0536f4c9e0498b1cc66eb005f14aed34eead735b43e91c2b5babced60e3310f5329231a1706871b95b547 |
44 |
DIST python-gentoo-patches-3.7.6.tar.xz 10084 BLAKE2B 220869e85bdaf9c21b1b05e13803bdb6ecc22ac0f69da77e57fd7c1cd93ef45ec43401b62732842e1bb3467feb6d65c8204120e2741e9eb6f4cab673fd3a8d62 SHA512 4c04b0cf7da55fa7973ab178e3ac2c59bc2142924bdced5954c058053280b6c663d7c39912286d10fe0e82ca30af6a0dd6a56fa85433f836217ca3dcbb284def |
45 |
DIST python-gentoo-patches-3.8.1-r2.tar.xz 10108 BLAKE2B 02d3e2ae95b5cfa67c0ba4ff618fbee51d2342955d0a064b80575beda73902bd72462e4f6dba63743bf9fc031d92c69153ef8bd8a0ab5d6e17bfdf8ed0152da5 SHA512 757f7cf6b0cb6c1493d8ed8e5780780efcb32860a9aeba4f933a3a3fb22c412bebde8854e34609465d8a12cb9545a7b19e5d5dbe87d772bb83acd9fe829b75cc |
46 |
DIST python-gentoo-patches-3.9.0_alpha2.tar.xz 8340 BLAKE2B b93edca01fa46c8eb4e18e0d92c72a3e4ef8dcebf26c0e1c0fab4c82201645ed4c358cf2311c9eb454f6a261ab514985302f81fc86284d3714d662037928963c SHA512 58b0a64d8747f187e6cc4749dc660a443c066e43f509ecc2976b6406bbfb3851a03f686adc36bd58c7c3142a707a387ac25431ca078980914d2219c49a0f2202 |
47 |
|
48 |
diff --git a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch |
49 |
deleted file mode 100644 |
50 |
index 38433de925e..00000000000 |
51 |
--- a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch |
52 |
+++ /dev/null |
53 |
@@ -1,24 +0,0 @@ |
54 |
-https://bugs.python.org/issue25397 |
55 |
- |
56 |
-improve the cross-compile tests to be more focused |
57 |
- |
58 |
---- a/configure.ac |
59 |
-+++ b/configure.ac |
60 |
-@@ -1339,7 +1339,7 @@ if test "$GCC" = "yes" |
61 |
- then |
62 |
- AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) |
63 |
- save_CFLAGS=$CFLAGS |
64 |
-- CFLAGS="$CFLAGS -Werror -Wformat" |
65 |
-+ CFLAGS="$CFLAGS -Werror=format" |
66 |
- AC_COMPILE_IFELSE([ |
67 |
- AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) |
68 |
- ],[ |
69 |
-@@ -4458,7 +4458,7 @@ then |
70 |
- [ac_cv_have_long_long_format="cross -- assuming no" |
71 |
- if test x$GCC = xyes; then |
72 |
- save_CFLAGS=$CFLAGS |
73 |
-- CFLAGS="$CFLAGS -Werror -Wformat" |
74 |
-+ CFLAGS="$CFLAGS -Werror=format" |
75 |
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
76 |
- #include <stdio.h> |
77 |
- #include <stddef.h> |
78 |
|
79 |
diff --git a/dev-lang/python/files/python-2.7.10-system-libffi.patch b/dev-lang/python/files/python-2.7.10-system-libffi.patch |
80 |
deleted file mode 100644 |
81 |
index 0b49b794bd8..00000000000 |
82 |
--- a/dev-lang/python/files/python-2.7.10-system-libffi.patch |
83 |
+++ /dev/null |
84 |
@@ -1,36 +0,0 @@ |
85 |
-make sure we respect the system libffi setting in our build config. |
86 |
-the compiler probing is fragile and can break in some situations. |
87 |
- |
88 |
---- a/setup.py |
89 |
-+++ b/setup.py |
90 |
-@@ -2069,7 +2069,7 @@ class PyBuildExt(build_ext): |
91 |
- return True |
92 |
- |
93 |
- def detect_ctypes(self, inc_dirs, lib_dirs): |
94 |
-- self.use_system_libffi = False |
95 |
-+ self.use_system_libffi = ('--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS")) |
96 |
- include_dirs = [] |
97 |
- extra_compile_args = [] |
98 |
- extra_link_args = [] |
99 |
-@@ -2113,7 +2113,7 @@ class PyBuildExt(build_ext): |
100 |
- sources=['_ctypes/_ctypes_test.c']) |
101 |
- self.extensions.extend([ext, ext_test]) |
102 |
- |
103 |
-- if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"): |
104 |
-+ if not self.use_system_libffi: |
105 |
- return |
106 |
- |
107 |
- if host_platform == 'darwin': |
108 |
-@@ -2141,10 +2141,10 @@ class PyBuildExt(build_ext): |
109 |
- ffi_lib = lib_name |
110 |
- break |
111 |
- |
112 |
-- if ffi_inc and ffi_lib: |
113 |
-+ if ffi_inc: |
114 |
- ext.include_dirs.extend(ffi_inc) |
115 |
-+ if ffi_lib: |
116 |
- ext.libraries.append(ffi_lib) |
117 |
-- self.use_system_libffi = True |
118 |
- |
119 |
- |
120 |
- class PyBuildInstall(install): |
121 |
|
122 |
diff --git a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch b/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch |
123 |
deleted file mode 100644 |
124 |
index a762dfb1088..00000000000 |
125 |
--- a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch |
126 |
+++ /dev/null |
127 |
@@ -1,18 +0,0 @@ |
128 |
-diff --git a/Makefile.pre.in b/Makefile.pre.in |
129 |
---- a/Makefile.pre.in |
130 |
-+++ b/Makefile.pre.in |
131 |
-@@ -1000,12 +1000,12 @@ |
132 |
- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ |
133 |
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \ |
134 |
- fi |
135 |
-- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
136 |
-+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
137 |
- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
138 |
- -d $(LIBDEST) -f \ |
139 |
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
140 |
- $(DESTDIR)$(LIBDEST) |
141 |
-- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
142 |
-+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
143 |
- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
144 |
- -d $(LIBDEST) -f \ |
145 |
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
146 |
|
147 |
diff --git a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch b/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch |
148 |
deleted file mode 100644 |
149 |
index 38ce6f78b91..00000000000 |
150 |
--- a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch |
151 |
+++ /dev/null |
152 |
@@ -1,13 +0,0 @@ |
153 |
-do not hardcode /usr/include paths |
154 |
- |
155 |
---- a/configure.ac |
156 |
-+++ b/configure.ac |
157 |
-@@ -4316,7 +4316,7 @@ fi |
158 |
- |
159 |
- # first curses configure check |
160 |
- ac_save_cppflags="$CPPFLAGS" |
161 |
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" |
162 |
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`" |
163 |
- |
164 |
- AC_CHECK_HEADERS(curses.h ncurses.h) |
165 |
- |
166 |
|
167 |
diff --git a/dev-lang/python/files/python-3.7.5-hashlib.patch b/dev-lang/python/files/python-3.7.5-hashlib.patch |
168 |
deleted file mode 100644 |
169 |
index a70a4796310..00000000000 |
170 |
--- a/dev-lang/python/files/python-3.7.5-hashlib.patch |
171 |
+++ /dev/null |
172 |
@@ -1,25 +0,0 @@ |
173 |
-From 2c0c356ca109d1550bfb09b0da7dec3f80db77a3 Mon Sep 17 00:00:00 2001 |
174 |
-From: Mike Gilbert <floppym@g.o> |
175 |
-Date: Fri, 18 Oct 2019 16:39:16 -0400 |
176 |
-Subject: [PATCH] Call OPENSSL_init_crypto for openssl >= 1.1.0 |
177 |
- |
178 |
---- |
179 |
- Modules/_hashopenssl.c | 2 ++ |
180 |
- 1 file changed, 2 insertions(+) |
181 |
- |
182 |
-diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c |
183 |
-index b13ade60496..8abbde5120f 100644 |
184 |
---- a/Modules/_hashopenssl.c |
185 |
-+++ b/Modules/_hashopenssl.c |
186 |
-@@ -1077,6 +1077,8 @@ PyInit__hashlib(void) |
187 |
- /* Load all digest algorithms and initialize cpuid */ |
188 |
- OPENSSL_add_all_algorithms_noconf(); |
189 |
- ERR_load_crypto_strings(); |
190 |
-+#else |
191 |
-+ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS|OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); |
192 |
- #endif |
193 |
- |
194 |
- /* TODO build EVP_functions openssl_* entries dynamically based |
195 |
--- |
196 |
-2.23.0 |
197 |
- |
198 |
|
199 |
diff --git a/dev-lang/python/python-2.7.17.ebuild b/dev-lang/python/python-2.7.17.ebuild |
200 |
deleted file mode 100644 |
201 |
index 52061f5125f..00000000000 |
202 |
--- a/dev-lang/python/python-2.7.17.ebuild |
203 |
+++ /dev/null |
204 |
@@ -1,361 +0,0 @@ |
205 |
-# Copyright 1999-2020 Gentoo Authors |
206 |
-# Distributed under the terms of the GNU General Public License v2 |
207 |
- |
208 |
-EAPI="6" |
209 |
-WANT_LIBTOOL="none" |
210 |
- |
211 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
212 |
- |
213 |
-MY_P="Python-${PV}" |
214 |
-PATCHSET_VERSION="2.7.17" |
215 |
- |
216 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
217 |
-HOMEPAGE="https://www.python.org/" |
218 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
219 |
- https://dev.gentoo.org/~mgorny/dist/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
220 |
- |
221 |
-LICENSE="PSF-2" |
222 |
-SLOT="2.7" |
223 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86" |
224 |
-IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
225 |
- |
226 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
227 |
-# If you need to apply a patch which requires python for bootstrapping, please |
228 |
-# run the bootstrap code on your dev box and include the results in the |
229 |
-# patchset. See bug 447752. |
230 |
- |
231 |
-RDEPEND="app-arch/bzip2:0= |
232 |
- dev-libs/libffi:= |
233 |
- >=sys-libs/zlib-1.1.3:0= |
234 |
- virtual/libintl |
235 |
- berkdb? ( || ( |
236 |
- sys-libs/db:5.3 |
237 |
- sys-libs/db:5.1 |
238 |
- sys-libs/db:4.8 |
239 |
- sys-libs/db:4.7 |
240 |
- sys-libs/db:4.6 |
241 |
- sys-libs/db:4.5 |
242 |
- sys-libs/db:4.4 |
243 |
- sys-libs/db:4.3 |
244 |
- sys-libs/db:4.2 |
245 |
- ) ) |
246 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
247 |
- ncurses? ( >=sys-libs/ncurses-5.2:0= ) |
248 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
249 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
250 |
- ssl? ( |
251 |
- !libressl? ( dev-libs/openssl:0= ) |
252 |
- libressl? ( dev-libs/libressl:0= ) |
253 |
- ) |
254 |
- tk? ( |
255 |
- >=dev-lang/tcl-8.0:0= |
256 |
- >=dev-lang/tk-8.0:0= |
257 |
- dev-tcltk/blt:0= |
258 |
- dev-tcltk/tix |
259 |
- ) |
260 |
- xml? ( >=dev-libs/expat-2.1 ) |
261 |
- !!<sys-apps/portage-2.1.9" |
262 |
-# bluetooth requires headers from bluez |
263 |
-DEPEND="${RDEPEND} |
264 |
- bluetooth? ( net-wireless/bluez ) |
265 |
- virtual/pkgconfig |
266 |
- >=sys-devel/autoconf-2.65 |
267 |
- !sys-devel/gcc[libffi(-)]" |
268 |
-RDEPEND+=" !build? ( app-misc/mime-types ) |
269 |
- doc? ( dev-python/python-docs:${SLOT} )" |
270 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
271 |
- |
272 |
-S="${WORKDIR}/${MY_P}" |
273 |
- |
274 |
-pkg_setup() { |
275 |
- if use berkdb; then |
276 |
- ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
277 |
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
278 |
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
279 |
- ewarn "is provided by dev-python/bsddb3." |
280 |
- else |
281 |
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
282 |
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
283 |
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
284 |
- ewarn "You might need to migrate your databases." |
285 |
- fi |
286 |
- fi |
287 |
-} |
288 |
- |
289 |
-src_prepare() { |
290 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
291 |
- rm -r Modules/expat || die |
292 |
- rm -r Modules/_ctypes/libffi* || die |
293 |
- rm -r Modules/zlib || die |
294 |
- |
295 |
- if tc-is-cross-compiler; then |
296 |
- rm "${WORKDIR}/patches/0006-Regenerate-platform-specific-modules.patch" || die |
297 |
- fi |
298 |
- |
299 |
- local PATCHES=( |
300 |
- "${WORKDIR}/patches" |
301 |
- # Fix for cross-compiling. |
302 |
- "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" |
303 |
- "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" |
304 |
- "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" |
305 |
- "${FILESDIR}/python-2.7.10-system-libffi.patch" |
306 |
- ) |
307 |
- |
308 |
- default |
309 |
- |
310 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
311 |
- Lib/distutils/command/install.py \ |
312 |
- Lib/distutils/sysconfig.py \ |
313 |
- Lib/site.py \ |
314 |
- Lib/sysconfig.py \ |
315 |
- Lib/test/test_site.py \ |
316 |
- Makefile.pre.in \ |
317 |
- Modules/Setup.dist \ |
318 |
- Modules/getpath.c \ |
319 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
320 |
- |
321 |
- eautoreconf |
322 |
-} |
323 |
- |
324 |
-src_configure() { |
325 |
- # dbm module can be linked against berkdb or gdbm. |
326 |
- # Defaults to gdbm when both are enabled, #204343. |
327 |
- local disable |
328 |
- use berkdb || use gdbm || disable+=" dbm" |
329 |
- use berkdb || disable+=" _bsddb" |
330 |
- # disable automagic bluetooth headers detection |
331 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
332 |
- use gdbm || disable+=" gdbm" |
333 |
- use ncurses || disable+=" _curses _curses_panel" |
334 |
- use readline || disable+=" readline" |
335 |
- use sqlite || disable+=" _sqlite3" |
336 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
337 |
- use tk || disable+=" _tkinter" |
338 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
339 |
- export PYTHON_DISABLE_MODULES="${disable}" |
340 |
- |
341 |
- if ! use xml; then |
342 |
- ewarn "You have configured Python without XML support." |
343 |
- ewarn "This is NOT a recommended configuration as you" |
344 |
- ewarn "may face problems parsing any XML documents." |
345 |
- fi |
346 |
- |
347 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
348 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
349 |
- fi |
350 |
- |
351 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
352 |
- append-flags -fwrapv |
353 |
- fi |
354 |
- |
355 |
- filter-flags -malign-double |
356 |
- |
357 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
358 |
- if is-flagq -O3; then |
359 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
360 |
- use hardened && replace-flags -O3 -O2 |
361 |
- fi |
362 |
- |
363 |
- if tc-is-cross-compiler; then |
364 |
- # Force some tests that try to poke fs paths. |
365 |
- export ac_cv_file__dev_ptc=no |
366 |
- export ac_cv_file__dev_ptmx=yes |
367 |
- fi |
368 |
- |
369 |
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
370 |
- tc-export CXX |
371 |
- # The configure script fails to use pkg-config correctly. |
372 |
- # http://bugs.python.org/issue15506 |
373 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
374 |
- |
375 |
- # Set LDFLAGS so we link modules with -lpython2.7 correctly. |
376 |
- # Needed on FreeBSD unless Python 2.7 is already installed. |
377 |
- # Please query BSD team before removing this! |
378 |
- append-ldflags "-L." |
379 |
- |
380 |
- local dbmliborder |
381 |
- if use gdbm; then |
382 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
383 |
- fi |
384 |
- if use berkdb; then |
385 |
- dbmliborder+="${dbmliborder:+:}bdb" |
386 |
- fi |
387 |
- |
388 |
- local myeconfargs=( |
389 |
- # The check is broken on clang, and gives false positive: |
390 |
- # https://bugs.gentoo.org/596798 |
391 |
- # (upstream dropped this flag in 3.2a4 anyway) |
392 |
- ac_cv_opt_olimit_ok=no |
393 |
- |
394 |
- --with-fpectl |
395 |
- --enable-shared |
396 |
- $(use_enable ipv6) |
397 |
- $(use_with threads) |
398 |
- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") |
399 |
- --infodir='${prefix}/share/info' |
400 |
- --mandir='${prefix}/share/man' |
401 |
- --with-computed-gotos |
402 |
- --with-dbmliborder="${dbmliborder}" |
403 |
- --with-libc= |
404 |
- --enable-loadable-sqlite-extensions |
405 |
- --with-system-expat |
406 |
- --with-system-ffi |
407 |
- --without-ensurepip |
408 |
- ) |
409 |
- |
410 |
- OPT= econf "${myeconfargs[@]}" |
411 |
- |
412 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
413 |
- eerror "configure has detected that the sem_open function is broken." |
414 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
415 |
- die "Broken sem_open function (bug 496328)" |
416 |
- fi |
417 |
-} |
418 |
- |
419 |
-src_compile() { |
420 |
- # Avoid invoking pgen for cross-compiles. |
421 |
- touch Include/graminit.h Python/graminit.c |
422 |
- |
423 |
- emake |
424 |
- |
425 |
- # Work around bug 329499. See also bug 413751 and 457194. |
426 |
- if has_version dev-libs/libffi[pax_kernel]; then |
427 |
- pax-mark E python |
428 |
- else |
429 |
- pax-mark m python |
430 |
- fi |
431 |
-} |
432 |
- |
433 |
-src_test() { |
434 |
- # Tests will not work when cross compiling. |
435 |
- if tc-is-cross-compiler; then |
436 |
- elog "Disabling tests due to crosscompiling." |
437 |
- return |
438 |
- fi |
439 |
- |
440 |
- # Skip failing tests. |
441 |
- local skipped_tests="distutils gdb" |
442 |
- |
443 |
- for test in ${skipped_tests}; do |
444 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
445 |
- done |
446 |
- |
447 |
- # bug 660358 |
448 |
- local -x COLUMNS=80 |
449 |
- |
450 |
- # Daylight saving time problem |
451 |
- # https://bugs.python.org/issue22067 |
452 |
- # https://bugs.gentoo.org/610628 |
453 |
- local -x TZ=UTC |
454 |
- |
455 |
- # Rerun failed tests in verbose mode (regrtest -w). |
456 |
- emake test EXTRATESTOPTS="-w" < /dev/tty |
457 |
- local result="$?" |
458 |
- |
459 |
- for test in ${skipped_tests}; do |
460 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
461 |
- done |
462 |
- |
463 |
- elog "The following tests have been skipped:" |
464 |
- for test in ${skipped_tests}; do |
465 |
- elog "test_${test}.py" |
466 |
- done |
467 |
- |
468 |
- elog "If you would like to run them, you may:" |
469 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
470 |
- elog "and run the tests separately." |
471 |
- |
472 |
- if [[ "${result}" -ne 0 ]]; then |
473 |
- die "emake test failed" |
474 |
- fi |
475 |
-} |
476 |
- |
477 |
-src_install() { |
478 |
- local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
479 |
- |
480 |
- emake DESTDIR="${D}" altinstall |
481 |
- |
482 |
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
483 |
- |
484 |
- # Fix collisions between different slots of Python. |
485 |
- mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
486 |
- mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
487 |
- mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
488 |
- rm -f "${ED}usr/bin/smtpd.py" |
489 |
- |
490 |
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die |
491 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
492 |
- use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
493 |
- use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
494 |
- |
495 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
496 |
- use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
497 |
- |
498 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
499 |
- |
500 |
- if use examples; then |
501 |
- docinto examples |
502 |
- dodoc -r "${S}"/Tools |
503 |
- fi |
504 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
505 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
506 |
- emake --no-print-directory -s -f - 2>/dev/null) |
507 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
508 |
- |
509 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
510 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
511 |
- sed \ |
512 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
513 |
- -e "s:@PYDOC@:pydoc${SLOT}:" \ |
514 |
- -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
515 |
- |
516 |
- # for python-exec |
517 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
518 |
- |
519 |
- # if not using a cross-compiler, use the fresh binary |
520 |
- if ! tc-is-cross-compiler; then |
521 |
- local -x PYTHON=./python |
522 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
523 |
- else |
524 |
- vars=( PYTHON "${vars[@]}" ) |
525 |
- fi |
526 |
- |
527 |
- python_export "python${SLOT}" "${vars[@]}" |
528 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
529 |
- python_domodule epython.py |
530 |
- |
531 |
- # python-exec wrapping support |
532 |
- local pymajor=${SLOT%.*} |
533 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
534 |
- # python and pythonX |
535 |
- ln -s "../../../bin/python${SLOT}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
536 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
537 |
- # python-config and pythonX-config |
538 |
- ln -s "../../../bin/python${SLOT}-config" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
539 |
- ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
540 |
- # 2to3, pydoc, pyvenv |
541 |
- ln -s "../../../bin/2to3-${SLOT}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
542 |
- ln -s "../../../bin/pydoc${SLOT}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
543 |
- # idle |
544 |
- if use tk; then |
545 |
- ln -s "../../../bin/idle${SLOT}" "${D}${PYTHON_SCRIPTDIR}/idle" || die |
546 |
- fi |
547 |
-} |
548 |
- |
549 |
-eselect_python_update() { |
550 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
551 |
- eselect python update |
552 |
- fi |
553 |
- |
554 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
555 |
- eselect python update --python${PV%%.*} |
556 |
- fi |
557 |
-} |
558 |
- |
559 |
-pkg_postinst() { |
560 |
- eselect_python_update |
561 |
-} |
562 |
- |
563 |
-pkg_postrm() { |
564 |
- eselect_python_update |
565 |
-} |
566 |
|
567 |
diff --git a/dev-lang/python/python-3.6.9.ebuild b/dev-lang/python/python-3.6.9.ebuild |
568 |
deleted file mode 100644 |
569 |
index bd7684dfc7f..00000000000 |
570 |
--- a/dev-lang/python/python-3.6.9.ebuild |
571 |
+++ /dev/null |
572 |
@@ -1,348 +0,0 @@ |
573 |
-# Copyright 1999-2020 Gentoo Authors |
574 |
-# Distributed under the terms of the GNU General Public License v2 |
575 |
- |
576 |
-EAPI="6" |
577 |
-WANT_LIBTOOL="none" |
578 |
- |
579 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
580 |
- |
581 |
-MY_P="Python-${PV}" |
582 |
-PATCHSET_VERSION="3.6.8" |
583 |
- |
584 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
585 |
-HOMEPAGE="https://www.python.org/" |
586 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
587 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
588 |
- |
589 |
-LICENSE="PSF-2" |
590 |
-SLOT="3.6/3.6m" |
591 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" |
592 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml" |
593 |
-RESTRICT="!test? ( test )" |
594 |
- |
595 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
596 |
-# If you need to apply a patch which requires python for bootstrapping, please |
597 |
-# run the bootstrap code on your dev box and include the results in the |
598 |
-# patchset. See bug 447752. |
599 |
- |
600 |
-RDEPEND="app-arch/bzip2:0= |
601 |
- app-arch/xz-utils:0= |
602 |
- dev-libs/libffi:= |
603 |
- >=sys-libs/zlib-1.1.3:0= |
604 |
- virtual/libintl |
605 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
606 |
- ncurses? ( >=sys-libs/ncurses-5.2:0= ) |
607 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
608 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
609 |
- ssl? ( |
610 |
- !libressl? ( dev-libs/openssl:0= ) |
611 |
- libressl? ( dev-libs/libressl:0= ) |
612 |
- ) |
613 |
- tk? ( |
614 |
- >=dev-lang/tcl-8.0:0= |
615 |
- >=dev-lang/tk-8.0:0= |
616 |
- dev-tcltk/blt:0= |
617 |
- dev-tcltk/tix |
618 |
- ) |
619 |
- xml? ( >=dev-libs/expat-2.1:0= )" |
620 |
-# bluetooth requires headers from bluez |
621 |
-DEPEND="${RDEPEND} |
622 |
- bluetooth? ( net-wireless/bluez ) |
623 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
624 |
- virtual/pkgconfig |
625 |
- !sys-devel/gcc[libffi(-)]" |
626 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
627 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
628 |
- |
629 |
-S="${WORKDIR}/${MY_P}" |
630 |
-PYVER=${SLOT%/*} |
631 |
- |
632 |
-src_prepare() { |
633 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
634 |
- rm -fr Modules/expat |
635 |
- rm -fr Modules/_ctypes/libffi* |
636 |
- rm -fr Modules/zlib |
637 |
- |
638 |
- local PATCHES=( |
639 |
- "${WORKDIR}/patches" |
640 |
- ) |
641 |
- |
642 |
- default |
643 |
- |
644 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
645 |
- Lib/distutils/command/install.py \ |
646 |
- Lib/distutils/sysconfig.py \ |
647 |
- Lib/site.py \ |
648 |
- Lib/sysconfig.py \ |
649 |
- Lib/test/test_site.py \ |
650 |
- Makefile.pre.in \ |
651 |
- Modules/Setup.dist \ |
652 |
- Modules/getpath.c \ |
653 |
- configure.ac \ |
654 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
655 |
- |
656 |
- eautoreconf |
657 |
-} |
658 |
- |
659 |
-src_configure() { |
660 |
- local disable |
661 |
- # disable automagic bluetooth headers detection |
662 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
663 |
- use gdbm || disable+=" gdbm" |
664 |
- use ncurses || disable+=" _curses _curses_panel" |
665 |
- use readline || disable+=" readline" |
666 |
- use sqlite || disable+=" _sqlite3" |
667 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
668 |
- use tk || disable+=" _tkinter" |
669 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
670 |
- export PYTHON_DISABLE_MODULES="${disable}" |
671 |
- |
672 |
- if ! use xml; then |
673 |
- ewarn "You have configured Python without XML support." |
674 |
- ewarn "This is NOT a recommended configuration as you" |
675 |
- ewarn "may face problems parsing any XML documents." |
676 |
- fi |
677 |
- |
678 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
679 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
680 |
- fi |
681 |
- |
682 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
683 |
- append-flags -fwrapv |
684 |
- fi |
685 |
- |
686 |
- filter-flags -malign-double |
687 |
- |
688 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
689 |
- if is-flagq -O3; then |
690 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
691 |
- use hardened && replace-flags -O3 -O2 |
692 |
- fi |
693 |
- |
694 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
695 |
- tc-export CXX |
696 |
- |
697 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
698 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
699 |
- # Please query BSD team before removing this! |
700 |
- append-ldflags "-L." |
701 |
- |
702 |
- local dbmliborder |
703 |
- if use gdbm; then |
704 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
705 |
- fi |
706 |
- |
707 |
- local myeconfargs=( |
708 |
- --with-fpectl |
709 |
- --enable-shared |
710 |
- $(use_enable ipv6) |
711 |
- $(use_with threads) |
712 |
- --infodir='${prefix}/share/info' |
713 |
- --mandir='${prefix}/share/man' |
714 |
- --with-computed-gotos |
715 |
- --with-dbmliborder="${dbmliborder}" |
716 |
- --with-libc= |
717 |
- --enable-loadable-sqlite-extensions |
718 |
- --without-ensurepip |
719 |
- --with-system-expat |
720 |
- --with-system-ffi |
721 |
- ) |
722 |
- |
723 |
- OPT="" econf "${myeconfargs[@]}" |
724 |
- |
725 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
726 |
- eerror "configure has detected that the sem_open function is broken." |
727 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
728 |
- die "Broken sem_open function (bug 496328)" |
729 |
- fi |
730 |
-} |
731 |
- |
732 |
-src_compile() { |
733 |
- # Ensure sed works as expected |
734 |
- # https://bugs.gentoo.org/594768 |
735 |
- local -x LC_ALL=C |
736 |
- |
737 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
738 |
- |
739 |
- # Work around bug 329499. See also bug 413751 and 457194. |
740 |
- if has_version dev-libs/libffi[pax_kernel]; then |
741 |
- pax-mark E python |
742 |
- else |
743 |
- pax-mark m python |
744 |
- fi |
745 |
-} |
746 |
- |
747 |
-src_test() { |
748 |
- # Tests will not work when cross compiling. |
749 |
- if tc-is-cross-compiler; then |
750 |
- elog "Disabling tests due to crosscompiling." |
751 |
- return |
752 |
- fi |
753 |
- |
754 |
- # Skip failing tests. |
755 |
- local skipped_tests="gdb" |
756 |
- |
757 |
- for test in ${skipped_tests}; do |
758 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
759 |
- done |
760 |
- |
761 |
- # bug 660358 |
762 |
- local -x COLUMNS=80 |
763 |
- |
764 |
- local -x PYTHONDONTWRITEBYTECODE= |
765 |
- |
766 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
767 |
- local result=$? |
768 |
- |
769 |
- for test in ${skipped_tests}; do |
770 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
771 |
- done |
772 |
- |
773 |
- elog "The following tests have been skipped:" |
774 |
- for test in ${skipped_tests}; do |
775 |
- elog "test_${test}.py" |
776 |
- done |
777 |
- |
778 |
- elog "If you would like to run them, you may:" |
779 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
780 |
- elog "and run the tests separately." |
781 |
- |
782 |
- if [[ ${result} -ne 0 ]]; then |
783 |
- die "emake test failed" |
784 |
- fi |
785 |
-} |
786 |
- |
787 |
-src_install() { |
788 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
789 |
- |
790 |
- emake DESTDIR="${D}" altinstall |
791 |
- |
792 |
- sed \ |
793 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
794 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
795 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
796 |
- |
797 |
- # Fix collisions between different slots of Python. |
798 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
799 |
- |
800 |
- # Cheap hack to get version with ABIFLAGS |
801 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
802 |
- if [[ ${abiver} != python${PYVER} ]]; then |
803 |
- # Replace python3.X with a symlink to python3.Xm |
804 |
- rm "${ED}usr/bin/python${PYVER}" || die |
805 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
806 |
- # Create python3.X-config symlink |
807 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
808 |
- # Create python-3.5m.pc symlink |
809 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
810 |
- fi |
811 |
- |
812 |
- # python seems to get rebuilt in src_install (bug 569908) |
813 |
- # Work around it for now. |
814 |
- if has_version dev-libs/libffi[pax_kernel]; then |
815 |
- pax-mark E "${ED}usr/bin/${abiver}" |
816 |
- else |
817 |
- pax-mark m "${ED}usr/bin/${abiver}" |
818 |
- fi |
819 |
- |
820 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
821 |
- use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
822 |
- |
823 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
824 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
825 |
- |
826 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
827 |
- |
828 |
- if use examples; then |
829 |
- insinto /usr/share/doc/${PF}/examples |
830 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
831 |
- doins -r "${S}"/Tools |
832 |
- fi |
833 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
834 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
835 |
- emake --no-print-directory -s -f - 2>/dev/null) |
836 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
837 |
- |
838 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
839 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
840 |
- sed \ |
841 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
842 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
843 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
844 |
- |
845 |
- # for python-exec |
846 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
847 |
- |
848 |
- # if not using a cross-compiler, use the fresh binary |
849 |
- if ! tc-is-cross-compiler; then |
850 |
- local -x PYTHON=./python |
851 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
852 |
- else |
853 |
- vars=( PYTHON "${vars[@]}" ) |
854 |
- fi |
855 |
- |
856 |
- python_export "python${PYVER}" "${vars[@]}" |
857 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
858 |
- python_domodule epython.py |
859 |
- |
860 |
- # python-exec wrapping support |
861 |
- local pymajor=${PYVER%.*} |
862 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
863 |
- # python and pythonX |
864 |
- ln -s "../../../bin/${abiver}" \ |
865 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
866 |
- ln -s "python${pymajor}" \ |
867 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
868 |
- # python-config and pythonX-config |
869 |
- # note: we need to create a wrapper rather than symlinking it due |
870 |
- # to some random dirname(argv[0]) magic performed by python-config |
871 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
872 |
- #!/bin/sh |
873 |
- exec "${abiver}-config" "\${@}" |
874 |
- EOF |
875 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
876 |
- ln -s "python${pymajor}-config" \ |
877 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
878 |
- # 2to3, pydoc, pyvenv |
879 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
880 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
881 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
882 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
883 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
884 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
885 |
- # idle |
886 |
- if use tk; then |
887 |
- ln -s "../../../bin/idle${PYVER}" \ |
888 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
889 |
- fi |
890 |
-} |
891 |
- |
892 |
-pkg_preinst() { |
893 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
894 |
- python_updater_warning="1" |
895 |
- fi |
896 |
-} |
897 |
- |
898 |
-eselect_python_update() { |
899 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
900 |
- eselect python update |
901 |
- fi |
902 |
- |
903 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
904 |
- eselect python update --python${PV%%.*} |
905 |
- fi |
906 |
-} |
907 |
- |
908 |
-pkg_postinst() { |
909 |
- eselect_python_update |
910 |
- |
911 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
912 |
- ewarn "You have just upgraded from an older version of Python." |
913 |
- ewarn |
914 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
915 |
- fi |
916 |
-} |
917 |
- |
918 |
-pkg_postrm() { |
919 |
- eselect_python_update |
920 |
-} |
921 |
|
922 |
diff --git a/dev-lang/python/python-3.7.5-r1.ebuild b/dev-lang/python/python-3.7.5-r1.ebuild |
923 |
deleted file mode 100644 |
924 |
index 96894e93b7f..00000000000 |
925 |
--- a/dev-lang/python/python-3.7.5-r1.ebuild |
926 |
+++ /dev/null |
927 |
@@ -1,328 +0,0 @@ |
928 |
-# Copyright 1999-2020 Gentoo Authors |
929 |
-# Distributed under the terms of the GNU General Public License v2 |
930 |
- |
931 |
-EAPI="7" |
932 |
-WANT_LIBTOOL="none" |
933 |
- |
934 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
935 |
- |
936 |
-MY_P="Python-${PV}" |
937 |
-PATCHSET_VERSION="3.7.4-1" |
938 |
- |
939 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
940 |
-HOMEPAGE="https://www.python.org/" |
941 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
942 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
943 |
- |
944 |
-LICENSE="PSF-2" |
945 |
-SLOT="3.7/3.7m" |
946 |
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86" |
947 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
948 |
-RESTRICT="!test? ( test )" |
949 |
- |
950 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
951 |
-# If you need to apply a patch which requires python for bootstrapping, please |
952 |
-# run the bootstrap code on your dev box and include the results in the |
953 |
-# patchset. See bug 447752. |
954 |
- |
955 |
-RDEPEND="app-arch/bzip2:0= |
956 |
- app-arch/xz-utils:0= |
957 |
- dev-libs/libffi:= |
958 |
- sys-apps/util-linux:0= |
959 |
- >=sys-libs/zlib-1.1.3:0= |
960 |
- virtual/libintl |
961 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
962 |
- ncurses? ( >=sys-libs/ncurses-5.2:0= ) |
963 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
964 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
965 |
- ssl? ( |
966 |
- !libressl? ( dev-libs/openssl:0= ) |
967 |
- libressl? ( dev-libs/libressl:0= ) |
968 |
- ) |
969 |
- tk? ( |
970 |
- >=dev-lang/tcl-8.0:0= |
971 |
- >=dev-lang/tk-8.0:0= |
972 |
- dev-tcltk/blt:0= |
973 |
- dev-tcltk/tix |
974 |
- ) |
975 |
- xml? ( >=dev-libs/expat-2.1:0= )" |
976 |
-# bluetooth requires headers from bluez |
977 |
-DEPEND="${RDEPEND} |
978 |
- bluetooth? ( net-wireless/bluez ) |
979 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
980 |
- virtual/pkgconfig |
981 |
- !sys-devel/gcc[libffi(-)]" |
982 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
983 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
984 |
- |
985 |
-S="${WORKDIR}/${MY_P}" |
986 |
-PYVER=${SLOT%/*} |
987 |
- |
988 |
-src_prepare() { |
989 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
990 |
- rm -fr Modules/expat |
991 |
- rm -fr Modules/_ctypes/libffi* |
992 |
- rm -fr Modules/zlib |
993 |
- |
994 |
- local PATCHES=( |
995 |
- "${FILESDIR}/python-3.7.5-hashlib.patch" |
996 |
- "${WORKDIR}/patches" |
997 |
- ) |
998 |
- |
999 |
- default |
1000 |
- |
1001 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1002 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1003 |
- |
1004 |
- eautoreconf |
1005 |
-} |
1006 |
- |
1007 |
-src_configure() { |
1008 |
- local disable |
1009 |
- # disable automagic bluetooth headers detection |
1010 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1011 |
- use gdbm || disable+=" gdbm" |
1012 |
- use ncurses || disable+=" _curses _curses_panel" |
1013 |
- use readline || disable+=" readline" |
1014 |
- use sqlite || disable+=" _sqlite3" |
1015 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1016 |
- use tk || disable+=" _tkinter" |
1017 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1018 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1019 |
- |
1020 |
- if ! use xml; then |
1021 |
- ewarn "You have configured Python without XML support." |
1022 |
- ewarn "This is NOT a recommended configuration as you" |
1023 |
- ewarn "may face problems parsing any XML documents." |
1024 |
- fi |
1025 |
- |
1026 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1027 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1028 |
- fi |
1029 |
- |
1030 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1031 |
- append-flags -fwrapv |
1032 |
- fi |
1033 |
- |
1034 |
- filter-flags -malign-double |
1035 |
- |
1036 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1037 |
- if is-flagq -O3; then |
1038 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1039 |
- use hardened && replace-flags -O3 -O2 |
1040 |
- fi |
1041 |
- |
1042 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1043 |
- tc-export CXX |
1044 |
- |
1045 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1046 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1047 |
- # Please query BSD team before removing this! |
1048 |
- append-ldflags "-L." |
1049 |
- |
1050 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1051 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1052 |
- |
1053 |
- local dbmliborder |
1054 |
- if use gdbm; then |
1055 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1056 |
- fi |
1057 |
- |
1058 |
- local myeconfargs=( |
1059 |
- --enable-shared |
1060 |
- $(use_enable ipv6) |
1061 |
- --infodir='${prefix}/share/info' |
1062 |
- --mandir='${prefix}/share/man' |
1063 |
- --with-computed-gotos |
1064 |
- --with-dbmliborder="${dbmliborder}" |
1065 |
- --with-libc= |
1066 |
- --enable-loadable-sqlite-extensions |
1067 |
- --without-ensurepip |
1068 |
- --with-system-expat |
1069 |
- --with-system-ffi |
1070 |
- ) |
1071 |
- |
1072 |
- OPT="" econf "${myeconfargs[@]}" |
1073 |
-} |
1074 |
- |
1075 |
-src_compile() { |
1076 |
- # Ensure sed works as expected |
1077 |
- # https://bugs.gentoo.org/594768 |
1078 |
- local -x LC_ALL=C |
1079 |
- |
1080 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1081 |
- |
1082 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1083 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1084 |
- pax-mark E python |
1085 |
- else |
1086 |
- pax-mark m python |
1087 |
- fi |
1088 |
-} |
1089 |
- |
1090 |
-src_test() { |
1091 |
- # Tests will not work when cross compiling. |
1092 |
- if tc-is-cross-compiler; then |
1093 |
- elog "Disabling tests due to crosscompiling." |
1094 |
- return |
1095 |
- fi |
1096 |
- |
1097 |
- # Skip failing tests. |
1098 |
- local skipped_tests="gdb" |
1099 |
- |
1100 |
- for test in ${skipped_tests}; do |
1101 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1102 |
- done |
1103 |
- |
1104 |
- # bug 660358 |
1105 |
- local -x COLUMNS=80 |
1106 |
- |
1107 |
- local -x PYTHONDONTWRITEBYTECODE= |
1108 |
- |
1109 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1110 |
- local result=$? |
1111 |
- |
1112 |
- for test in ${skipped_tests}; do |
1113 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1114 |
- done |
1115 |
- |
1116 |
- elog "The following tests have been skipped:" |
1117 |
- for test in ${skipped_tests}; do |
1118 |
- elog "test_${test}.py" |
1119 |
- done |
1120 |
- |
1121 |
- elog "If you would like to run them, you may:" |
1122 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1123 |
- elog "and run the tests separately." |
1124 |
- |
1125 |
- if [[ ${result} -ne 0 ]]; then |
1126 |
- die "emake test failed" |
1127 |
- fi |
1128 |
-} |
1129 |
- |
1130 |
-src_install() { |
1131 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1132 |
- |
1133 |
- emake DESTDIR="${D}" altinstall |
1134 |
- |
1135 |
- sed \ |
1136 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1137 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1138 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1139 |
- |
1140 |
- # Fix collisions between different slots of Python. |
1141 |
- rm -f "${ED}/usr/$(get_libdir)/libpython3.so" |
1142 |
- |
1143 |
- # Cheap hack to get version with ABIFLAGS |
1144 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1145 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1146 |
- # Replace python3.X with a symlink to python3.Xm |
1147 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1148 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1149 |
- # Create python3.X-config symlink |
1150 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1151 |
- # Create python-3.5m.pc symlink |
1152 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1153 |
- fi |
1154 |
- |
1155 |
- # python seems to get rebuilt in src_install (bug 569908) |
1156 |
- # Work around it for now. |
1157 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1158 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1159 |
- else |
1160 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1161 |
- fi |
1162 |
- |
1163 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1164 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1165 |
- |
1166 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
1167 |
- |
1168 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
1169 |
- |
1170 |
- if use examples; then |
1171 |
- insinto /usr/share/doc/${PF}/examples |
1172 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
1173 |
- doins -r "${S}"/Tools |
1174 |
- fi |
1175 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1176 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1177 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1178 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1179 |
- |
1180 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1181 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1182 |
- sed \ |
1183 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1184 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1185 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1186 |
- |
1187 |
- # for python-exec |
1188 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1189 |
- |
1190 |
- # if not using a cross-compiler, use the fresh binary |
1191 |
- if ! tc-is-cross-compiler; then |
1192 |
- local -x PYTHON=./python |
1193 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1194 |
- else |
1195 |
- vars=( PYTHON "${vars[@]}" ) |
1196 |
- fi |
1197 |
- |
1198 |
- python_export "python${PYVER}" "${vars[@]}" |
1199 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1200 |
- python_domodule epython.py |
1201 |
- |
1202 |
- # python-exec wrapping support |
1203 |
- local pymajor=${PYVER%.*} |
1204 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1205 |
- # python and pythonX |
1206 |
- ln -s "../../../bin/${abiver}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1207 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
1208 |
- # python-config and pythonX-config |
1209 |
- # note: we need to create a wrapper rather than symlinking it due |
1210 |
- # to some random dirname(argv[0]) magic performed by python-config |
1211 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1212 |
- #!/bin/sh |
1213 |
- exec "${abiver}-config" "\${@}" |
1214 |
- EOF |
1215 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1216 |
- ln -s "python${pymajor}-config" "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1217 |
- # 2to3, pydoc, pyvenv |
1218 |
- ln -s "../../../bin/2to3-${PYVER}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1219 |
- ln -s "../../../bin/pydoc${PYVER}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1220 |
- ln -s "../../../bin/pyvenv-${PYVER}" "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
1221 |
- # idle |
1222 |
- if use tk; then |
1223 |
- ln -s "../../../bin/idle${PYVER}" "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1224 |
- fi |
1225 |
-} |
1226 |
- |
1227 |
-pkg_preinst() { |
1228 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1229 |
- python_updater_warning="1" |
1230 |
- fi |
1231 |
-} |
1232 |
- |
1233 |
-eselect_python_update() { |
1234 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then |
1235 |
- eselect python update |
1236 |
- fi |
1237 |
- |
1238 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
1239 |
- eselect python update --python${PV%%.*} |
1240 |
- fi |
1241 |
-} |
1242 |
- |
1243 |
-pkg_postinst() { |
1244 |
- eselect_python_update |
1245 |
- |
1246 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1247 |
- ewarn "You have just upgraded from an older version of Python." |
1248 |
- ewarn |
1249 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1250 |
- fi |
1251 |
-} |
1252 |
- |
1253 |
-pkg_postrm() { |
1254 |
- eselect_python_update |
1255 |
-} |
1256 |
|
1257 |
diff --git a/dev-lang/python/python-3.8.1.ebuild b/dev-lang/python/python-3.8.1.ebuild |
1258 |
deleted file mode 100644 |
1259 |
index b499fa145ea..00000000000 |
1260 |
--- a/dev-lang/python/python-3.8.1.ebuild |
1261 |
+++ /dev/null |
1262 |
@@ -1,343 +0,0 @@ |
1263 |
-# Copyright 1999-2020 Gentoo Authors |
1264 |
-# Distributed under the terms of the GNU General Public License v2 |
1265 |
- |
1266 |
-EAPI="7" |
1267 |
-WANT_LIBTOOL="none" |
1268 |
- |
1269 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
1270 |
- |
1271 |
-MY_P="Python-${PV}" |
1272 |
-PYVER=$(ver_cut 1-2) |
1273 |
-PATCHSET="python-gentoo-patches-${PV}-r2" |
1274 |
- |
1275 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1276 |
-HOMEPAGE="https://www.python.org/" |
1277 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
1278 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
1279 |
-S="${WORKDIR}/${MY_P}" |
1280 |
- |
1281 |
-LICENSE="PSF-2" |
1282 |
-SLOT="${PYVER}" |
1283 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" |
1284 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
1285 |
-RESTRICT="!test? ( test )" |
1286 |
- |
1287 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1288 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1289 |
-# run the bootstrap code on your dev box and include the results in the |
1290 |
-# patchset. See bug 447752. |
1291 |
- |
1292 |
-RDEPEND="app-arch/bzip2:= |
1293 |
- app-arch/xz-utils:= |
1294 |
- dev-libs/libffi:= |
1295 |
- sys-apps/util-linux:= |
1296 |
- >=sys-libs/zlib-1.1.3:= |
1297 |
- virtual/libcrypt:= |
1298 |
- virtual/libintl |
1299 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1300 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1301 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1302 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1303 |
- ssl? ( |
1304 |
- !libressl? ( dev-libs/openssl:= ) |
1305 |
- libressl? ( dev-libs/libressl:= ) |
1306 |
- ) |
1307 |
- tk? ( |
1308 |
- >=dev-lang/tcl-8.0:= |
1309 |
- >=dev-lang/tk-8.0:= |
1310 |
- dev-tcltk/blt:= |
1311 |
- dev-tcltk/tix |
1312 |
- ) |
1313 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1314 |
-# bluetooth requires headers from bluez |
1315 |
-DEPEND="${RDEPEND} |
1316 |
- bluetooth? ( net-wireless/bluez ) |
1317 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
1318 |
- virtual/pkgconfig |
1319 |
- !sys-devel/gcc[libffi(-)]" |
1320 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1321 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1322 |
- |
1323 |
-src_prepare() { |
1324 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1325 |
- rm -fr Modules/expat || die |
1326 |
- rm -fr Modules/_ctypes/libffi* || die |
1327 |
- rm -fr Modules/zlib || die |
1328 |
- |
1329 |
- local PATCHES=( |
1330 |
- "${WORKDIR}/${PATCHSET}" |
1331 |
- ) |
1332 |
- |
1333 |
- default |
1334 |
- |
1335 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1336 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1337 |
- |
1338 |
- eautoreconf |
1339 |
-} |
1340 |
- |
1341 |
-src_configure() { |
1342 |
- local disable |
1343 |
- # disable automagic bluetooth headers detection |
1344 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1345 |
- use gdbm || disable+=" gdbm" |
1346 |
- use ncurses || disable+=" _curses _curses_panel" |
1347 |
- use readline || disable+=" readline" |
1348 |
- use sqlite || disable+=" _sqlite3" |
1349 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1350 |
- use tk || disable+=" _tkinter" |
1351 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1352 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1353 |
- |
1354 |
- if ! use xml; then |
1355 |
- ewarn "You have configured Python without XML support." |
1356 |
- ewarn "This is NOT a recommended configuration as you" |
1357 |
- ewarn "may face problems parsing any XML documents." |
1358 |
- fi |
1359 |
- |
1360 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1361 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1362 |
- fi |
1363 |
- |
1364 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1365 |
- append-flags -fwrapv |
1366 |
- fi |
1367 |
- |
1368 |
- filter-flags -malign-double |
1369 |
- |
1370 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1371 |
- if is-flagq -O3; then |
1372 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1373 |
- use hardened && replace-flags -O3 -O2 |
1374 |
- fi |
1375 |
- |
1376 |
- # https://bugs.gentoo.org/700012 |
1377 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1378 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1379 |
- fi |
1380 |
- |
1381 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1382 |
- tc-export CXX |
1383 |
- |
1384 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1385 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1386 |
- # Please query BSD team before removing this! |
1387 |
- append-ldflags "-L." |
1388 |
- |
1389 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1390 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1391 |
- |
1392 |
- local dbmliborder |
1393 |
- if use gdbm; then |
1394 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1395 |
- fi |
1396 |
- |
1397 |
- local myeconfargs=( |
1398 |
- --enable-shared |
1399 |
- $(use_enable ipv6) |
1400 |
- --infodir='${prefix}/share/info' |
1401 |
- --mandir='${prefix}/share/man' |
1402 |
- --with-computed-gotos |
1403 |
- --with-dbmliborder="${dbmliborder}" |
1404 |
- --with-libc= |
1405 |
- --enable-loadable-sqlite-extensions |
1406 |
- --without-ensurepip |
1407 |
- --with-system-expat |
1408 |
- --with-system-ffi |
1409 |
- ) |
1410 |
- |
1411 |
- OPT="" econf "${myeconfargs[@]}" |
1412 |
-} |
1413 |
- |
1414 |
-src_compile() { |
1415 |
- # Ensure sed works as expected |
1416 |
- # https://bugs.gentoo.org/594768 |
1417 |
- local -x LC_ALL=C |
1418 |
- |
1419 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1420 |
- |
1421 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1422 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1423 |
- pax-mark E python |
1424 |
- else |
1425 |
- pax-mark m python |
1426 |
- fi |
1427 |
-} |
1428 |
- |
1429 |
-src_test() { |
1430 |
- # Tests will not work when cross compiling. |
1431 |
- if tc-is-cross-compiler; then |
1432 |
- elog "Disabling tests due to crosscompiling." |
1433 |
- return |
1434 |
- fi |
1435 |
- |
1436 |
- # Skip failing tests. |
1437 |
- local skipped_tests="gdb" |
1438 |
- |
1439 |
- for test in ${skipped_tests}; do |
1440 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1441 |
- done |
1442 |
- |
1443 |
- # bug 660358 |
1444 |
- local -x COLUMNS=80 |
1445 |
- |
1446 |
- local -x PYTHONDONTWRITEBYTECODE= |
1447 |
- |
1448 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1449 |
- local result=$? |
1450 |
- |
1451 |
- for test in ${skipped_tests}; do |
1452 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1453 |
- done |
1454 |
- |
1455 |
- elog "The following tests have been skipped:" |
1456 |
- for test in ${skipped_tests}; do |
1457 |
- elog "test_${test}.py" |
1458 |
- done |
1459 |
- |
1460 |
- elog "If you would like to run them, you may:" |
1461 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1462 |
- elog "and run the tests separately." |
1463 |
- |
1464 |
- if [[ ${result} -ne 0 ]]; then |
1465 |
- die "emake test failed" |
1466 |
- fi |
1467 |
-} |
1468 |
- |
1469 |
-src_install() { |
1470 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1471 |
- |
1472 |
- emake DESTDIR="${D}" altinstall |
1473 |
- |
1474 |
- # Remove static library |
1475 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1476 |
- |
1477 |
- sed \ |
1478 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1479 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1480 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1481 |
- |
1482 |
- # Fix collisions between different slots of Python. |
1483 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1484 |
- |
1485 |
- # Cheap hack to get version with ABIFLAGS |
1486 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1487 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1488 |
- # Replace python3.X with a symlink to python3.Xm |
1489 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1490 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1491 |
- # Create python3.X-config symlink |
1492 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1493 |
- # Create python-3.5m.pc symlink |
1494 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1495 |
- fi |
1496 |
- |
1497 |
- # python seems to get rebuilt in src_install (bug 569908) |
1498 |
- # Work around it for now. |
1499 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1500 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1501 |
- else |
1502 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1503 |
- fi |
1504 |
- |
1505 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1506 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1507 |
- |
1508 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
1509 |
- |
1510 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1511 |
- |
1512 |
- if use examples; then |
1513 |
- docinto examples |
1514 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1515 |
- dodoc -r Tools |
1516 |
- fi |
1517 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1518 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1519 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1520 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1521 |
- |
1522 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1523 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1524 |
- sed \ |
1525 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1526 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1527 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1528 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1529 |
- |
1530 |
- # for python-exec |
1531 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1532 |
- |
1533 |
- # if not using a cross-compiler, use the fresh binary |
1534 |
- if ! tc-is-cross-compiler; then |
1535 |
- local -x PYTHON=./python |
1536 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1537 |
- else |
1538 |
- vars=( PYTHON "${vars[@]}" ) |
1539 |
- fi |
1540 |
- |
1541 |
- python_export "python${PYVER}" "${vars[@]}" |
1542 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1543 |
- python_domodule epython.py |
1544 |
- |
1545 |
- # python-exec wrapping support |
1546 |
- local pymajor=${PYVER%.*} |
1547 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1548 |
- # python and pythonX |
1549 |
- ln -s "../../../bin/${abiver}" \ |
1550 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1551 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
1552 |
- # python-config and pythonX-config |
1553 |
- # note: we need to create a wrapper rather than symlinking it due |
1554 |
- # to some random dirname(argv[0]) magic performed by python-config |
1555 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1556 |
- #!/bin/sh |
1557 |
- exec "${abiver}-config" "\${@}" |
1558 |
- EOF |
1559 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1560 |
- ln -s "python${pymajor}-config" \ |
1561 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1562 |
- # 2to3, pydoc |
1563 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1564 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1565 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1566 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1567 |
- # idle |
1568 |
- if use tk; then |
1569 |
- ln -s "../../../bin/idle${PYVER}" \ |
1570 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1571 |
- fi |
1572 |
-} |
1573 |
- |
1574 |
-pkg_preinst() { |
1575 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1576 |
- python_updater_warning="1" |
1577 |
- fi |
1578 |
-} |
1579 |
- |
1580 |
-eselect_python_update() { |
1581 |
- if [[ -z "$(eselect python show)" || \ |
1582 |
- ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then |
1583 |
- eselect python update |
1584 |
- fi |
1585 |
- |
1586 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || \ |
1587 |
- ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] |
1588 |
- then |
1589 |
- eselect python update --python${PV%%.*} |
1590 |
- fi |
1591 |
-} |
1592 |
- |
1593 |
-pkg_postinst() { |
1594 |
- eselect_python_update |
1595 |
- |
1596 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1597 |
- ewarn "You have just upgraded from an older version of Python." |
1598 |
- ewarn |
1599 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1600 |
- fi |
1601 |
-} |
1602 |
- |
1603 |
-pkg_postrm() { |
1604 |
- eselect_python_update |
1605 |
-} |
1606 |
|
1607 |
diff --git a/dev-lang/python/python-3.9.0_alpha2.ebuild b/dev-lang/python/python-3.9.0_alpha2.ebuild |
1608 |
deleted file mode 100644 |
1609 |
index 008fa25cdf6..00000000000 |
1610 |
--- a/dev-lang/python/python-3.9.0_alpha2.ebuild |
1611 |
+++ /dev/null |
1612 |
@@ -1,324 +0,0 @@ |
1613 |
-# Copyright 1999-2020 Gentoo Authors |
1614 |
-# Distributed under the terms of the GNU General Public License v2 |
1615 |
- |
1616 |
-EAPI="7" |
1617 |
-WANT_LIBTOOL="none" |
1618 |
- |
1619 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
1620 |
- toolchain-funcs |
1621 |
- |
1622 |
-MY_P="Python-${PV/_alpha/a}" |
1623 |
-PYVER=$(ver_cut 1-2) |
1624 |
-PATCHSET="python-gentoo-patches-${PV}" |
1625 |
- |
1626 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1627 |
-HOMEPAGE="https://www.python.org/" |
1628 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
1629 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
1630 |
-S="${WORKDIR}/${MY_P}" |
1631 |
- |
1632 |
-LICENSE="PSF-2" |
1633 |
-SLOT="${PYVER}" |
1634 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" |
1635 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
1636 |
-RESTRICT="!test? ( test )" |
1637 |
- |
1638 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1639 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1640 |
-# run the bootstrap code on your dev box and include the results in the |
1641 |
-# patchset. See bug 447752. |
1642 |
- |
1643 |
-RDEPEND="app-arch/bzip2:= |
1644 |
- app-arch/xz-utils:= |
1645 |
- dev-libs/libffi:= |
1646 |
- sys-apps/util-linux:= |
1647 |
- >=sys-libs/zlib-1.1.3:= |
1648 |
- virtual/libcrypt:= |
1649 |
- virtual/libintl |
1650 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1651 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1652 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1653 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1654 |
- ssl? ( |
1655 |
- !libressl? ( dev-libs/openssl:= ) |
1656 |
- libressl? ( dev-libs/libressl:= ) |
1657 |
- ) |
1658 |
- tk? ( |
1659 |
- >=dev-lang/tcl-8.0:= |
1660 |
- >=dev-lang/tk-8.0:= |
1661 |
- dev-tcltk/blt:= |
1662 |
- dev-tcltk/tix |
1663 |
- ) |
1664 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1665 |
-# bluetooth requires headers from bluez |
1666 |
-DEPEND="${RDEPEND} |
1667 |
- bluetooth? ( net-wireless/bluez ) |
1668 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
1669 |
- virtual/pkgconfig |
1670 |
- !sys-devel/gcc[libffi(-)]" |
1671 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1672 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1673 |
- |
1674 |
-# large file tests involve a 2.5G file being copied (duplicated) |
1675 |
-CHECKREQS_DISK_BUILD=5500M |
1676 |
- |
1677 |
-pkg_pretend() { |
1678 |
- use test && check-reqs_pkg_pretend |
1679 |
- |
1680 |
- ewarn "This is an early developer preview of Python 3.9. New features" |
1681 |
- ewarn "can still be added up to 2020-05-18. It's not suitable for production" |
1682 |
- ewarn "use, and it is not supported for Gentoo packages." |
1683 |
-} |
1684 |
- |
1685 |
-pkg_setup() { |
1686 |
- use test && check-reqs_pkg_setup |
1687 |
-} |
1688 |
- |
1689 |
-src_prepare() { |
1690 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1691 |
- rm -fr Modules/expat || die |
1692 |
- rm -fr Modules/_ctypes/libffi* || die |
1693 |
- rm -fr Modules/zlib || die |
1694 |
- |
1695 |
- local PATCHES=( |
1696 |
- "${WORKDIR}/${PATCHSET}" |
1697 |
- ) |
1698 |
- |
1699 |
- default |
1700 |
- |
1701 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1702 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1703 |
- |
1704 |
- eautoreconf |
1705 |
-} |
1706 |
- |
1707 |
-src_configure() { |
1708 |
- local disable |
1709 |
- # disable automagic bluetooth headers detection |
1710 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1711 |
- use gdbm || disable+=" gdbm" |
1712 |
- use ncurses || disable+=" _curses _curses_panel" |
1713 |
- use readline || disable+=" readline" |
1714 |
- use sqlite || disable+=" _sqlite3" |
1715 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1716 |
- use tk || disable+=" _tkinter" |
1717 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1718 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1719 |
- |
1720 |
- if ! use xml; then |
1721 |
- ewarn "You have configured Python without XML support." |
1722 |
- ewarn "This is NOT a recommended configuration as you" |
1723 |
- ewarn "may face problems parsing any XML documents." |
1724 |
- fi |
1725 |
- |
1726 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1727 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1728 |
- fi |
1729 |
- |
1730 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1731 |
- append-flags -fwrapv |
1732 |
- fi |
1733 |
- |
1734 |
- filter-flags -malign-double |
1735 |
- |
1736 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1737 |
- if is-flagq -O3; then |
1738 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1739 |
- use hardened && replace-flags -O3 -O2 |
1740 |
- fi |
1741 |
- |
1742 |
- # https://bugs.gentoo.org/700012 |
1743 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1744 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1745 |
- fi |
1746 |
- |
1747 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1748 |
- tc-export CXX |
1749 |
- |
1750 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1751 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1752 |
- # Please query BSD team before removing this! |
1753 |
- append-ldflags "-L." |
1754 |
- |
1755 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1756 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1757 |
- |
1758 |
- local dbmliborder |
1759 |
- if use gdbm; then |
1760 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1761 |
- fi |
1762 |
- |
1763 |
- local myeconfargs=( |
1764 |
- --enable-shared |
1765 |
- $(use_enable ipv6) |
1766 |
- --infodir='${prefix}/share/info' |
1767 |
- --mandir='${prefix}/share/man' |
1768 |
- --with-computed-gotos |
1769 |
- --with-dbmliborder="${dbmliborder}" |
1770 |
- --with-libc= |
1771 |
- --enable-loadable-sqlite-extensions |
1772 |
- --without-ensurepip |
1773 |
- --with-system-expat |
1774 |
- --with-system-ffi |
1775 |
- ) |
1776 |
- |
1777 |
- OPT="" econf "${myeconfargs[@]}" |
1778 |
-} |
1779 |
- |
1780 |
-src_compile() { |
1781 |
- # Ensure sed works as expected |
1782 |
- # https://bugs.gentoo.org/594768 |
1783 |
- local -x LC_ALL=C |
1784 |
- |
1785 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1786 |
- |
1787 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1788 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1789 |
- pax-mark E python |
1790 |
- else |
1791 |
- pax-mark m python |
1792 |
- fi |
1793 |
-} |
1794 |
- |
1795 |
-src_test() { |
1796 |
- # Tests will not work when cross compiling. |
1797 |
- if tc-is-cross-compiler; then |
1798 |
- elog "Disabling tests due to crosscompiling." |
1799 |
- return |
1800 |
- fi |
1801 |
- |
1802 |
- # Skip failing tests. |
1803 |
- local skipped_tests="gdb" |
1804 |
- |
1805 |
- for test in ${skipped_tests}; do |
1806 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1807 |
- done |
1808 |
- |
1809 |
- # bug 660358 |
1810 |
- local -x COLUMNS=80 |
1811 |
- |
1812 |
- local -x PYTHONDONTWRITEBYTECODE= |
1813 |
- |
1814 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1815 |
- local result=$? |
1816 |
- |
1817 |
- for test in ${skipped_tests}; do |
1818 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1819 |
- done |
1820 |
- |
1821 |
- elog "The following tests have been skipped:" |
1822 |
- for test in ${skipped_tests}; do |
1823 |
- elog "test_${test}.py" |
1824 |
- done |
1825 |
- |
1826 |
- elog "If you would like to run them, you may:" |
1827 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1828 |
- elog "and run the tests separately." |
1829 |
- |
1830 |
- if [[ ${result} -ne 0 ]]; then |
1831 |
- die "emake test failed" |
1832 |
- fi |
1833 |
-} |
1834 |
- |
1835 |
-src_install() { |
1836 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1837 |
- |
1838 |
- emake DESTDIR="${D}" altinstall |
1839 |
- |
1840 |
- # Remove static library |
1841 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1842 |
- |
1843 |
- sed \ |
1844 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1845 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1846 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1847 |
- |
1848 |
- # Fix collisions between different slots of Python. |
1849 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1850 |
- |
1851 |
- # Cheap hack to get version with ABIFLAGS |
1852 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1853 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1854 |
- # Replace python3.X with a symlink to python3.Xm |
1855 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1856 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1857 |
- # Create python3.X-config symlink |
1858 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1859 |
- # Create python-3.5m.pc symlink |
1860 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1861 |
- fi |
1862 |
- |
1863 |
- # python seems to get rebuilt in src_install (bug 569908) |
1864 |
- # Work around it for now. |
1865 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1866 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1867 |
- else |
1868 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1869 |
- fi |
1870 |
- |
1871 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1872 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1873 |
- |
1874 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1875 |
- |
1876 |
- if use examples; then |
1877 |
- docinto examples |
1878 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1879 |
- dodoc -r Tools |
1880 |
- fi |
1881 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1882 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1883 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1884 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1885 |
- |
1886 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1887 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1888 |
- sed \ |
1889 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1890 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1891 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1892 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1893 |
- |
1894 |
- # for python-exec |
1895 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1896 |
- |
1897 |
- # if not using a cross-compiler, use the fresh binary |
1898 |
- if ! tc-is-cross-compiler; then |
1899 |
- local -x PYTHON=./python |
1900 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1901 |
- else |
1902 |
- vars=( PYTHON "${vars[@]}" ) |
1903 |
- fi |
1904 |
- |
1905 |
- python_export "python${PYVER}" "${vars[@]}" |
1906 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1907 |
- python_domodule epython.py |
1908 |
- |
1909 |
- # python-exec wrapping support |
1910 |
- local pymajor=${PYVER%.*} |
1911 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1912 |
- # python and pythonX |
1913 |
- ln -s "../../../bin/${abiver}" \ |
1914 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1915 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
1916 |
- # python-config and pythonX-config |
1917 |
- # note: we need to create a wrapper rather than symlinking it due |
1918 |
- # to some random dirname(argv[0]) magic performed by python-config |
1919 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1920 |
- #!/bin/sh |
1921 |
- exec "${abiver}-config" "\${@}" |
1922 |
- EOF |
1923 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1924 |
- ln -s "python${pymajor}-config" \ |
1925 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1926 |
- # 2to3, pydoc |
1927 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1928 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1929 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1930 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1931 |
- # idle |
1932 |
- if use tk; then |
1933 |
- ln -s "../../../bin/idle${PYVER}" \ |
1934 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1935 |
- fi |
1936 |
-} |