1 |
commit: c67770b203c690e98b0571795c962d6744f69578 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 4 07:31:34 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 4 08:48:05 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c67770b2 |
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 | 9 - |
13 |
dev-lang/python/files/test-__all__-numpy.patch | 13 - |
14 |
.../files/test.support.unlink-ignore-EACCES.patch | 28 -- |
15 |
...est.support.unlink-ignore-PermissionError.patch | 28 -- |
16 |
dev-lang/python/python-2.7.17-r2.ebuild | 369 --------------------- |
17 |
dev-lang/python/python-3.6.10-r1.ebuild | 360 -------------------- |
18 |
dev-lang/python/python-3.7.7-r1.ebuild | 346 ------------------- |
19 |
dev-lang/python/python-3.8.2-r1.ebuild | 351 -------------------- |
20 |
dev-lang/python/python-3.9.0_alpha6.ebuild | 327 ------------------ |
21 |
dev-lang/python/python-3.9.0_beta1.ebuild | 323 ------------------ |
22 |
dev-lang/python/python-3.9.0_beta2.ebuild | 323 ------------------ |
23 |
11 files changed, 2477 deletions(-) |
24 |
|
25 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
26 |
index 5d1ad15fbaf..a45e3926ce8 100644 |
27 |
--- a/dev-lang/python/Manifest |
28 |
+++ b/dev-lang/python/Manifest |
29 |
@@ -1,24 +1,15 @@ |
30 |
-DIST Python-2.7.17.tar.xz 12855568 BLAKE2B 6d09214a51d6595fe5253a279ee556d7510dcb9a0e8ad71e9cf73b4fb00c3abd3680e2429f4f87d9387d1fc16d4887f5f33fc600b24b0ca2c70f36bf34df2157 SHA512 2dc19a0b0d818c71429dae94783e58b2aac0fa31f5faa1e840cac06245a59932ecc4658d913515736601bcf70a78c9ec60367aed75f4567d1e41ff3bb104da9a |
31 |
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c |
32 |
DIST Python-3.6.10.tar.xz 17212220 BLAKE2B 822e231cf2755e6477e49e9128a983185a4f1e30e9d6c221f1b5720891c0de345e8c5402af458d3627eba124e75fea4b5daa94e01b0eaddc116dc3281263ecbe SHA512 26147099e1f1a0ffc85febad26e18e991f019599a150887ea0b925e34663fad8e03b3c2a941e2770c1a63960695e173ef32709572c9361e7f2cb862ccf75b28a |
33 |
DIST Python-3.7.7.tar.xz 17268888 BLAKE2B 5f16c9559249470a9e6c0aa686965e7d78ce0f7364b5d03fc9590613c7a5456f92835340e49bf9becbec18b18d1e5a6fc318b6e30f2349da3246a918cf8b05ff SHA512 ddc838a7b0c442c2e465616f20231f2b703ed6b69ed2dc17858aac8760814fdf7cff43d350d359300e47b6bb1f0bd38c31126b855e423a3a65ed06a8fa16d136 |
34 |
DIST Python-3.7.8.tar.xz 17399552 BLAKE2B 4bf6c47b1132b6d31a79232002c4d38e2cd123ac05d52b21d6bfba5a4e19ec9130b8df8698d5ce6627e4297c4cf756643f036e694e36364c235306c72ef34bf8 SHA512 d2ba299e3cf8ed0f8fed9317f42bcd8d9af7e0e6175939b4be1be289c1658418bed17899e2608d762ffb15575021956cf6bf2054d7863c04b3bd7642f5b8c7ea |
35 |
DIST Python-3.8.2.tar.xz 17869888 BLAKE2B f42b35bea5e65f1f0a3fa6f1fd3d749fba3fa46d958608a314c1a98d0e3ca890e856da4d40ee489fe546fc02ce0fc9fa2daaaba96a8928d92ae7eb3d2dda3fe4 SHA512 ca37ad0e7c5845f5f228566aa8ff654a8f428c7d4a5aaabff29baebb0ca3219b31ba8bb2607f89e37cf3fc564f023b8407e53a4f2c47bd99122c1cc222613e37 |
36 |
DIST Python-3.8.3.tar.xz 17912964 BLAKE2B 9c415823f70bad97936e0472fc53a1b7650cbf0082da714266095dec74e0cd4a48c9477ad03fbb75fdc2cd8e41ef3aa5839e38fc69751720f5cb5c7fc77cce17 SHA512 3103bd8d944f3905eee3a2b52fd1f5c7dee380f9c5a99ad35a401fcba5a9117c3860ecec5cb47a92712c6549442fd2fa553a15c5657241dd09f5d00b9ed4f0f4 |
37 |
-DIST Python-3.9.0a6.tar.xz 18202376 BLAKE2B 32f04613a3b11341759eb98fd4b16edcb890a9ce19a4d5031aecdccd985a5462248fcd0e7bf478e2f23490ad85b36c760c14398f2b238e26038a476831f004d2 SHA512 edb71840347ab2b5e18b3a2b831a3d9a26e1af52de9b1c6c088ce2d20f8e96a22c87fc3677b62e49c91a00d8b531028bdc739f00fe220dbdeb343daf17829be4 |
38 |
-DIST Python-3.9.0b1.tar.xz 18443584 BLAKE2B 156f128fccb045f7d367f3f7c4c8ba3dc5b0e232c551bc24ed3a8be8b2199a66cde3671d6b1c4b75286618ed7af81ae60bf7db4a05c6de7c799a5f5c48b2f2ac SHA512 ed82ed2ef58940129d940b613c6495517741ebf3d6834b1e2498b294f1c4485d1cb180455d345937fe5a1da529a9df6278a17e7fe6aa5a4c6151745119b866bb |
39 |
-DIST Python-3.9.0b2.tar.xz 18489152 BLAKE2B e72afe6bd3a338d313a226f9c4055973cb7fb5de5581df48cb48e62bd0762edc712c94eee01465eaf522b5926a0546383bba797f7a7d2dbe09ea01ada843b7f4 SHA512 adf444c2884eab3df3682a0af4f852c375868b6a9718c9fb87fe7419ec46371b1cbd499abae3f04f72d42b864b7ad86f7ae9890658b8ee75987f4cc675d97ab9 |
40 |
DIST Python-3.9.0b3.tar.xz 18518204 BLAKE2B fa1707f0d55a83e739e9ad51979f8aff9720588a8a77b7ce8beb9ecf599955677758dec1551a0549b010f86c1f8fbc5915cef34d63097534d1c512c92fad5bd1 SHA512 c06a6b874fbce93ec37402034158a7bab44cab775d6da467eaddc1eb402663415f9d788e657a204f17dffe5fa6f379379f9215b5198ec5071565486b6f0e4a2a |
41 |
DIST Python-3.9.0b4.tar.xz 18602256 BLAKE2B 9f260f2b3c6380745c343d2883db430dda1b76b120050df16e53c1021e5a746c7e4a6aa8e83c746c3705c6872e83369a649c48ffdaef972a7049c44f7bc3030b SHA512 1c9bac850159352effb163b41590b3e9c05100b449798b5615f7a51a59a3877fe9558d593bb47c24915226637e3394e7864a1b1555cd6c5b5e5e308972208ecf |
42 |
-DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f |
43 |
DIST python-gentoo-patches-2.7.18.tar.xz 15012 BLAKE2B f691e231c793bb8f11fb64c89b90e022af8e0fe0e28839822c2ae6214fdab6c6fd9c07466c4b5797d3964b7db09fd979597774fb7872dc674e8df59321b6bf95 SHA512 a2952b27bfc0a52f322b2f3e177cbe09fa288c9ca5967c13fb9c2d45d3e81033407e30e86bdaaaa258f0b3cfa2cef6eda5502bddb6390f9512a493d145d34e03 |
44 |
DIST python-gentoo-patches-3.6.10-r1.tar.xz 15556 BLAKE2B 3d4755a083172fc878d3454797a4a7fa809c7767b7f2ba0919b95076b8ecba62ac604a7db349d8dd71f83aa44d4580d0c433ae6cd2027078e7779cec79185ba2 SHA512 b361ff3fe9545bb59a7e85f179a094d58219be35d20cef83db02672d0a9a58fccfda62fbe8c2bf64250c4043b8517cbc2091380611c5f1e63bfac9ca7c4e47b0 |
45 |
-DIST python-gentoo-patches-3.6.10.tar.xz 10964 BLAKE2B e32c8cb3050c7324ee234f585be7fc40cfacc6ad87759eaa300e57289e6dc6cbaed3913f33ad632b8754638e8d71983d8364ceeaad8ef325cfa6d4d2dfb56df0 SHA512 71fea7306c876c63888c4547eaf14dc2e0413dec343609d748cd1b5888e4605d47888758ebc5120a287ce833b69dd538073f91989460da7c40462b53eefca7ce |
46 |
-DIST python-gentoo-patches-3.7.6.tar.xz 10084 BLAKE2B 220869e85bdaf9c21b1b05e13803bdb6ecc22ac0f69da77e57fd7c1cd93ef45ec43401b62732842e1bb3467feb6d65c8204120e2741e9eb6f4cab673fd3a8d62 SHA512 4c04b0cf7da55fa7973ab178e3ac2c59bc2142924bdced5954c058053280b6c663d7c39912286d10fe0e82ca30af6a0dd6a56fa85433f836217ca3dcbb284def |
47 |
DIST python-gentoo-patches-3.7.7.tar.xz 14644 BLAKE2B 1a377eac945310082ec9fa257bcb406c7eaf24b5e80469dd49e82a1bc0554b75394678609cae447cb0fc7a19059b29166bf110b6ed99a89a9919b3a56a323f87 SHA512 2c7fbcefd6f4d1674b78f3b67f2be3f1b168e08c318fefe8d4757f2d30c22477f5010ad6f2c0abb265d819ee667617f21f93e002242e216b4ee570200b0ddf74 |
48 |
DIST python-gentoo-patches-3.7.8.tar.xz 10304 BLAKE2B dc1bff35bdf3f7e97d15fbd0af4c3278ea54b43cb204641f666293dec507431987445fe6ecb991814842b8c58c65a6185b4c24e3ae08d682ef98916263af7cd4 SHA512 5871121e514dd6af4d9298550a5e01ee114950fd6db58bb8bdb879ede602a228f64d7bf8f6e04317ababc42a502b1192f4a010122745d5a8bc7a40866106479a |
49 |
-DIST python-gentoo-patches-3.8.1-r2.tar.xz 10108 BLAKE2B 02d3e2ae95b5cfa67c0ba4ff618fbee51d2342955d0a064b80575beda73902bd72462e4f6dba63743bf9fc031d92c69153ef8bd8a0ab5d6e17bfdf8ed0152da5 SHA512 757f7cf6b0cb6c1493d8ed8e5780780efcb32860a9aeba4f933a3a3fb22c412bebde8854e34609465d8a12cb9545a7b19e5d5dbe87d772bb83acd9fe829b75cc |
50 |
DIST python-gentoo-patches-3.8.2-r1.tar.xz 16112 BLAKE2B 9ae197a56bbd96afa11c4312c68ac030138773df22dedc3a3e6fb9e81b366d6522fb2c147946eb604a87d749cbea7e5e5eed8ae0e737294c0949a8c2791dd327 SHA512 00f31c3b7227dd443f05234fbb7744338ce687e1ea4d236a6b1d386d76082acb34259f59442018c9ace54e0004dea9ac822ae2a4470159b83d00112e258baff0 |
51 |
DIST python-gentoo-patches-3.8.3.tar.xz 10704 BLAKE2B 6fdd13139b1132313153af2de774abeca7c1fe9acb34a87e5d96875a4cbe8c22c201acbb11c15eeaf828493c32f6acd89e3b5d4012fa2c9d216da556aadb9f01 SHA512 6f67d77e8240983c0dd749620e5df81df5816b831032e190c82c8d73ea8a995daf2631640234a1350e483bd13276466457d110176612bfde3281d1b6a8bf97bb |
52 |
-DIST python-gentoo-patches-3.9.0_alpha6.tar.xz 8916 BLAKE2B ca611dd96e6fca625def6affeb35daa1c869ffa3b84bd13d5cc2dff7ffe4e0aaf4a76b3ed35d4520fe64f1905a644ecc2dcd80259f88264adeff926d728df76e SHA512 b3cd6619d998db8c828fc05eeba74d644ead60d34c279943725ea94ee9e5d45a07d481af62b8589336c55bb8baa23d6559aa57a73d11bf2364b6e9b839e0a4be |
53 |
DIST python-gentoo-patches-3.9.0b3.tar.xz 8592 BLAKE2B 261dc9a5c7b370eb3f693f5bfb15562a5ee8b24b038db1b16571f096ff0d451ef8830c7f51db53366ebcf6e378dfab57e186f1789dc3ecc95e65595708f4428e SHA512 4c630b1b15e752ae154bfc9d0f5c8a17ac02127f96ccf114469bb92d02fe7d2ac13acd2415bfe6af0169c823b4aec09e2d6886c031df8e8c809ccb94efa60b62 |
54 |
|
55 |
diff --git a/dev-lang/python/files/test-__all__-numpy.patch b/dev-lang/python/files/test-__all__-numpy.patch |
56 |
deleted file mode 100644 |
57 |
index 1b91abbf6f6..00000000000 |
58 |
--- a/dev-lang/python/files/test-__all__-numpy.patch |
59 |
+++ /dev/null |
60 |
@@ -1,13 +0,0 @@ |
61 |
-diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py |
62 |
-index c077881511..0728bef6c4 100644 |
63 |
---- a/Lib/test/test___all__.py |
64 |
-+++ b/Lib/test/test___all__.py |
65 |
-@@ -71,6 +71,8 @@ class AllTest(unittest.TestCase): |
66 |
- blacklist = set([ |
67 |
- # Will raise a SyntaxError when compiling the exec statement |
68 |
- '__future__', |
69 |
-+ # imports numpy which causes warnings |
70 |
-+ 'test.test_pickletools', |
71 |
- ]) |
72 |
- |
73 |
- if not sys.platform.startswith('java'): |
74 |
|
75 |
diff --git a/dev-lang/python/files/test.support.unlink-ignore-EACCES.patch b/dev-lang/python/files/test.support.unlink-ignore-EACCES.patch |
76 |
deleted file mode 100644 |
77 |
index 865a914b410..00000000000 |
78 |
--- a/dev-lang/python/files/test.support.unlink-ignore-EACCES.patch |
79 |
+++ /dev/null |
80 |
@@ -1,28 +0,0 @@ |
81 |
-From b8dc49c87f29fa875bd24fe47c741d11962a33b6 Mon Sep 17 00:00:00 2001 |
82 |
-From: Mike Gilbert <floppym@g.o> |
83 |
-Date: Sat, 4 Apr 2020 14:11:25 -0400 |
84 |
-Subject: [PATCH] test.support.unlink: ignore EACCES |
85 |
- |
86 |
-Resolves test errors when running in the Gentoo sandbox environment. |
87 |
- |
88 |
-Bug: https://bugs.gentoo.org/679628 |
89 |
---- |
90 |
- Lib/test/support/__init__.py | 2 +- |
91 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
92 |
- |
93 |
-diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py |
94 |
-index ccc11c1b4b0..d47bdebda5c 100644 |
95 |
---- a/Lib/test/support/__init__.py |
96 |
-+++ b/Lib/test/support/__init__.py |
97 |
-@@ -291,7 +291,7 @@ def unlink(filename): |
98 |
- try: |
99 |
- _unlink(filename) |
100 |
- except OSError as exc: |
101 |
-- if exc.errno not in (errno.ENOENT, errno.ENOTDIR): |
102 |
-+ if exc.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EACCES): |
103 |
- raise |
104 |
- |
105 |
- def rmdir(dirname): |
106 |
--- |
107 |
-2.26.0 |
108 |
- |
109 |
|
110 |
diff --git a/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch |
111 |
deleted file mode 100644 |
112 |
index 6cae17b5518..00000000000 |
113 |
--- a/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch |
114 |
+++ /dev/null |
115 |
@@ -1,28 +0,0 @@ |
116 |
-From 6e6402caa7962a9c9f7c5327f3c802545824f7f9 Mon Sep 17 00:00:00 2001 |
117 |
-From: Mike Gilbert <floppym@g.o> |
118 |
-Date: Fri, 3 Apr 2020 10:37:56 -0400 |
119 |
-Subject: [PATCH] test.support.unlink: ignore PermissionError |
120 |
- |
121 |
-Resolves test errors when running in the Gentoo sandbox environment. |
122 |
- |
123 |
-Bug: https://bugs.gentoo.org/679628 |
124 |
---- |
125 |
- Lib/test/support/__init__.py | 2 +- |
126 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
127 |
- |
128 |
-diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py |
129 |
-index 1f792d8514d..a0772480eb4 100644 |
130 |
---- a/Lib/test/support/__init__.py |
131 |
-+++ b/Lib/test/support/__init__.py |
132 |
-@@ -488,7 +488,7 @@ else: |
133 |
- def unlink(filename): |
134 |
- try: |
135 |
- _unlink(filename) |
136 |
-- except (FileNotFoundError, NotADirectoryError): |
137 |
-+ except (FileNotFoundError, NotADirectoryError, PermissionError): |
138 |
- pass |
139 |
- |
140 |
- def rmdir(dirname): |
141 |
--- |
142 |
-2.26.0 |
143 |
- |
144 |
|
145 |
diff --git a/dev-lang/python/python-2.7.17-r2.ebuild b/dev-lang/python/python-2.7.17-r2.ebuild |
146 |
deleted file mode 100644 |
147 |
index 7cb8c9b155e..00000000000 |
148 |
--- a/dev-lang/python/python-2.7.17-r2.ebuild |
149 |
+++ /dev/null |
150 |
@@ -1,369 +0,0 @@ |
151 |
-# Copyright 1999-2020 Gentoo Authors |
152 |
-# Distributed under the terms of the GNU General Public License v2 |
153 |
- |
154 |
-EAPI="7" |
155 |
-WANT_LIBTOOL="none" |
156 |
- |
157 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
158 |
- |
159 |
-MY_P="Python-${PV}" |
160 |
-PYVER=$(ver_cut 1-2) |
161 |
-PATCHSET="python-gentoo-patches-2.7.17-r1" |
162 |
- |
163 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
164 |
-HOMEPAGE="https://www.python.org/" |
165 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
166 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
167 |
-S="${WORKDIR}/${MY_P}" |
168 |
- |
169 |
-LICENSE="PSF-2" |
170 |
-SLOT="${PYVER}" |
171 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86" |
172 |
-IUSE="-berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
173 |
- |
174 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
175 |
-# If you need to apply a patch which requires python for bootstrapping, please |
176 |
-# run the bootstrap code on your dev box and include the results in the |
177 |
-# patchset. See bug 447752. |
178 |
- |
179 |
-RDEPEND="app-arch/bzip2:= |
180 |
- dev-libs/libffi:= |
181 |
- >=sys-libs/zlib-1.1.3:= |
182 |
- virtual/libcrypt:= |
183 |
- virtual/libintl |
184 |
- berkdb? ( || ( |
185 |
- sys-libs/db:5.3 |
186 |
- sys-libs/db:5.1 |
187 |
- sys-libs/db:4.8 |
188 |
- sys-libs/db:4.7 |
189 |
- sys-libs/db:4.6 |
190 |
- sys-libs/db:4.5 |
191 |
- sys-libs/db:4.4 |
192 |
- sys-libs/db:4.3 |
193 |
- sys-libs/db:4.2 |
194 |
- ) ) |
195 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
196 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
197 |
- readline? ( >=sys-libs/readline-4.1:= ) |
198 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
199 |
- ssl? ( |
200 |
- !libressl? ( dev-libs/openssl:= ) |
201 |
- libressl? ( dev-libs/libressl:= ) |
202 |
- ) |
203 |
- tk? ( |
204 |
- >=dev-lang/tcl-8.0:= |
205 |
- >=dev-lang/tk-8.0:= |
206 |
- dev-tcltk/blt:= |
207 |
- dev-tcltk/tix |
208 |
- ) |
209 |
- xml? ( >=dev-libs/expat-2.1:= )" |
210 |
-# bluetooth requires headers from bluez |
211 |
-DEPEND="${RDEPEND} |
212 |
- bluetooth? ( net-wireless/bluez ) |
213 |
- virtual/pkgconfig |
214 |
- !sys-devel/gcc[libffi(-)]" |
215 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
216 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
217 |
- |
218 |
-pkg_setup() { |
219 |
- if use berkdb; then |
220 |
- ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
221 |
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
222 |
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
223 |
- ewarn "is provided by dev-python/bsddb3." |
224 |
- else |
225 |
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
226 |
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
227 |
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
228 |
- ewarn "You might need to migrate your databases." |
229 |
- fi |
230 |
- fi |
231 |
-} |
232 |
- |
233 |
-src_prepare() { |
234 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
235 |
- rm -fr Modules/expat || die |
236 |
- rm -fr Modules/_ctypes/libffi* || die |
237 |
- rm -fr Modules/zlib || die |
238 |
- |
239 |
- local PATCHES=( |
240 |
- "${WORKDIR}/${PATCHSET}" |
241 |
- "${FILESDIR}/test.support.unlink-ignore-EACCES.patch" |
242 |
- ) |
243 |
- |
244 |
- default |
245 |
- |
246 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
247 |
- Lib/distutils/command/install.py \ |
248 |
- Lib/distutils/sysconfig.py \ |
249 |
- Lib/site.py \ |
250 |
- Lib/sysconfig.py \ |
251 |
- Lib/test/test_site.py \ |
252 |
- Makefile.pre.in \ |
253 |
- Modules/Setup.dist \ |
254 |
- Modules/getpath.c \ |
255 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
256 |
- |
257 |
- eautoreconf |
258 |
-} |
259 |
- |
260 |
-src_configure() { |
261 |
- # dbm module can be linked against berkdb or gdbm. |
262 |
- # Defaults to gdbm when both are enabled, #204343. |
263 |
- local disable |
264 |
- use berkdb || use gdbm || disable+=" dbm" |
265 |
- use berkdb || disable+=" _bsddb" |
266 |
- # disable automagic bluetooth headers detection |
267 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
268 |
- use gdbm || disable+=" gdbm" |
269 |
- use ncurses || disable+=" _curses _curses_panel" |
270 |
- use readline || disable+=" readline" |
271 |
- use sqlite || disable+=" _sqlite3" |
272 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
273 |
- use tk || disable+=" _tkinter" |
274 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
275 |
- export PYTHON_DISABLE_MODULES="${disable}" |
276 |
- |
277 |
- if ! use xml; then |
278 |
- ewarn "You have configured Python without XML support." |
279 |
- ewarn "This is NOT a recommended configuration as you" |
280 |
- ewarn "may face problems parsing any XML documents." |
281 |
- fi |
282 |
- |
283 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
284 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
285 |
- fi |
286 |
- |
287 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
288 |
- append-flags -fwrapv |
289 |
- fi |
290 |
- |
291 |
- filter-flags -malign-double |
292 |
- |
293 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
294 |
- if is-flagq -O3; then |
295 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
296 |
- use hardened && replace-flags -O3 -O2 |
297 |
- fi |
298 |
- |
299 |
- if tc-is-cross-compiler; then |
300 |
- # Force some tests that try to poke fs paths. |
301 |
- export ac_cv_file__dev_ptc=no |
302 |
- export ac_cv_file__dev_ptmx=yes |
303 |
- fi |
304 |
- |
305 |
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
306 |
- tc-export CXX |
307 |
- # The configure script fails to use pkg-config correctly. |
308 |
- # http://bugs.python.org/issue15506 |
309 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
310 |
- |
311 |
- # Set LDFLAGS so we link modules with -lpython2.7 correctly. |
312 |
- # Needed on FreeBSD unless Python 2.7 is already installed. |
313 |
- # Please query BSD team before removing this! |
314 |
- append-ldflags "-L." |
315 |
- |
316 |
- local dbmliborder |
317 |
- if use gdbm; then |
318 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
319 |
- fi |
320 |
- if use berkdb; then |
321 |
- dbmliborder+="${dbmliborder:+:}bdb" |
322 |
- fi |
323 |
- |
324 |
- local myeconfargs=( |
325 |
- # The check is broken on clang, and gives false positive: |
326 |
- # https://bugs.gentoo.org/596798 |
327 |
- # (upstream dropped this flag in 3.2a4 anyway) |
328 |
- ac_cv_opt_olimit_ok=no |
329 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
330 |
- # Python on glibc upgrade, remove it proactively to give |
331 |
- # a chance for users rebuilding python before glibc |
332 |
- ac_cv_header_stropts_h=no |
333 |
- |
334 |
- --with-fpectl |
335 |
- --enable-shared |
336 |
- $(use_enable ipv6) |
337 |
- $(use_with threads) |
338 |
- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") |
339 |
- --infodir='${prefix}/share/info' |
340 |
- --mandir='${prefix}/share/man' |
341 |
- --with-computed-gotos |
342 |
- --with-dbmliborder="${dbmliborder}" |
343 |
- --with-libc= |
344 |
- --enable-loadable-sqlite-extensions |
345 |
- --with-system-expat |
346 |
- --with-system-ffi |
347 |
- --without-ensurepip |
348 |
- ) |
349 |
- |
350 |
- OPT="" econf "${myeconfargs[@]}" |
351 |
- |
352 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
353 |
- eerror "configure has detected that the sem_open function is broken." |
354 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
355 |
- die "Broken sem_open function (bug 496328)" |
356 |
- fi |
357 |
-} |
358 |
- |
359 |
-src_compile() { |
360 |
- # Ensure sed works as expected |
361 |
- # https://bugs.gentoo.org/594768 |
362 |
- local -x LC_ALL=C |
363 |
- |
364 |
- # Avoid invoking pgen for cross-compiles. |
365 |
- touch Include/graminit.h Python/graminit.c |
366 |
- |
367 |
- emake |
368 |
- |
369 |
- # Work around bug 329499. See also bug 413751 and 457194. |
370 |
- if has_version dev-libs/libffi[pax_kernel]; then |
371 |
- pax-mark E python |
372 |
- else |
373 |
- pax-mark m python |
374 |
- fi |
375 |
-} |
376 |
- |
377 |
-src_test() { |
378 |
- # Tests will not work when cross compiling. |
379 |
- if tc-is-cross-compiler; then |
380 |
- elog "Disabling tests due to crosscompiling." |
381 |
- return |
382 |
- fi |
383 |
- |
384 |
- # Skip failing tests. |
385 |
- local skipped_tests="distutils gdb" |
386 |
- |
387 |
- for test in ${skipped_tests}; do |
388 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
389 |
- done |
390 |
- |
391 |
- # bug 660358 |
392 |
- local -x COLUMNS=80 |
393 |
- |
394 |
- # Daylight saving time problem |
395 |
- # https://bugs.python.org/issue22067 |
396 |
- # https://bugs.gentoo.org/610628 |
397 |
- local -x TZ=UTC |
398 |
- |
399 |
- # Rerun failed tests in verbose mode (regrtest -w). |
400 |
- emake test EXTRATESTOPTS="-w" < /dev/tty |
401 |
- local result="$?" |
402 |
- |
403 |
- for test in ${skipped_tests}; do |
404 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
405 |
- done |
406 |
- |
407 |
- elog "The following tests have been skipped:" |
408 |
- for test in ${skipped_tests}; do |
409 |
- elog "test_${test}.py" |
410 |
- done |
411 |
- |
412 |
- elog "If you would like to run them, you may:" |
413 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
414 |
- elog "and run the tests separately." |
415 |
- |
416 |
- if [[ ${result} -ne 0 ]]; then |
417 |
- die "emake test failed" |
418 |
- fi |
419 |
-} |
420 |
- |
421 |
-src_install() { |
422 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
423 |
- |
424 |
- emake DESTDIR="${D}" altinstall |
425 |
- |
426 |
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die |
427 |
- |
428 |
- # Fix collisions between different slots of Python. |
429 |
- mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die |
430 |
- mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die |
431 |
- mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die |
432 |
- rm "${ED}/usr/bin/smtpd.py" || die |
433 |
- |
434 |
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die |
435 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
436 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die |
437 |
- use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
438 |
- |
439 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
440 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
441 |
- |
442 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
443 |
- |
444 |
- if use examples; then |
445 |
- docinto examples |
446 |
- dodoc -r Tools |
447 |
- fi |
448 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
449 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
450 |
- emake --no-print-directory -s -f - 2>/dev/null) |
451 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
452 |
- |
453 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
454 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
455 |
- sed \ |
456 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
457 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
458 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
459 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
460 |
- |
461 |
- # for python-exec |
462 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
463 |
- |
464 |
- # if not using a cross-compiler, use the fresh binary |
465 |
- if ! tc-is-cross-compiler; then |
466 |
- local -x PYTHON=./python |
467 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
468 |
- else |
469 |
- vars=( PYTHON "${vars[@]}" ) |
470 |
- fi |
471 |
- |
472 |
- python_export "python${PYVER}" "${vars[@]}" |
473 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
474 |
- python_domodule epython.py |
475 |
- |
476 |
- # python-exec wrapping support |
477 |
- local pymajor=${PYVER%.*} |
478 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
479 |
- # python and pythonX |
480 |
- ln -s "../../../bin/python${PYVER}" \ |
481 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
482 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
483 |
- # python-config and pythonX-config |
484 |
- ln -s "../../../bin/python${PYVER}-config" \ |
485 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
486 |
- ln -s "python${pymajor}-config" \ |
487 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
488 |
- # 2to3, pydoc, pyvenv |
489 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
490 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
491 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
492 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
493 |
- # idle |
494 |
- if use tk; then |
495 |
- ln -s "../../../bin/idle${PYVER}" \ |
496 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
497 |
- fi |
498 |
-} |
499 |
- |
500 |
-eselect_python_update() { |
501 |
- if [[ -z "$(eselect python show)" || \ |
502 |
- ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then |
503 |
- eselect python update |
504 |
- fi |
505 |
- |
506 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || \ |
507 |
- ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] |
508 |
- then |
509 |
- eselect python update --python${PV%%.*} |
510 |
- fi |
511 |
-} |
512 |
- |
513 |
-pkg_postinst() { |
514 |
- eselect_python_update |
515 |
-} |
516 |
- |
517 |
-pkg_postrm() { |
518 |
- eselect_python_update |
519 |
-} |
520 |
|
521 |
diff --git a/dev-lang/python/python-3.6.10-r1.ebuild b/dev-lang/python/python-3.6.10-r1.ebuild |
522 |
deleted file mode 100644 |
523 |
index f6477a029f6..00000000000 |
524 |
--- a/dev-lang/python/python-3.6.10-r1.ebuild |
525 |
+++ /dev/null |
526 |
@@ -1,360 +0,0 @@ |
527 |
-# Copyright 1999-2020 Gentoo Authors |
528 |
-# Distributed under the terms of the GNU General Public License v2 |
529 |
- |
530 |
-EAPI="7" |
531 |
-WANT_LIBTOOL="none" |
532 |
- |
533 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
534 |
- |
535 |
-MY_P="Python-${PV}" |
536 |
-PYVER=$(ver_cut 1-2) |
537 |
-PATCHSET="python-gentoo-patches-3.6.10" |
538 |
- |
539 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
540 |
-HOMEPAGE="https://www.python.org/" |
541 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
542 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
543 |
-S="${WORKDIR}/${MY_P}" |
544 |
- |
545 |
-LICENSE="PSF-2" |
546 |
-SLOT="${PYVER}/${PYVER}m" |
547 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86" |
548 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml" |
549 |
-RESTRICT="!test? ( test )" |
550 |
- |
551 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
552 |
-# If you need to apply a patch which requires python for bootstrapping, please |
553 |
-# run the bootstrap code on your dev box and include the results in the |
554 |
-# patchset. See bug 447752. |
555 |
- |
556 |
-RDEPEND="app-arch/bzip2:= |
557 |
- app-arch/xz-utils:= |
558 |
- dev-libs/libffi:= |
559 |
- >=sys-libs/zlib-1.1.3:= |
560 |
- virtual/libcrypt:= |
561 |
- virtual/libintl |
562 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
563 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
564 |
- readline? ( >=sys-libs/readline-4.1:= ) |
565 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
566 |
- ssl? ( |
567 |
- !libressl? ( dev-libs/openssl:= ) |
568 |
- libressl? ( dev-libs/libressl:= ) |
569 |
- ) |
570 |
- tk? ( |
571 |
- >=dev-lang/tcl-8.0:= |
572 |
- >=dev-lang/tk-8.0:= |
573 |
- dev-tcltk/blt:= |
574 |
- dev-tcltk/tix |
575 |
- ) |
576 |
- xml? ( >=dev-libs/expat-2.1:= )" |
577 |
-# bluetooth requires headers from bluez |
578 |
-DEPEND="${RDEPEND} |
579 |
- bluetooth? ( net-wireless/bluez ) |
580 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
581 |
- virtual/pkgconfig |
582 |
- !sys-devel/gcc[libffi(-)]" |
583 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
584 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
585 |
- |
586 |
-src_prepare() { |
587 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
588 |
- rm -fr Modules/expat || die |
589 |
- rm -fr Modules/_ctypes/libffi* || die |
590 |
- rm -fr Modules/zlib || die |
591 |
- |
592 |
- local PATCHES=( |
593 |
- "${WORKDIR}/${PATCHSET}" |
594 |
- "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" |
595 |
- ) |
596 |
- |
597 |
- default |
598 |
- |
599 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
600 |
- Lib/distutils/command/install.py \ |
601 |
- Lib/distutils/sysconfig.py \ |
602 |
- Lib/site.py \ |
603 |
- Lib/sysconfig.py \ |
604 |
- Lib/test/test_site.py \ |
605 |
- Makefile.pre.in \ |
606 |
- Modules/Setup.dist \ |
607 |
- Modules/getpath.c \ |
608 |
- configure.ac \ |
609 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
610 |
- |
611 |
- eautoreconf |
612 |
-} |
613 |
- |
614 |
-src_configure() { |
615 |
- local disable |
616 |
- # disable automagic bluetooth headers detection |
617 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
618 |
- use gdbm || disable+=" gdbm" |
619 |
- use ncurses || disable+=" _curses _curses_panel" |
620 |
- use readline || disable+=" readline" |
621 |
- use sqlite || disable+=" _sqlite3" |
622 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
623 |
- use tk || disable+=" _tkinter" |
624 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
625 |
- export PYTHON_DISABLE_MODULES="${disable}" |
626 |
- |
627 |
- if ! use xml; then |
628 |
- ewarn "You have configured Python without XML support." |
629 |
- ewarn "This is NOT a recommended configuration as you" |
630 |
- ewarn "may face problems parsing any XML documents." |
631 |
- fi |
632 |
- |
633 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
634 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
635 |
- fi |
636 |
- |
637 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
638 |
- append-flags -fwrapv |
639 |
- fi |
640 |
- |
641 |
- filter-flags -malign-double |
642 |
- |
643 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
644 |
- if is-flagq -O3; then |
645 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
646 |
- use hardened && replace-flags -O3 -O2 |
647 |
- fi |
648 |
- |
649 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
650 |
- tc-export CXX |
651 |
- |
652 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
653 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
654 |
- # Please query BSD team before removing this! |
655 |
- append-ldflags "-L." |
656 |
- |
657 |
- local dbmliborder |
658 |
- if use gdbm; then |
659 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
660 |
- fi |
661 |
- |
662 |
- local myeconfargs=( |
663 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
664 |
- # Python on glibc upgrade, remove it proactively to give |
665 |
- # a chance for users rebuilding python before glibc |
666 |
- ac_cv_header_stropts_h=no |
667 |
- |
668 |
- --with-fpectl |
669 |
- --enable-shared |
670 |
- $(use_enable ipv6) |
671 |
- $(use_with threads) |
672 |
- --infodir='${prefix}/share/info' |
673 |
- --mandir='${prefix}/share/man' |
674 |
- --with-computed-gotos |
675 |
- --with-dbmliborder="${dbmliborder}" |
676 |
- --with-libc= |
677 |
- --enable-loadable-sqlite-extensions |
678 |
- --without-ensurepip |
679 |
- --with-system-expat |
680 |
- --with-system-ffi |
681 |
- ) |
682 |
- |
683 |
- OPT="" econf "${myeconfargs[@]}" |
684 |
- |
685 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
686 |
- eerror "configure has detected that the sem_open function is broken." |
687 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
688 |
- die "Broken sem_open function (bug 496328)" |
689 |
- fi |
690 |
-} |
691 |
- |
692 |
-src_compile() { |
693 |
- # Ensure sed works as expected |
694 |
- # https://bugs.gentoo.org/594768 |
695 |
- local -x LC_ALL=C |
696 |
- |
697 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
698 |
- |
699 |
- # Work around bug 329499. See also bug 413751 and 457194. |
700 |
- if has_version dev-libs/libffi[pax_kernel]; then |
701 |
- pax-mark E python |
702 |
- else |
703 |
- pax-mark m python |
704 |
- fi |
705 |
-} |
706 |
- |
707 |
-src_test() { |
708 |
- # Tests will not work when cross compiling. |
709 |
- if tc-is-cross-compiler; then |
710 |
- elog "Disabling tests due to crosscompiling." |
711 |
- return |
712 |
- fi |
713 |
- |
714 |
- # Skip failing tests. |
715 |
- local skipped_tests="gdb" |
716 |
- |
717 |
- for test in ${skipped_tests}; do |
718 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
719 |
- done |
720 |
- |
721 |
- # bug 660358 |
722 |
- local -x COLUMNS=80 |
723 |
- |
724 |
- local -x PYTHONDONTWRITEBYTECODE= |
725 |
- |
726 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
727 |
- local result=$? |
728 |
- |
729 |
- for test in ${skipped_tests}; do |
730 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
731 |
- done |
732 |
- |
733 |
- elog "The following tests have been skipped:" |
734 |
- for test in ${skipped_tests}; do |
735 |
- elog "test_${test}.py" |
736 |
- done |
737 |
- |
738 |
- elog "If you would like to run them, you may:" |
739 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
740 |
- elog "and run the tests separately." |
741 |
- |
742 |
- if [[ ${result} -ne 0 ]]; then |
743 |
- die "emake test failed" |
744 |
- fi |
745 |
-} |
746 |
- |
747 |
-src_install() { |
748 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
749 |
- |
750 |
- emake DESTDIR="${D}" altinstall |
751 |
- |
752 |
- # Remove static library |
753 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
754 |
- |
755 |
- sed \ |
756 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
757 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
758 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
759 |
- |
760 |
- # Fix collisions between different slots of Python. |
761 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
762 |
- |
763 |
- # Cheap hack to get version with ABIFLAGS |
764 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
765 |
- if [[ ${abiver} != python${PYVER} ]]; then |
766 |
- # Replace python3.X with a symlink to python3.Xm |
767 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
768 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
769 |
- # Create python3.X-config symlink |
770 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
771 |
- # Create python-3.5m.pc symlink |
772 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
773 |
- fi |
774 |
- |
775 |
- # python seems to get rebuilt in src_install (bug 569908) |
776 |
- # Work around it for now. |
777 |
- if has_version dev-libs/libffi[pax_kernel]; then |
778 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
779 |
- else |
780 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
781 |
- fi |
782 |
- |
783 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
784 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
785 |
- |
786 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
787 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
788 |
- |
789 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
790 |
- |
791 |
- if use examples; then |
792 |
- docinto examples |
793 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
794 |
- dodoc -r Tools |
795 |
- fi |
796 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
797 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
798 |
- emake --no-print-directory -s -f - 2>/dev/null) |
799 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
800 |
- |
801 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
802 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
803 |
- sed \ |
804 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
805 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
806 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
807 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
808 |
- |
809 |
- # for python-exec |
810 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
811 |
- |
812 |
- # if not using a cross-compiler, use the fresh binary |
813 |
- if ! tc-is-cross-compiler; then |
814 |
- local -x PYTHON=./python |
815 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
816 |
- else |
817 |
- vars=( PYTHON "${vars[@]}" ) |
818 |
- fi |
819 |
- |
820 |
- python_export "python${PYVER}" "${vars[@]}" |
821 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
822 |
- python_domodule epython.py |
823 |
- |
824 |
- # python-exec wrapping support |
825 |
- local pymajor=${PYVER%.*} |
826 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
827 |
- # python and pythonX |
828 |
- ln -s "../../../bin/${abiver}" \ |
829 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
830 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
831 |
- # python-config and pythonX-config |
832 |
- # note: we need to create a wrapper rather than symlinking it due |
833 |
- # to some random dirname(argv[0]) magic performed by python-config |
834 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
835 |
- #!/bin/sh |
836 |
- exec "${abiver}-config" "\${@}" |
837 |
- EOF |
838 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
839 |
- ln -s "python${pymajor}-config" \ |
840 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
841 |
- # 2to3, pydoc, pyvenv |
842 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
843 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
844 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
845 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
846 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
847 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
848 |
- # idle |
849 |
- if use tk; then |
850 |
- ln -s "../../../bin/idle${PYVER}" \ |
851 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
852 |
- fi |
853 |
-} |
854 |
- |
855 |
-pkg_preinst() { |
856 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
857 |
- python_updater_warning="1" |
858 |
- fi |
859 |
-} |
860 |
- |
861 |
-eselect_python_update() { |
862 |
- if [[ -z "$(eselect python show)" || \ |
863 |
- ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then |
864 |
- eselect python update |
865 |
- fi |
866 |
- |
867 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || \ |
868 |
- ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] |
869 |
- then |
870 |
- eselect python update --python${PV%%.*} |
871 |
- fi |
872 |
-} |
873 |
- |
874 |
-pkg_postinst() { |
875 |
- eselect_python_update |
876 |
- |
877 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
878 |
- ewarn "You have just upgraded from an older version of Python." |
879 |
- ewarn |
880 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
881 |
- fi |
882 |
-} |
883 |
- |
884 |
-pkg_postrm() { |
885 |
- eselect_python_update |
886 |
-} |
887 |
|
888 |
diff --git a/dev-lang/python/python-3.7.7-r1.ebuild b/dev-lang/python/python-3.7.7-r1.ebuild |
889 |
deleted file mode 100644 |
890 |
index e56bc4bd7cc..00000000000 |
891 |
--- a/dev-lang/python/python-3.7.7-r1.ebuild |
892 |
+++ /dev/null |
893 |
@@ -1,346 +0,0 @@ |
894 |
-# Copyright 1999-2020 Gentoo Authors |
895 |
-# Distributed under the terms of the GNU General Public License v2 |
896 |
- |
897 |
-EAPI="7" |
898 |
-WANT_LIBTOOL="none" |
899 |
- |
900 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
901 |
- |
902 |
-MY_P="Python-${PV}" |
903 |
-PYVER=$(ver_cut 1-2) |
904 |
-PATCHSET="python-gentoo-patches-3.7.6" |
905 |
- |
906 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
907 |
-HOMEPAGE="https://www.python.org/" |
908 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
909 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
910 |
-S="${WORKDIR}/${MY_P}" |
911 |
- |
912 |
-LICENSE="PSF-2" |
913 |
-SLOT="${PYVER}/${PYVER}m" |
914 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86" |
915 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
916 |
-RESTRICT="!test? ( test )" |
917 |
- |
918 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
919 |
-# If you need to apply a patch which requires python for bootstrapping, please |
920 |
-# run the bootstrap code on your dev box and include the results in the |
921 |
-# patchset. See bug 447752. |
922 |
- |
923 |
-RDEPEND="app-arch/bzip2:= |
924 |
- app-arch/xz-utils:= |
925 |
- dev-libs/libffi:= |
926 |
- sys-apps/util-linux:= |
927 |
- >=sys-libs/zlib-1.1.3:= |
928 |
- virtual/libcrypt:= |
929 |
- virtual/libintl |
930 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
931 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
932 |
- readline? ( >=sys-libs/readline-4.1:= ) |
933 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
934 |
- ssl? ( |
935 |
- !libressl? ( dev-libs/openssl:= ) |
936 |
- libressl? ( dev-libs/libressl:= ) |
937 |
- ) |
938 |
- tk? ( |
939 |
- >=dev-lang/tcl-8.0:= |
940 |
- >=dev-lang/tk-8.0:= |
941 |
- dev-tcltk/blt:= |
942 |
- dev-tcltk/tix |
943 |
- ) |
944 |
- xml? ( >=dev-libs/expat-2.1:= )" |
945 |
-# bluetooth requires headers from bluez |
946 |
-DEPEND="${RDEPEND} |
947 |
- bluetooth? ( net-wireless/bluez ) |
948 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
949 |
- virtual/pkgconfig |
950 |
- !sys-devel/gcc[libffi(-)]" |
951 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
952 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
953 |
- |
954 |
-src_prepare() { |
955 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
956 |
- rm -fr Modules/expat || die |
957 |
- rm -fr Modules/_ctypes/libffi* || die |
958 |
- rm -fr Modules/zlib || die |
959 |
- |
960 |
- local PATCHES=( |
961 |
- "${WORKDIR}/${PATCHSET}" |
962 |
- "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" |
963 |
- ) |
964 |
- |
965 |
- default |
966 |
- |
967 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
968 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
969 |
- |
970 |
- eautoreconf |
971 |
-} |
972 |
- |
973 |
-src_configure() { |
974 |
- local disable |
975 |
- # disable automagic bluetooth headers detection |
976 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
977 |
- use gdbm || disable+=" gdbm" |
978 |
- use ncurses || disable+=" _curses _curses_panel" |
979 |
- use readline || disable+=" readline" |
980 |
- use sqlite || disable+=" _sqlite3" |
981 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
982 |
- use tk || disable+=" _tkinter" |
983 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
984 |
- export PYTHON_DISABLE_MODULES="${disable}" |
985 |
- |
986 |
- if ! use xml; then |
987 |
- ewarn "You have configured Python without XML support." |
988 |
- ewarn "This is NOT a recommended configuration as you" |
989 |
- ewarn "may face problems parsing any XML documents." |
990 |
- fi |
991 |
- |
992 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
993 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
994 |
- fi |
995 |
- |
996 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
997 |
- append-flags -fwrapv |
998 |
- fi |
999 |
- |
1000 |
- filter-flags -malign-double |
1001 |
- |
1002 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1003 |
- if is-flagq -O3; then |
1004 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1005 |
- use hardened && replace-flags -O3 -O2 |
1006 |
- fi |
1007 |
- |
1008 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1009 |
- tc-export CXX |
1010 |
- |
1011 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1012 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1013 |
- # Please query BSD team before removing this! |
1014 |
- append-ldflags "-L." |
1015 |
- |
1016 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1017 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1018 |
- |
1019 |
- local dbmliborder |
1020 |
- if use gdbm; then |
1021 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1022 |
- fi |
1023 |
- |
1024 |
- local myeconfargs=( |
1025 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
1026 |
- # Python on glibc upgrade, remove it proactively to give |
1027 |
- # a chance for users rebuilding python before glibc |
1028 |
- ac_cv_header_stropts_h=no |
1029 |
- |
1030 |
- --enable-shared |
1031 |
- $(use_enable ipv6) |
1032 |
- --infodir='${prefix}/share/info' |
1033 |
- --mandir='${prefix}/share/man' |
1034 |
- --with-computed-gotos |
1035 |
- --with-dbmliborder="${dbmliborder}" |
1036 |
- --with-libc= |
1037 |
- --enable-loadable-sqlite-extensions |
1038 |
- --without-ensurepip |
1039 |
- --with-system-expat |
1040 |
- --with-system-ffi |
1041 |
- ) |
1042 |
- |
1043 |
- OPT="" econf "${myeconfargs[@]}" |
1044 |
-} |
1045 |
- |
1046 |
-src_compile() { |
1047 |
- # Ensure sed works as expected |
1048 |
- # https://bugs.gentoo.org/594768 |
1049 |
- local -x LC_ALL=C |
1050 |
- |
1051 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1052 |
- |
1053 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1054 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1055 |
- pax-mark E python |
1056 |
- else |
1057 |
- pax-mark m python |
1058 |
- fi |
1059 |
-} |
1060 |
- |
1061 |
-src_test() { |
1062 |
- # Tests will not work when cross compiling. |
1063 |
- if tc-is-cross-compiler; then |
1064 |
- elog "Disabling tests due to crosscompiling." |
1065 |
- return |
1066 |
- fi |
1067 |
- |
1068 |
- # Skip failing tests. |
1069 |
- local skipped_tests="gdb" |
1070 |
- |
1071 |
- for test in ${skipped_tests}; do |
1072 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1073 |
- done |
1074 |
- |
1075 |
- # bug 660358 |
1076 |
- local -x COLUMNS=80 |
1077 |
- |
1078 |
- local -x PYTHONDONTWRITEBYTECODE= |
1079 |
- |
1080 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1081 |
- local result=$? |
1082 |
- |
1083 |
- for test in ${skipped_tests}; do |
1084 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1085 |
- done |
1086 |
- |
1087 |
- elog "The following tests have been skipped:" |
1088 |
- for test in ${skipped_tests}; do |
1089 |
- elog "test_${test}.py" |
1090 |
- done |
1091 |
- |
1092 |
- elog "If you would like to run them, you may:" |
1093 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1094 |
- elog "and run the tests separately." |
1095 |
- |
1096 |
- if [[ ${result} -ne 0 ]]; then |
1097 |
- die "emake test failed" |
1098 |
- fi |
1099 |
-} |
1100 |
- |
1101 |
-src_install() { |
1102 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1103 |
- |
1104 |
- emake DESTDIR="${D}" altinstall |
1105 |
- |
1106 |
- # Remove static library |
1107 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1108 |
- |
1109 |
- sed \ |
1110 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1111 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1112 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1113 |
- |
1114 |
- # Fix collisions between different slots of Python. |
1115 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1116 |
- |
1117 |
- # Cheap hack to get version with ABIFLAGS |
1118 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1119 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1120 |
- # Replace python3.X with a symlink to python3.Xm |
1121 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1122 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1123 |
- # Create python3.X-config symlink |
1124 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1125 |
- # Create python-3.5m.pc symlink |
1126 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1127 |
- fi |
1128 |
- |
1129 |
- # python seems to get rebuilt in src_install (bug 569908) |
1130 |
- # Work around it for now. |
1131 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1132 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1133 |
- else |
1134 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1135 |
- fi |
1136 |
- |
1137 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1138 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1139 |
- |
1140 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
1141 |
- |
1142 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1143 |
- |
1144 |
- if use examples; then |
1145 |
- docinto examples |
1146 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1147 |
- dodoc -r Tools |
1148 |
- fi |
1149 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1150 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1151 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1152 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1153 |
- |
1154 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1155 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1156 |
- sed \ |
1157 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1158 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1159 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1160 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1161 |
- |
1162 |
- # for python-exec |
1163 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1164 |
- |
1165 |
- # if not using a cross-compiler, use the fresh binary |
1166 |
- if ! tc-is-cross-compiler; then |
1167 |
- local -x PYTHON=./python |
1168 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1169 |
- else |
1170 |
- vars=( PYTHON "${vars[@]}" ) |
1171 |
- fi |
1172 |
- |
1173 |
- python_export "python${PYVER}" "${vars[@]}" |
1174 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1175 |
- python_domodule epython.py |
1176 |
- |
1177 |
- # python-exec wrapping support |
1178 |
- local pymajor=${PYVER%.*} |
1179 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1180 |
- # python and pythonX |
1181 |
- ln -s "../../../bin/${abiver}" \ |
1182 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1183 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
1184 |
- # python-config and pythonX-config |
1185 |
- # note: we need to create a wrapper rather than symlinking it due |
1186 |
- # to some random dirname(argv[0]) magic performed by python-config |
1187 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1188 |
- #!/bin/sh |
1189 |
- exec "${abiver}-config" "\${@}" |
1190 |
- EOF |
1191 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1192 |
- ln -s "python${pymajor}-config" \ |
1193 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1194 |
- # 2to3, pydoc, pyvenv |
1195 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1196 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1197 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1198 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1199 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
1200 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
1201 |
- # idle |
1202 |
- if use tk; then |
1203 |
- ln -s "../../../bin/idle${PYVER}" \ |
1204 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1205 |
- fi |
1206 |
-} |
1207 |
- |
1208 |
-pkg_preinst() { |
1209 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1210 |
- python_updater_warning="1" |
1211 |
- fi |
1212 |
-} |
1213 |
- |
1214 |
-eselect_python_update() { |
1215 |
- if [[ -z "$(eselect python show)" || \ |
1216 |
- ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then |
1217 |
- eselect python update |
1218 |
- fi |
1219 |
- |
1220 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || \ |
1221 |
- ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] |
1222 |
- then |
1223 |
- eselect python update --python${PV%%.*} |
1224 |
- fi |
1225 |
-} |
1226 |
- |
1227 |
-pkg_postinst() { |
1228 |
- eselect_python_update |
1229 |
- |
1230 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1231 |
- ewarn "You have just upgraded from an older version of Python." |
1232 |
- ewarn |
1233 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1234 |
- fi |
1235 |
-} |
1236 |
- |
1237 |
-pkg_postrm() { |
1238 |
- eselect_python_update |
1239 |
-} |
1240 |
|
1241 |
diff --git a/dev-lang/python/python-3.8.2-r1.ebuild b/dev-lang/python/python-3.8.2-r1.ebuild |
1242 |
deleted file mode 100644 |
1243 |
index 22fab425461..00000000000 |
1244 |
--- a/dev-lang/python/python-3.8.2-r1.ebuild |
1245 |
+++ /dev/null |
1246 |
@@ -1,351 +0,0 @@ |
1247 |
-# Copyright 1999-2020 Gentoo Authors |
1248 |
-# Distributed under the terms of the GNU General Public License v2 |
1249 |
- |
1250 |
-EAPI="7" |
1251 |
-WANT_LIBTOOL="none" |
1252 |
- |
1253 |
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs |
1254 |
- |
1255 |
-MY_P="Python-${PV}" |
1256 |
-PYVER=$(ver_cut 1-2) |
1257 |
-PATCHSET="python-gentoo-patches-3.8.1-r2" |
1258 |
- |
1259 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1260 |
-HOMEPAGE="https://www.python.org/" |
1261 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
1262 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
1263 |
-S="${WORKDIR}/${MY_P}" |
1264 |
- |
1265 |
-LICENSE="PSF-2" |
1266 |
-SLOT="${PYVER}" |
1267 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86" |
1268 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
1269 |
-RESTRICT="!test? ( test )" |
1270 |
- |
1271 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1272 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1273 |
-# run the bootstrap code on your dev box and include the results in the |
1274 |
-# patchset. See bug 447752. |
1275 |
- |
1276 |
-RDEPEND="app-arch/bzip2:= |
1277 |
- app-arch/xz-utils:= |
1278 |
- dev-libs/libffi:= |
1279 |
- sys-apps/util-linux:= |
1280 |
- >=sys-libs/zlib-1.1.3:= |
1281 |
- virtual/libcrypt:= |
1282 |
- virtual/libintl |
1283 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1284 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1285 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1286 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1287 |
- ssl? ( |
1288 |
- !libressl? ( dev-libs/openssl:= ) |
1289 |
- libressl? ( dev-libs/libressl:= ) |
1290 |
- ) |
1291 |
- tk? ( |
1292 |
- >=dev-lang/tcl-8.0:= |
1293 |
- >=dev-lang/tk-8.0:= |
1294 |
- dev-tcltk/blt:= |
1295 |
- dev-tcltk/tix |
1296 |
- ) |
1297 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1298 |
-# bluetooth requires headers from bluez |
1299 |
-DEPEND="${RDEPEND} |
1300 |
- bluetooth? ( net-wireless/bluez ) |
1301 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
1302 |
- virtual/pkgconfig |
1303 |
- !sys-devel/gcc[libffi(-)]" |
1304 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1305 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1306 |
- |
1307 |
-src_prepare() { |
1308 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1309 |
- rm -fr Modules/expat || die |
1310 |
- rm -fr Modules/_ctypes/libffi* || die |
1311 |
- rm -fr Modules/zlib || die |
1312 |
- |
1313 |
- local PATCHES=( |
1314 |
- "${WORKDIR}/${PATCHSET}" |
1315 |
- "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" |
1316 |
- # add module importing numpy to blacklist |
1317 |
- "${FILESDIR}/test-__all__-numpy.patch" |
1318 |
- ) |
1319 |
- |
1320 |
- default |
1321 |
- |
1322 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1323 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1324 |
- |
1325 |
- eautoreconf |
1326 |
-} |
1327 |
- |
1328 |
-src_configure() { |
1329 |
- local disable |
1330 |
- # disable automagic bluetooth headers detection |
1331 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1332 |
- use gdbm || disable+=" gdbm" |
1333 |
- use ncurses || disable+=" _curses _curses_panel" |
1334 |
- use readline || disable+=" readline" |
1335 |
- use sqlite || disable+=" _sqlite3" |
1336 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1337 |
- use tk || disable+=" _tkinter" |
1338 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1339 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1340 |
- |
1341 |
- if ! use xml; then |
1342 |
- ewarn "You have configured Python without XML support." |
1343 |
- ewarn "This is NOT a recommended configuration as you" |
1344 |
- ewarn "may face problems parsing any XML documents." |
1345 |
- fi |
1346 |
- |
1347 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1348 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1349 |
- fi |
1350 |
- |
1351 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1352 |
- append-flags -fwrapv |
1353 |
- fi |
1354 |
- |
1355 |
- filter-flags -malign-double |
1356 |
- |
1357 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1358 |
- if is-flagq -O3; then |
1359 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1360 |
- use hardened && replace-flags -O3 -O2 |
1361 |
- fi |
1362 |
- |
1363 |
- # https://bugs.gentoo.org/700012 |
1364 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1365 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1366 |
- fi |
1367 |
- |
1368 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1369 |
- tc-export CXX |
1370 |
- |
1371 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1372 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1373 |
- # Please query BSD team before removing this! |
1374 |
- append-ldflags "-L." |
1375 |
- |
1376 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1377 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1378 |
- |
1379 |
- local dbmliborder |
1380 |
- if use gdbm; then |
1381 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1382 |
- fi |
1383 |
- |
1384 |
- local myeconfargs=( |
1385 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
1386 |
- # Python on glibc upgrade, remove it proactively to give |
1387 |
- # a chance for users rebuilding python before glibc |
1388 |
- ac_cv_header_stropts_h=no |
1389 |
- |
1390 |
- --enable-shared |
1391 |
- $(use_enable ipv6) |
1392 |
- --infodir='${prefix}/share/info' |
1393 |
- --mandir='${prefix}/share/man' |
1394 |
- --with-computed-gotos |
1395 |
- --with-dbmliborder="${dbmliborder}" |
1396 |
- --with-libc= |
1397 |
- --enable-loadable-sqlite-extensions |
1398 |
- --without-ensurepip |
1399 |
- --with-system-expat |
1400 |
- --with-system-ffi |
1401 |
- ) |
1402 |
- |
1403 |
- OPT="" econf "${myeconfargs[@]}" |
1404 |
-} |
1405 |
- |
1406 |
-src_compile() { |
1407 |
- # Ensure sed works as expected |
1408 |
- # https://bugs.gentoo.org/594768 |
1409 |
- local -x LC_ALL=C |
1410 |
- |
1411 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1412 |
- |
1413 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1414 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1415 |
- pax-mark E python |
1416 |
- else |
1417 |
- pax-mark m python |
1418 |
- fi |
1419 |
-} |
1420 |
- |
1421 |
-src_test() { |
1422 |
- # Tests will not work when cross compiling. |
1423 |
- if tc-is-cross-compiler; then |
1424 |
- elog "Disabling tests due to crosscompiling." |
1425 |
- return |
1426 |
- fi |
1427 |
- |
1428 |
- # Skip failing tests. |
1429 |
- local skipped_tests="gdb" |
1430 |
- |
1431 |
- for test in ${skipped_tests}; do |
1432 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1433 |
- done |
1434 |
- |
1435 |
- # bug 660358 |
1436 |
- local -x COLUMNS=80 |
1437 |
- |
1438 |
- local -x PYTHONDONTWRITEBYTECODE= |
1439 |
- |
1440 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1441 |
- local result=$? |
1442 |
- |
1443 |
- for test in ${skipped_tests}; do |
1444 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1445 |
- done |
1446 |
- |
1447 |
- elog "The following tests have been skipped:" |
1448 |
- for test in ${skipped_tests}; do |
1449 |
- elog "test_${test}.py" |
1450 |
- done |
1451 |
- |
1452 |
- elog "If you would like to run them, you may:" |
1453 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1454 |
- elog "and run the tests separately." |
1455 |
- |
1456 |
- if [[ ${result} -ne 0 ]]; then |
1457 |
- die "emake test failed" |
1458 |
- fi |
1459 |
-} |
1460 |
- |
1461 |
-src_install() { |
1462 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1463 |
- |
1464 |
- emake DESTDIR="${D}" altinstall |
1465 |
- |
1466 |
- # Remove static library |
1467 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1468 |
- |
1469 |
- sed \ |
1470 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1471 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1472 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1473 |
- |
1474 |
- # Fix collisions between different slots of Python. |
1475 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1476 |
- |
1477 |
- # Cheap hack to get version with ABIFLAGS |
1478 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1479 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1480 |
- # Replace python3.X with a symlink to python3.Xm |
1481 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1482 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1483 |
- # Create python3.X-config symlink |
1484 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1485 |
- # Create python-3.5m.pc symlink |
1486 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1487 |
- fi |
1488 |
- |
1489 |
- # python seems to get rebuilt in src_install (bug 569908) |
1490 |
- # Work around it for now. |
1491 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1492 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1493 |
- else |
1494 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1495 |
- fi |
1496 |
- |
1497 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1498 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1499 |
- |
1500 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
1501 |
- |
1502 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1503 |
- |
1504 |
- if use examples; then |
1505 |
- docinto examples |
1506 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1507 |
- dodoc -r Tools |
1508 |
- fi |
1509 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1510 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1511 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1512 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1513 |
- |
1514 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1515 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1516 |
- sed \ |
1517 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1518 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1519 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1520 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1521 |
- |
1522 |
- # for python-exec |
1523 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1524 |
- |
1525 |
- # if not using a cross-compiler, use the fresh binary |
1526 |
- if ! tc-is-cross-compiler; then |
1527 |
- local -x PYTHON=./python |
1528 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1529 |
- else |
1530 |
- vars=( PYTHON "${vars[@]}" ) |
1531 |
- fi |
1532 |
- |
1533 |
- python_export "python${PYVER}" "${vars[@]}" |
1534 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1535 |
- python_domodule epython.py |
1536 |
- |
1537 |
- # python-exec wrapping support |
1538 |
- local pymajor=${PYVER%.*} |
1539 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1540 |
- # python and pythonX |
1541 |
- ln -s "../../../bin/${abiver}" \ |
1542 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1543 |
- ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die |
1544 |
- # python-config and pythonX-config |
1545 |
- # note: we need to create a wrapper rather than symlinking it due |
1546 |
- # to some random dirname(argv[0]) magic performed by python-config |
1547 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1548 |
- #!/bin/sh |
1549 |
- exec "${abiver}-config" "\${@}" |
1550 |
- EOF |
1551 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1552 |
- ln -s "python${pymajor}-config" \ |
1553 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1554 |
- # 2to3, pydoc |
1555 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1556 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1557 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1558 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1559 |
- # idle |
1560 |
- if use tk; then |
1561 |
- ln -s "../../../bin/idle${PYVER}" \ |
1562 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1563 |
- fi |
1564 |
-} |
1565 |
- |
1566 |
-pkg_preinst() { |
1567 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1568 |
- python_updater_warning="1" |
1569 |
- fi |
1570 |
-} |
1571 |
- |
1572 |
-eselect_python_update() { |
1573 |
- if [[ -z "$(eselect python show)" || \ |
1574 |
- ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then |
1575 |
- eselect python update |
1576 |
- fi |
1577 |
- |
1578 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || \ |
1579 |
- ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] |
1580 |
- then |
1581 |
- eselect python update --python${PV%%.*} |
1582 |
- fi |
1583 |
-} |
1584 |
- |
1585 |
-pkg_postinst() { |
1586 |
- eselect_python_update |
1587 |
- |
1588 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1589 |
- ewarn "You have just upgraded from an older version of Python." |
1590 |
- ewarn |
1591 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1592 |
- fi |
1593 |
-} |
1594 |
- |
1595 |
-pkg_postrm() { |
1596 |
- eselect_python_update |
1597 |
-} |
1598 |
|
1599 |
diff --git a/dev-lang/python/python-3.9.0_alpha6.ebuild b/dev-lang/python/python-3.9.0_alpha6.ebuild |
1600 |
deleted file mode 100644 |
1601 |
index 2e417caf95f..00000000000 |
1602 |
--- a/dev-lang/python/python-3.9.0_alpha6.ebuild |
1603 |
+++ /dev/null |
1604 |
@@ -1,327 +0,0 @@ |
1605 |
-# Copyright 1999-2020 Gentoo Authors |
1606 |
-# Distributed under the terms of the GNU General Public License v2 |
1607 |
- |
1608 |
-EAPI="7" |
1609 |
-WANT_LIBTOOL="none" |
1610 |
- |
1611 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
1612 |
- toolchain-funcs |
1613 |
- |
1614 |
-MY_P="Python-${PV/_alpha/a}" |
1615 |
-PYVER=$(ver_cut 1-2) |
1616 |
-PATCHSET="python-gentoo-patches-3.9.0_alpha6" |
1617 |
- |
1618 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1619 |
-HOMEPAGE="https://www.python.org/" |
1620 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
1621 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
1622 |
-S="${WORKDIR}/${MY_P}" |
1623 |
- |
1624 |
-LICENSE="PSF-2" |
1625 |
-SLOT="${PYVER}" |
1626 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
1627 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
1628 |
-RESTRICT="!test? ( test )" |
1629 |
- |
1630 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1631 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1632 |
-# run the bootstrap code on your dev box and include the results in the |
1633 |
-# patchset. See bug 447752. |
1634 |
- |
1635 |
-RDEPEND="app-arch/bzip2:= |
1636 |
- app-arch/xz-utils:= |
1637 |
- dev-libs/libffi:= |
1638 |
- sys-apps/util-linux:= |
1639 |
- >=sys-libs/zlib-1.1.3:= |
1640 |
- virtual/libcrypt:= |
1641 |
- virtual/libintl |
1642 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1643 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1644 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1645 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1646 |
- ssl? ( |
1647 |
- !libressl? ( dev-libs/openssl:= ) |
1648 |
- libressl? ( dev-libs/libressl:= ) |
1649 |
- ) |
1650 |
- tk? ( |
1651 |
- >=dev-lang/tcl-8.0:= |
1652 |
- >=dev-lang/tk-8.0:= |
1653 |
- dev-tcltk/blt:= |
1654 |
- dev-tcltk/tix |
1655 |
- ) |
1656 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1657 |
-# bluetooth requires headers from bluez |
1658 |
-DEPEND="${RDEPEND} |
1659 |
- bluetooth? ( net-wireless/bluez ) |
1660 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
1661 |
- virtual/pkgconfig |
1662 |
- !sys-devel/gcc[libffi(-)]" |
1663 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1664 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1665 |
- |
1666 |
-# large file tests involve a 2.5G file being copied (duplicated) |
1667 |
-CHECKREQS_DISK_BUILD=5500M |
1668 |
- |
1669 |
-pkg_pretend() { |
1670 |
- use test && check-reqs_pkg_pretend |
1671 |
- |
1672 |
- ewarn "This is an early developer preview of Python 3.9. New features" |
1673 |
- ewarn "can still be added up to 2020-05-18. It's not suitable for production" |
1674 |
- ewarn "use, and it is not supported for Gentoo packages." |
1675 |
-} |
1676 |
- |
1677 |
-pkg_setup() { |
1678 |
- use test && check-reqs_pkg_setup |
1679 |
-} |
1680 |
- |
1681 |
-src_prepare() { |
1682 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1683 |
- rm -fr Modules/expat || die |
1684 |
- rm -fr Modules/_ctypes/libffi* || die |
1685 |
- rm -fr Modules/zlib || die |
1686 |
- |
1687 |
- local PATCHES=( |
1688 |
- "${WORKDIR}/${PATCHSET}" |
1689 |
- ) |
1690 |
- |
1691 |
- default |
1692 |
- |
1693 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1694 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1695 |
- |
1696 |
- eautoreconf |
1697 |
-} |
1698 |
- |
1699 |
-src_configure() { |
1700 |
- local disable |
1701 |
- # disable automagic bluetooth headers detection |
1702 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1703 |
- use gdbm || disable+=" gdbm" |
1704 |
- use ncurses || disable+=" _curses _curses_panel" |
1705 |
- use readline || disable+=" readline" |
1706 |
- use sqlite || disable+=" _sqlite3" |
1707 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1708 |
- use tk || disable+=" _tkinter" |
1709 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1710 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1711 |
- |
1712 |
- if ! use xml; then |
1713 |
- ewarn "You have configured Python without XML support." |
1714 |
- ewarn "This is NOT a recommended configuration as you" |
1715 |
- ewarn "may face problems parsing any XML documents." |
1716 |
- fi |
1717 |
- |
1718 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1719 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1720 |
- fi |
1721 |
- |
1722 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1723 |
- append-flags -fwrapv |
1724 |
- fi |
1725 |
- |
1726 |
- filter-flags -malign-double |
1727 |
- |
1728 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1729 |
- if is-flagq -O3; then |
1730 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1731 |
- use hardened && replace-flags -O3 -O2 |
1732 |
- fi |
1733 |
- |
1734 |
- # https://bugs.gentoo.org/700012 |
1735 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1736 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1737 |
- fi |
1738 |
- |
1739 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1740 |
- tc-export CXX |
1741 |
- |
1742 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1743 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1744 |
- # Please query BSD team before removing this! |
1745 |
- append-ldflags "-L." |
1746 |
- |
1747 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1748 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1749 |
- |
1750 |
- local dbmliborder |
1751 |
- if use gdbm; then |
1752 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1753 |
- fi |
1754 |
- |
1755 |
- local myeconfargs=( |
1756 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
1757 |
- # Python on glibc upgrade, remove it proactively to give |
1758 |
- # a chance for users rebuilding python before glibc |
1759 |
- ac_cv_header_stropts_h=no |
1760 |
- |
1761 |
- --enable-shared |
1762 |
- $(use_enable ipv6) |
1763 |
- --infodir='${prefix}/share/info' |
1764 |
- --mandir='${prefix}/share/man' |
1765 |
- --with-computed-gotos |
1766 |
- --with-dbmliborder="${dbmliborder}" |
1767 |
- --with-libc= |
1768 |
- --enable-loadable-sqlite-extensions |
1769 |
- --without-ensurepip |
1770 |
- --with-system-expat |
1771 |
- --with-system-ffi |
1772 |
- ) |
1773 |
- |
1774 |
- OPT="" econf "${myeconfargs[@]}" |
1775 |
-} |
1776 |
- |
1777 |
-src_compile() { |
1778 |
- # Ensure sed works as expected |
1779 |
- # https://bugs.gentoo.org/594768 |
1780 |
- local -x LC_ALL=C |
1781 |
- |
1782 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1783 |
- |
1784 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1785 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1786 |
- pax-mark E python |
1787 |
- else |
1788 |
- pax-mark m python |
1789 |
- fi |
1790 |
-} |
1791 |
- |
1792 |
-src_test() { |
1793 |
- # Tests will not work when cross compiling. |
1794 |
- if tc-is-cross-compiler; then |
1795 |
- elog "Disabling tests due to crosscompiling." |
1796 |
- return |
1797 |
- fi |
1798 |
- |
1799 |
- # Skip failing tests. |
1800 |
- local skipped_tests="gdb" |
1801 |
- |
1802 |
- for test in ${skipped_tests}; do |
1803 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1804 |
- done |
1805 |
- |
1806 |
- # bug 660358 |
1807 |
- local -x COLUMNS=80 |
1808 |
- |
1809 |
- local -x PYTHONDONTWRITEBYTECODE= |
1810 |
- |
1811 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1812 |
- local result=$? |
1813 |
- |
1814 |
- for test in ${skipped_tests}; do |
1815 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1816 |
- done |
1817 |
- |
1818 |
- elog "The following tests have been skipped:" |
1819 |
- for test in ${skipped_tests}; do |
1820 |
- elog "test_${test}.py" |
1821 |
- done |
1822 |
- |
1823 |
- elog "If you would like to run them, you may:" |
1824 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1825 |
- elog "and run the tests separately." |
1826 |
- |
1827 |
- if [[ ${result} -ne 0 ]]; then |
1828 |
- die "emake test failed" |
1829 |
- fi |
1830 |
-} |
1831 |
- |
1832 |
-src_install() { |
1833 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1834 |
- |
1835 |
- emake DESTDIR="${D}" altinstall |
1836 |
- |
1837 |
- # Remove static library |
1838 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1839 |
- |
1840 |
- sed \ |
1841 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1842 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1843 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1844 |
- |
1845 |
- # Fix collisions between different slots of Python. |
1846 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1847 |
- |
1848 |
- # Cheap hack to get version with ABIFLAGS |
1849 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1850 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1851 |
- # Replace python3.X with a symlink to python3.Xm |
1852 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1853 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1854 |
- # Create python3.X-config symlink |
1855 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1856 |
- # Create python-3.5m.pc symlink |
1857 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1858 |
- fi |
1859 |
- |
1860 |
- # python seems to get rebuilt in src_install (bug 569908) |
1861 |
- # Work around it for now. |
1862 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1863 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1864 |
- else |
1865 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1866 |
- fi |
1867 |
- |
1868 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1869 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1870 |
- |
1871 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1872 |
- |
1873 |
- if use examples; then |
1874 |
- docinto examples |
1875 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1876 |
- dodoc -r Tools |
1877 |
- fi |
1878 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1879 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1880 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1881 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1882 |
- |
1883 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1884 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1885 |
- sed \ |
1886 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1887 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1888 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1889 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1890 |
- |
1891 |
- local -x EPYTHON=python${PYVER} |
1892 |
- # if not using a cross-compiler, use the fresh binary |
1893 |
- if ! tc-is-cross-compiler; then |
1894 |
- local -x PYTHON=./python |
1895 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1896 |
- else |
1897 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
1898 |
- fi |
1899 |
- |
1900 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1901 |
- python_domodule epython.py |
1902 |
- |
1903 |
- # python-exec wrapping support |
1904 |
- local pymajor=${PYVER%.*} |
1905 |
- local scriptdir=${D}$(python_get_scriptdir) |
1906 |
- mkdir -p "${scriptdir}" || die |
1907 |
- # python and pythonX |
1908 |
- ln -s "../../../bin/${abiver}" \ |
1909 |
- "${scriptdir}/python${pymajor}" || die |
1910 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
1911 |
- # python-config and pythonX-config |
1912 |
- # note: we need to create a wrapper rather than symlinking it due |
1913 |
- # to some random dirname(argv[0]) magic performed by python-config |
1914 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
1915 |
- #!/bin/sh |
1916 |
- exec "${abiver}-config" "\${@}" |
1917 |
- EOF |
1918 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
1919 |
- ln -s "python${pymajor}-config" \ |
1920 |
- "${scriptdir}/python-config" || die |
1921 |
- # 2to3, pydoc |
1922 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1923 |
- "${scriptdir}/2to3" || die |
1924 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1925 |
- "${scriptdir}/pydoc" || die |
1926 |
- # idle |
1927 |
- if use tk; then |
1928 |
- ln -s "../../../bin/idle${PYVER}" \ |
1929 |
- "${scriptdir}/idle" || die |
1930 |
- fi |
1931 |
-} |
1932 |
|
1933 |
diff --git a/dev-lang/python/python-3.9.0_beta1.ebuild b/dev-lang/python/python-3.9.0_beta1.ebuild |
1934 |
deleted file mode 100644 |
1935 |
index b1c8280ab7a..00000000000 |
1936 |
--- a/dev-lang/python/python-3.9.0_beta1.ebuild |
1937 |
+++ /dev/null |
1938 |
@@ -1,323 +0,0 @@ |
1939 |
-# Copyright 1999-2020 Gentoo Authors |
1940 |
-# Distributed under the terms of the GNU General Public License v2 |
1941 |
- |
1942 |
-EAPI="7" |
1943 |
-WANT_LIBTOOL="none" |
1944 |
- |
1945 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
1946 |
- toolchain-funcs |
1947 |
- |
1948 |
-MY_P="Python-${PV/_beta/b}" |
1949 |
-PYVER=$(ver_cut 1-2) |
1950 |
-PATCHSET="python-gentoo-patches-3.9.0_alpha6" |
1951 |
- |
1952 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1953 |
-HOMEPAGE="https://www.python.org/" |
1954 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
1955 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
1956 |
-S="${WORKDIR}/${MY_P}" |
1957 |
- |
1958 |
-LICENSE="PSF-2" |
1959 |
-SLOT="${PYVER}" |
1960 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
1961 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
1962 |
-RESTRICT="!test? ( test )" |
1963 |
- |
1964 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1965 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1966 |
-# run the bootstrap code on your dev box and include the results in the |
1967 |
-# patchset. See bug 447752. |
1968 |
- |
1969 |
-RDEPEND="app-arch/bzip2:= |
1970 |
- app-arch/xz-utils:= |
1971 |
- dev-libs/libffi:= |
1972 |
- sys-apps/util-linux:= |
1973 |
- >=sys-libs/zlib-1.1.3:= |
1974 |
- virtual/libcrypt:= |
1975 |
- virtual/libintl |
1976 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1977 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1978 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1979 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1980 |
- ssl? ( |
1981 |
- !libressl? ( dev-libs/openssl:= ) |
1982 |
- libressl? ( dev-libs/libressl:= ) |
1983 |
- ) |
1984 |
- tk? ( |
1985 |
- >=dev-lang/tcl-8.0:= |
1986 |
- >=dev-lang/tk-8.0:= |
1987 |
- dev-tcltk/blt:= |
1988 |
- dev-tcltk/tix |
1989 |
- ) |
1990 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1991 |
-# bluetooth requires headers from bluez |
1992 |
-DEPEND="${RDEPEND} |
1993 |
- bluetooth? ( net-wireless/bluez ) |
1994 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
1995 |
- virtual/pkgconfig |
1996 |
- !sys-devel/gcc[libffi(-)]" |
1997 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1998 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1999 |
- |
2000 |
-# large file tests involve a 2.5G file being copied (duplicated) |
2001 |
-CHECKREQS_DISK_BUILD=5500M |
2002 |
- |
2003 |
-pkg_pretend() { |
2004 |
- use test && check-reqs_pkg_pretend |
2005 |
-} |
2006 |
- |
2007 |
-pkg_setup() { |
2008 |
- use test && check-reqs_pkg_setup |
2009 |
-} |
2010 |
- |
2011 |
-src_prepare() { |
2012 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
2013 |
- rm -fr Modules/expat || die |
2014 |
- rm -fr Modules/_ctypes/libffi* || die |
2015 |
- rm -fr Modules/zlib || die |
2016 |
- |
2017 |
- local PATCHES=( |
2018 |
- "${WORKDIR}/${PATCHSET}" |
2019 |
- ) |
2020 |
- |
2021 |
- default |
2022 |
- |
2023 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
2024 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
2025 |
- |
2026 |
- eautoreconf |
2027 |
-} |
2028 |
- |
2029 |
-src_configure() { |
2030 |
- local disable |
2031 |
- # disable automagic bluetooth headers detection |
2032 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
2033 |
- use gdbm || disable+=" gdbm" |
2034 |
- use ncurses || disable+=" _curses _curses_panel" |
2035 |
- use readline || disable+=" readline" |
2036 |
- use sqlite || disable+=" _sqlite3" |
2037 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
2038 |
- use tk || disable+=" _tkinter" |
2039 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
2040 |
- export PYTHON_DISABLE_MODULES="${disable}" |
2041 |
- |
2042 |
- if ! use xml; then |
2043 |
- ewarn "You have configured Python without XML support." |
2044 |
- ewarn "This is NOT a recommended configuration as you" |
2045 |
- ewarn "may face problems parsing any XML documents." |
2046 |
- fi |
2047 |
- |
2048 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
2049 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
2050 |
- fi |
2051 |
- |
2052 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
2053 |
- append-flags -fwrapv |
2054 |
- fi |
2055 |
- |
2056 |
- filter-flags -malign-double |
2057 |
- |
2058 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
2059 |
- if is-flagq -O3; then |
2060 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
2061 |
- use hardened && replace-flags -O3 -O2 |
2062 |
- fi |
2063 |
- |
2064 |
- # https://bugs.gentoo.org/700012 |
2065 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
2066 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
2067 |
- fi |
2068 |
- |
2069 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
2070 |
- tc-export CXX |
2071 |
- |
2072 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
2073 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
2074 |
- # Please query BSD team before removing this! |
2075 |
- append-ldflags "-L." |
2076 |
- |
2077 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
2078 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
2079 |
- |
2080 |
- local dbmliborder |
2081 |
- if use gdbm; then |
2082 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
2083 |
- fi |
2084 |
- |
2085 |
- local myeconfargs=( |
2086 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
2087 |
- # Python on glibc upgrade, remove it proactively to give |
2088 |
- # a chance for users rebuilding python before glibc |
2089 |
- ac_cv_header_stropts_h=no |
2090 |
- |
2091 |
- --enable-shared |
2092 |
- $(use_enable ipv6) |
2093 |
- --infodir='${prefix}/share/info' |
2094 |
- --mandir='${prefix}/share/man' |
2095 |
- --with-computed-gotos |
2096 |
- --with-dbmliborder="${dbmliborder}" |
2097 |
- --with-libc= |
2098 |
- --enable-loadable-sqlite-extensions |
2099 |
- --without-ensurepip |
2100 |
- --with-system-expat |
2101 |
- --with-system-ffi |
2102 |
- ) |
2103 |
- |
2104 |
- OPT="" econf "${myeconfargs[@]}" |
2105 |
-} |
2106 |
- |
2107 |
-src_compile() { |
2108 |
- # Ensure sed works as expected |
2109 |
- # https://bugs.gentoo.org/594768 |
2110 |
- local -x LC_ALL=C |
2111 |
- |
2112 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
2113 |
- |
2114 |
- # Work around bug 329499. See also bug 413751 and 457194. |
2115 |
- if has_version dev-libs/libffi[pax_kernel]; then |
2116 |
- pax-mark E python |
2117 |
- else |
2118 |
- pax-mark m python |
2119 |
- fi |
2120 |
-} |
2121 |
- |
2122 |
-src_test() { |
2123 |
- # Tests will not work when cross compiling. |
2124 |
- if tc-is-cross-compiler; then |
2125 |
- elog "Disabling tests due to crosscompiling." |
2126 |
- return |
2127 |
- fi |
2128 |
- |
2129 |
- # Skip failing tests. |
2130 |
- local skipped_tests="gdb" |
2131 |
- |
2132 |
- for test in ${skipped_tests}; do |
2133 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
2134 |
- done |
2135 |
- |
2136 |
- # bug 660358 |
2137 |
- local -x COLUMNS=80 |
2138 |
- |
2139 |
- local -x PYTHONDONTWRITEBYTECODE= |
2140 |
- |
2141 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
2142 |
- local result=$? |
2143 |
- |
2144 |
- for test in ${skipped_tests}; do |
2145 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
2146 |
- done |
2147 |
- |
2148 |
- elog "The following tests have been skipped:" |
2149 |
- for test in ${skipped_tests}; do |
2150 |
- elog "test_${test}.py" |
2151 |
- done |
2152 |
- |
2153 |
- elog "If you would like to run them, you may:" |
2154 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
2155 |
- elog "and run the tests separately." |
2156 |
- |
2157 |
- if [[ ${result} -ne 0 ]]; then |
2158 |
- die "emake test failed" |
2159 |
- fi |
2160 |
-} |
2161 |
- |
2162 |
-src_install() { |
2163 |
- local libdir=${ED}/usr/lib/python${PYVER} |
2164 |
- |
2165 |
- emake DESTDIR="${D}" altinstall |
2166 |
- |
2167 |
- # Remove static library |
2168 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
2169 |
- |
2170 |
- sed \ |
2171 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
2172 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
2173 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
2174 |
- |
2175 |
- # Fix collisions between different slots of Python. |
2176 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
2177 |
- |
2178 |
- # Cheap hack to get version with ABIFLAGS |
2179 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
2180 |
- if [[ ${abiver} != python${PYVER} ]]; then |
2181 |
- # Replace python3.X with a symlink to python3.Xm |
2182 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
2183 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
2184 |
- # Create python3.X-config symlink |
2185 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
2186 |
- # Create python-3.5m.pc symlink |
2187 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
2188 |
- fi |
2189 |
- |
2190 |
- # python seems to get rebuilt in src_install (bug 569908) |
2191 |
- # Work around it for now. |
2192 |
- if has_version dev-libs/libffi[pax_kernel]; then |
2193 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
2194 |
- else |
2195 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
2196 |
- fi |
2197 |
- |
2198 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
2199 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
2200 |
- |
2201 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
2202 |
- |
2203 |
- if use examples; then |
2204 |
- docinto examples |
2205 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
2206 |
- dodoc -r Tools |
2207 |
- fi |
2208 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
2209 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
2210 |
- emake --no-print-directory -s -f - 2>/dev/null) |
2211 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
2212 |
- |
2213 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
2214 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
2215 |
- sed \ |
2216 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
2217 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
2218 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
2219 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
2220 |
- |
2221 |
- local -x EPYTHON=python${PYVER} |
2222 |
- # if not using a cross-compiler, use the fresh binary |
2223 |
- if ! tc-is-cross-compiler; then |
2224 |
- local -x PYTHON=./python |
2225 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
2226 |
- else |
2227 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
2228 |
- fi |
2229 |
- |
2230 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
2231 |
- python_domodule epython.py |
2232 |
- |
2233 |
- # python-exec wrapping support |
2234 |
- local pymajor=${PYVER%.*} |
2235 |
- local scriptdir=${D}$(python_get_scriptdir) |
2236 |
- mkdir -p "${scriptdir}" || die |
2237 |
- # python and pythonX |
2238 |
- ln -s "../../../bin/${abiver}" \ |
2239 |
- "${scriptdir}/python${pymajor}" || die |
2240 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
2241 |
- # python-config and pythonX-config |
2242 |
- # note: we need to create a wrapper rather than symlinking it due |
2243 |
- # to some random dirname(argv[0]) magic performed by python-config |
2244 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
2245 |
- #!/bin/sh |
2246 |
- exec "${abiver}-config" "\${@}" |
2247 |
- EOF |
2248 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
2249 |
- ln -s "python${pymajor}-config" \ |
2250 |
- "${scriptdir}/python-config" || die |
2251 |
- # 2to3, pydoc |
2252 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
2253 |
- "${scriptdir}/2to3" || die |
2254 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
2255 |
- "${scriptdir}/pydoc" || die |
2256 |
- # idle |
2257 |
- if use tk; then |
2258 |
- ln -s "../../../bin/idle${PYVER}" \ |
2259 |
- "${scriptdir}/idle" || die |
2260 |
- fi |
2261 |
-} |
2262 |
|
2263 |
diff --git a/dev-lang/python/python-3.9.0_beta2.ebuild b/dev-lang/python/python-3.9.0_beta2.ebuild |
2264 |
deleted file mode 100644 |
2265 |
index b1c8280ab7a..00000000000 |
2266 |
--- a/dev-lang/python/python-3.9.0_beta2.ebuild |
2267 |
+++ /dev/null |
2268 |
@@ -1,323 +0,0 @@ |
2269 |
-# Copyright 1999-2020 Gentoo Authors |
2270 |
-# Distributed under the terms of the GNU General Public License v2 |
2271 |
- |
2272 |
-EAPI="7" |
2273 |
-WANT_LIBTOOL="none" |
2274 |
- |
2275 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
2276 |
- toolchain-funcs |
2277 |
- |
2278 |
-MY_P="Python-${PV/_beta/b}" |
2279 |
-PYVER=$(ver_cut 1-2) |
2280 |
-PATCHSET="python-gentoo-patches-3.9.0_alpha6" |
2281 |
- |
2282 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
2283 |
-HOMEPAGE="https://www.python.org/" |
2284 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
2285 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
2286 |
-S="${WORKDIR}/${MY_P}" |
2287 |
- |
2288 |
-LICENSE="PSF-2" |
2289 |
-SLOT="${PYVER}" |
2290 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
2291 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
2292 |
-RESTRICT="!test? ( test )" |
2293 |
- |
2294 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
2295 |
-# If you need to apply a patch which requires python for bootstrapping, please |
2296 |
-# run the bootstrap code on your dev box and include the results in the |
2297 |
-# patchset. See bug 447752. |
2298 |
- |
2299 |
-RDEPEND="app-arch/bzip2:= |
2300 |
- app-arch/xz-utils:= |
2301 |
- dev-libs/libffi:= |
2302 |
- sys-apps/util-linux:= |
2303 |
- >=sys-libs/zlib-1.1.3:= |
2304 |
- virtual/libcrypt:= |
2305 |
- virtual/libintl |
2306 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
2307 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
2308 |
- readline? ( >=sys-libs/readline-4.1:= ) |
2309 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
2310 |
- ssl? ( |
2311 |
- !libressl? ( dev-libs/openssl:= ) |
2312 |
- libressl? ( dev-libs/libressl:= ) |
2313 |
- ) |
2314 |
- tk? ( |
2315 |
- >=dev-lang/tcl-8.0:= |
2316 |
- >=dev-lang/tk-8.0:= |
2317 |
- dev-tcltk/blt:= |
2318 |
- dev-tcltk/tix |
2319 |
- ) |
2320 |
- xml? ( >=dev-libs/expat-2.1:= )" |
2321 |
-# bluetooth requires headers from bluez |
2322 |
-DEPEND="${RDEPEND} |
2323 |
- bluetooth? ( net-wireless/bluez ) |
2324 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
2325 |
- virtual/pkgconfig |
2326 |
- !sys-devel/gcc[libffi(-)]" |
2327 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
2328 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
2329 |
- |
2330 |
-# large file tests involve a 2.5G file being copied (duplicated) |
2331 |
-CHECKREQS_DISK_BUILD=5500M |
2332 |
- |
2333 |
-pkg_pretend() { |
2334 |
- use test && check-reqs_pkg_pretend |
2335 |
-} |
2336 |
- |
2337 |
-pkg_setup() { |
2338 |
- use test && check-reqs_pkg_setup |
2339 |
-} |
2340 |
- |
2341 |
-src_prepare() { |
2342 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
2343 |
- rm -fr Modules/expat || die |
2344 |
- rm -fr Modules/_ctypes/libffi* || die |
2345 |
- rm -fr Modules/zlib || die |
2346 |
- |
2347 |
- local PATCHES=( |
2348 |
- "${WORKDIR}/${PATCHSET}" |
2349 |
- ) |
2350 |
- |
2351 |
- default |
2352 |
- |
2353 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
2354 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
2355 |
- |
2356 |
- eautoreconf |
2357 |
-} |
2358 |
- |
2359 |
-src_configure() { |
2360 |
- local disable |
2361 |
- # disable automagic bluetooth headers detection |
2362 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
2363 |
- use gdbm || disable+=" gdbm" |
2364 |
- use ncurses || disable+=" _curses _curses_panel" |
2365 |
- use readline || disable+=" readline" |
2366 |
- use sqlite || disable+=" _sqlite3" |
2367 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
2368 |
- use tk || disable+=" _tkinter" |
2369 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
2370 |
- export PYTHON_DISABLE_MODULES="${disable}" |
2371 |
- |
2372 |
- if ! use xml; then |
2373 |
- ewarn "You have configured Python without XML support." |
2374 |
- ewarn "This is NOT a recommended configuration as you" |
2375 |
- ewarn "may face problems parsing any XML documents." |
2376 |
- fi |
2377 |
- |
2378 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
2379 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
2380 |
- fi |
2381 |
- |
2382 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
2383 |
- append-flags -fwrapv |
2384 |
- fi |
2385 |
- |
2386 |
- filter-flags -malign-double |
2387 |
- |
2388 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
2389 |
- if is-flagq -O3; then |
2390 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
2391 |
- use hardened && replace-flags -O3 -O2 |
2392 |
- fi |
2393 |
- |
2394 |
- # https://bugs.gentoo.org/700012 |
2395 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
2396 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
2397 |
- fi |
2398 |
- |
2399 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
2400 |
- tc-export CXX |
2401 |
- |
2402 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
2403 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
2404 |
- # Please query BSD team before removing this! |
2405 |
- append-ldflags "-L." |
2406 |
- |
2407 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
2408 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
2409 |
- |
2410 |
- local dbmliborder |
2411 |
- if use gdbm; then |
2412 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
2413 |
- fi |
2414 |
- |
2415 |
- local myeconfargs=( |
2416 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
2417 |
- # Python on glibc upgrade, remove it proactively to give |
2418 |
- # a chance for users rebuilding python before glibc |
2419 |
- ac_cv_header_stropts_h=no |
2420 |
- |
2421 |
- --enable-shared |
2422 |
- $(use_enable ipv6) |
2423 |
- --infodir='${prefix}/share/info' |
2424 |
- --mandir='${prefix}/share/man' |
2425 |
- --with-computed-gotos |
2426 |
- --with-dbmliborder="${dbmliborder}" |
2427 |
- --with-libc= |
2428 |
- --enable-loadable-sqlite-extensions |
2429 |
- --without-ensurepip |
2430 |
- --with-system-expat |
2431 |
- --with-system-ffi |
2432 |
- ) |
2433 |
- |
2434 |
- OPT="" econf "${myeconfargs[@]}" |
2435 |
-} |
2436 |
- |
2437 |
-src_compile() { |
2438 |
- # Ensure sed works as expected |
2439 |
- # https://bugs.gentoo.org/594768 |
2440 |
- local -x LC_ALL=C |
2441 |
- |
2442 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
2443 |
- |
2444 |
- # Work around bug 329499. See also bug 413751 and 457194. |
2445 |
- if has_version dev-libs/libffi[pax_kernel]; then |
2446 |
- pax-mark E python |
2447 |
- else |
2448 |
- pax-mark m python |
2449 |
- fi |
2450 |
-} |
2451 |
- |
2452 |
-src_test() { |
2453 |
- # Tests will not work when cross compiling. |
2454 |
- if tc-is-cross-compiler; then |
2455 |
- elog "Disabling tests due to crosscompiling." |
2456 |
- return |
2457 |
- fi |
2458 |
- |
2459 |
- # Skip failing tests. |
2460 |
- local skipped_tests="gdb" |
2461 |
- |
2462 |
- for test in ${skipped_tests}; do |
2463 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
2464 |
- done |
2465 |
- |
2466 |
- # bug 660358 |
2467 |
- local -x COLUMNS=80 |
2468 |
- |
2469 |
- local -x PYTHONDONTWRITEBYTECODE= |
2470 |
- |
2471 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
2472 |
- local result=$? |
2473 |
- |
2474 |
- for test in ${skipped_tests}; do |
2475 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
2476 |
- done |
2477 |
- |
2478 |
- elog "The following tests have been skipped:" |
2479 |
- for test in ${skipped_tests}; do |
2480 |
- elog "test_${test}.py" |
2481 |
- done |
2482 |
- |
2483 |
- elog "If you would like to run them, you may:" |
2484 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
2485 |
- elog "and run the tests separately." |
2486 |
- |
2487 |
- if [[ ${result} -ne 0 ]]; then |
2488 |
- die "emake test failed" |
2489 |
- fi |
2490 |
-} |
2491 |
- |
2492 |
-src_install() { |
2493 |
- local libdir=${ED}/usr/lib/python${PYVER} |
2494 |
- |
2495 |
- emake DESTDIR="${D}" altinstall |
2496 |
- |
2497 |
- # Remove static library |
2498 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
2499 |
- |
2500 |
- sed \ |
2501 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
2502 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
2503 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
2504 |
- |
2505 |
- # Fix collisions between different slots of Python. |
2506 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
2507 |
- |
2508 |
- # Cheap hack to get version with ABIFLAGS |
2509 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
2510 |
- if [[ ${abiver} != python${PYVER} ]]; then |
2511 |
- # Replace python3.X with a symlink to python3.Xm |
2512 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
2513 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
2514 |
- # Create python3.X-config symlink |
2515 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
2516 |
- # Create python-3.5m.pc symlink |
2517 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
2518 |
- fi |
2519 |
- |
2520 |
- # python seems to get rebuilt in src_install (bug 569908) |
2521 |
- # Work around it for now. |
2522 |
- if has_version dev-libs/libffi[pax_kernel]; then |
2523 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
2524 |
- else |
2525 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
2526 |
- fi |
2527 |
- |
2528 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
2529 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
2530 |
- |
2531 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
2532 |
- |
2533 |
- if use examples; then |
2534 |
- docinto examples |
2535 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
2536 |
- dodoc -r Tools |
2537 |
- fi |
2538 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
2539 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
2540 |
- emake --no-print-directory -s -f - 2>/dev/null) |
2541 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
2542 |
- |
2543 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
2544 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
2545 |
- sed \ |
2546 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
2547 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
2548 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
2549 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
2550 |
- |
2551 |
- local -x EPYTHON=python${PYVER} |
2552 |
- # if not using a cross-compiler, use the fresh binary |
2553 |
- if ! tc-is-cross-compiler; then |
2554 |
- local -x PYTHON=./python |
2555 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
2556 |
- else |
2557 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
2558 |
- fi |
2559 |
- |
2560 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
2561 |
- python_domodule epython.py |
2562 |
- |
2563 |
- # python-exec wrapping support |
2564 |
- local pymajor=${PYVER%.*} |
2565 |
- local scriptdir=${D}$(python_get_scriptdir) |
2566 |
- mkdir -p "${scriptdir}" || die |
2567 |
- # python and pythonX |
2568 |
- ln -s "../../../bin/${abiver}" \ |
2569 |
- "${scriptdir}/python${pymajor}" || die |
2570 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
2571 |
- # python-config and pythonX-config |
2572 |
- # note: we need to create a wrapper rather than symlinking it due |
2573 |
- # to some random dirname(argv[0]) magic performed by python-config |
2574 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
2575 |
- #!/bin/sh |
2576 |
- exec "${abiver}-config" "\${@}" |
2577 |
- EOF |
2578 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
2579 |
- ln -s "python${pymajor}-config" \ |
2580 |
- "${scriptdir}/python-config" || die |
2581 |
- # 2to3, pydoc |
2582 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
2583 |
- "${scriptdir}/2to3" || die |
2584 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
2585 |
- "${scriptdir}/pydoc" || die |
2586 |
- # idle |
2587 |
- if use tk; then |
2588 |
- ln -s "../../../bin/idle${PYVER}" \ |
2589 |
- "${scriptdir}/idle" || die |
2590 |
- fi |
2591 |
-} |