1 |
commit: 59bf481fe2c9797defd1cf1bc14ebefb32995430 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 18 07:03:44 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 18 08:03:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59bf481f |
7 |
|
8 |
dev-lang/python: Remove 3.9.0 betas |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-lang/python/Manifest | 7 - |
13 |
dev-lang/python/python-3.9.0_beta3.ebuild | 323 --------------------------- |
14 |
dev-lang/python/python-3.9.0_beta4-r1.ebuild | 323 --------------------------- |
15 |
dev-lang/python/python-3.9.0_beta4.ebuild | 323 --------------------------- |
16 |
dev-lang/python/python-3.9.0_beta5.ebuild | 323 --------------------------- |
17 |
5 files changed, 1299 deletions(-) |
18 |
|
19 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
20 |
index 4da749100ba..4c0d5118607 100644 |
21 |
--- a/dev-lang/python/Manifest |
22 |
+++ b/dev-lang/python/Manifest |
23 |
@@ -3,17 +3,10 @@ DIST Python-3.6.11.tar.xz 17213036 BLAKE2B 4dae9d9c5eb7e97a8990b0b5739d40ba8a850 |
24 |
DIST Python-3.7.8.tar.xz 17399552 BLAKE2B 4bf6c47b1132b6d31a79232002c4d38e2cd123ac05d52b21d6bfba5a4e19ec9130b8df8698d5ce6627e4297c4cf756643f036e694e36364c235306c72ef34bf8 SHA512 d2ba299e3cf8ed0f8fed9317f42bcd8d9af7e0e6175939b4be1be289c1658418bed17899e2608d762ffb15575021956cf6bf2054d7863c04b3bd7642f5b8c7ea |
25 |
DIST Python-3.8.4.tar.xz 18020412 BLAKE2B cfcfb293c413b25fc3ca48116cf8ffaba7bee18e9af9accf26be9b4373a0c62dd8e9da70e5a8a38ba6da4d1afbdbd589ae5ea4b618b65130ae061698b445908c SHA512 37a36d014a8372742be9d0bd9dd3a275e100dc21b1515c145bc62425d4d157327b6e63ad99bc888c0b36c1da4c05676c40eb086e75072d1906e3210ec3043dcb |
26 |
DIST Python-3.8.5.tar.xz 18019640 BLAKE2B bb3e0566afe28759e4ab129ad0986a0fc5103514f2e2b22ff4aa3973c3173ebdd24d4267fbaf903841814a611fd9ea122673e5a1918934366e5c0efaef9d7517 SHA512 460cee65d7df7150694590575502d7f22e548ebfc99c8f8b363eef8bf30ee72e58d8ffacb1d607824f877f880eb9fd6775a508388029583e1e1df3380f3f9587 |
27 |
-DIST Python-3.9.0b3.tar.xz 18518204 BLAKE2B fa1707f0d55a83e739e9ad51979f8aff9720588a8a77b7ce8beb9ecf599955677758dec1551a0549b010f86c1f8fbc5915cef34d63097534d1c512c92fad5bd1 SHA512 c06a6b874fbce93ec37402034158a7bab44cab775d6da467eaddc1eb402663415f9d788e657a204f17dffe5fa6f379379f9215b5198ec5071565486b6f0e4a2a |
28 |
-DIST Python-3.9.0b4.tar.xz 18602256 BLAKE2B 9f260f2b3c6380745c343d2883db430dda1b76b120050df16e53c1021e5a746c7e4a6aa8e83c746c3705c6872e83369a649c48ffdaef972a7049c44f7bc3030b SHA512 1c9bac850159352effb163b41590b3e9c05100b449798b5615f7a51a59a3877fe9558d593bb47c24915226637e3394e7864a1b1555cd6c5b5e5e308972208ecf |
29 |
-DIST Python-3.9.0b5.tar.xz 18588472 BLAKE2B 4f430c06bce30a5e554f0aa23e56f5eac74d13be4fe88c91c125a7b2df2a390c78942e02c387ed84f369d9c08d4e0960909faaa80f69cd02b6304ede688dd926 SHA512 fd99fe9b3364811512857bcc7963b59b1cf724cbd2174292ba9b16748f1b97949a7d6c5016fb7f4568c366cf9b9fd14d25400773c5240fc31f11086d14e8d3aa |
30 |
DIST Python-3.9.0rc1.tar.xz 18798364 BLAKE2B 2ebf669720bcc057f7e1056aca6ff42686a8e567a5ea10304f19e53ae80ba6ba60b9157ae401427be4afa1ec296d97bb81a2b55c60a4df3dba39ae545484e0fc SHA512 8fddf940600bdd4096c0144f689fb9e803bdc7a1ee00f46ccfde3566342ed465c7ac6806613e4f61440fb65f8f83057204bd0dc432ac379759cd4d410c151eef |
31 |
DIST python-gentoo-patches-2.7.18-r1.tar.xz 15500 BLAKE2B 7008b29827dbbd80d4ab8f010ccf9efced99c6b4b9109e4430c0ba269ce53529cb6fedd832502c8d2d3aa21938749cc3591c2545b21c0a59a6e60f8598e84ccc SHA512 e656ab07281fd932b92165674619bbf55ecf410d2937ae4ae771d490b4532540498cc731d30d19c1e8aafd1f64df8a406bbfbb46ea985b3dcd8edb89a0b7f20f |
32 |
DIST python-gentoo-patches-3.6.11-r3.tar.xz 14064 BLAKE2B 416780c15ee12cfc06bfd1397d510dd42fea61abcaafd9cf54f27d843342debf0caa93c9700686feb14f04239ad4ea8f20ce8736029638abe7d7b9c57b9d659d SHA512 de6a4a5bec89e6149b85b383991c99bd9460a8f59f52a700d54edd0154557727ccc79daaa90336dff434b222657c3f28dda1228d2d474002d0a28f31c9ed0b10 |
33 |
DIST python-gentoo-patches-3.7.8-r3.tar.xz 13232 BLAKE2B 9df47b1f61d08f62a80221bc48d73ec27cd74a9ade8219912c5b02eaea919b70d91b1154837cd03c0129a5839186e9c970167ca3398129c044c25c7853f1f920 SHA512 e1477d425cb6125ca2286d816f4aa4e9e3c789d6a4f4907bd7b78549598356cae5766f642e2cad9e7c3abe2e82c12cf3cb7db3513be68aa213cb64cc0abc678a |
34 |
DIST python-gentoo-patches-3.8.4-r2.tar.xz 12660 BLAKE2B 3197edc6beb2b1be05399f268ff9b337ed67f699e3867160fea8e50f763a62b184ddd7adcdfa55dafc8c14f91e020b409461027361d04858db667992794b1168 SHA512 c56adbec04bfb950f7fb65f38cc0b78eaae9783800c755b7ac934b07725fcf4d69bbc2c29f7d1255acd6e88559a216dc8a6088042a479aa0d453b706e318c0cf |
35 |
DIST python-gentoo-patches-3.8.5.tar.xz 11280 BLAKE2B 163c577da75f4ec0ebe86b5a08bea96d5ae406020bd211439b1405c0f8a5dddc9422a9ea5b16eed195433cbec010d9def3126a578d3f9716325482216b9e4d62 SHA512 6b7f72b8deb87fb7a169e97391185823984b5e9c99ec5232504c670843fbe0ca76afe32fc3fbe1f850ec6c42e9325cf4697022f36f7b00a4028b324069dd4d5b |
36 |
-DIST python-gentoo-patches-3.9.0b3-r1.tar.xz 8860 BLAKE2B 87636ad5f1e2e92b2b12f46384d89b2f478861b320687edd257b4a157afb86a5a9d2bf55e7b51e1e612013e974689c64082012243c5c27afe65f5cb3bb03d562 SHA512 266f0925c1b62bfa38fd05f1fc4bc953d87ae44f0cb54ac415e374ef508e88b5cd07f52dba470f418fa7db74f9c06975778a95e21a50110859f88695a65265cb |
37 |
-DIST python-gentoo-patches-3.9.0b3.tar.xz 8592 BLAKE2B 261dc9a5c7b370eb3f693f5bfb15562a5ee8b24b038db1b16571f096ff0d451ef8830c7f51db53366ebcf6e378dfab57e186f1789dc3ecc95e65595708f4428e SHA512 4c630b1b15e752ae154bfc9d0f5c8a17ac02127f96ccf114469bb92d02fe7d2ac13acd2415bfe6af0169c823b4aec09e2d6886c031df8e8c809ccb94efa60b62 |
38 |
-DIST python-gentoo-patches-3.9.0b4.tar.xz 10640 BLAKE2B af433fee46ff3eca0ef23cea2ed838cb5a4337a646f3b9a662f7ecf2e75d5fef81437daf88c920b6459160d328b3fa976f7611d1a34084b67e93fc72340fd070 SHA512 dc7cc77fc72c701d09a85dec2a2172ae71223e7a55455f689967d3246bb6e2815c9e4f45493545c03bc949d54a1e9ff354de88c785bc6c215b736862a21dea19 |
39 |
-DIST python-gentoo-patches-3.9.0b5.tar.xz 9180 BLAKE2B 49ce1f4dc4647829037a288677e99f27dfefa23ef4a2930d19e79614e7dbe6bd5c8074f73b452c1092fd3ae9d0ed573a8a3549f0ebd0c95b7fa0cac127ddedac SHA512 7d99090ea08165640915c4299ec9a1d985c6f896b11059063889faa7fb6cfe2ff3aefee5718470e4bb09fbdbc9f4867c9b189ac99596d4637e5aea63a493575b |
40 |
DIST python-gentoo-patches-3.9.0rc1.tar.xz 8856 BLAKE2B 7bd032dfd047640c6a53633b5b9ee7b24199106b985230f772dda978d3b79fe0406eea64c4a842603a20afb71a90469befa7ec59a5ef1f793e4c901aa85952d1 SHA512 85a7d4397abf2a0f3c3d07a94a3e184ba3dcb347f3b70ee2cb77e81aac63846b01323a0228afd0fd1d32b3cafb64b18f82e6f5bfd88e4d564261ddae11e747eb |
41 |
|
42 |
diff --git a/dev-lang/python/python-3.9.0_beta3.ebuild b/dev-lang/python/python-3.9.0_beta3.ebuild |
43 |
deleted file mode 100644 |
44 |
index 8a98fd0b0c7..00000000000 |
45 |
--- a/dev-lang/python/python-3.9.0_beta3.ebuild |
46 |
+++ /dev/null |
47 |
@@ -1,323 +0,0 @@ |
48 |
-# Copyright 1999-2020 Gentoo Authors |
49 |
-# Distributed under the terms of the GNU General Public License v2 |
50 |
- |
51 |
-EAPI="7" |
52 |
-WANT_LIBTOOL="none" |
53 |
- |
54 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
55 |
- toolchain-funcs |
56 |
- |
57 |
-MY_P="Python-${PV/_beta/b}" |
58 |
-PYVER=$(ver_cut 1-2) |
59 |
-PATCHSET="python-gentoo-patches-3.9.0b3" |
60 |
- |
61 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
62 |
-HOMEPAGE="https://www.python.org/" |
63 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
64 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
65 |
-S="${WORKDIR}/${MY_P}" |
66 |
- |
67 |
-LICENSE="PSF-2" |
68 |
-SLOT="${PYVER}" |
69 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
70 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
71 |
-RESTRICT="!test? ( test )" |
72 |
- |
73 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
74 |
-# If you need to apply a patch which requires python for bootstrapping, please |
75 |
-# run the bootstrap code on your dev box and include the results in the |
76 |
-# patchset. See bug 447752. |
77 |
- |
78 |
-RDEPEND="app-arch/bzip2:= |
79 |
- app-arch/xz-utils:= |
80 |
- dev-libs/libffi:= |
81 |
- sys-apps/util-linux:= |
82 |
- >=sys-libs/zlib-1.1.3:= |
83 |
- virtual/libcrypt:= |
84 |
- virtual/libintl |
85 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
86 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
87 |
- readline? ( >=sys-libs/readline-4.1:= ) |
88 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
89 |
- ssl? ( |
90 |
- !libressl? ( dev-libs/openssl:= ) |
91 |
- libressl? ( dev-libs/libressl:= ) |
92 |
- ) |
93 |
- tk? ( |
94 |
- >=dev-lang/tcl-8.0:= |
95 |
- >=dev-lang/tk-8.0:= |
96 |
- dev-tcltk/blt:= |
97 |
- dev-tcltk/tix |
98 |
- ) |
99 |
- xml? ( >=dev-libs/expat-2.1:= )" |
100 |
-# bluetooth requires headers from bluez |
101 |
-DEPEND="${RDEPEND} |
102 |
- bluetooth? ( net-wireless/bluez ) |
103 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
104 |
- virtual/pkgconfig |
105 |
- !sys-devel/gcc[libffi(-)]" |
106 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
107 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
108 |
- |
109 |
-# large file tests involve a 2.5G file being copied (duplicated) |
110 |
-CHECKREQS_DISK_BUILD=5500M |
111 |
- |
112 |
-pkg_pretend() { |
113 |
- use test && check-reqs_pkg_pretend |
114 |
-} |
115 |
- |
116 |
-pkg_setup() { |
117 |
- use test && check-reqs_pkg_setup |
118 |
-} |
119 |
- |
120 |
-src_prepare() { |
121 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
122 |
- rm -fr Modules/expat || die |
123 |
- rm -fr Modules/_ctypes/libffi* || die |
124 |
- rm -fr Modules/zlib || die |
125 |
- |
126 |
- local PATCHES=( |
127 |
- "${WORKDIR}/${PATCHSET}" |
128 |
- ) |
129 |
- |
130 |
- default |
131 |
- |
132 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
133 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
134 |
- |
135 |
- eautoreconf |
136 |
-} |
137 |
- |
138 |
-src_configure() { |
139 |
- local disable |
140 |
- # disable automagic bluetooth headers detection |
141 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
142 |
- use gdbm || disable+=" gdbm" |
143 |
- use ncurses || disable+=" _curses _curses_panel" |
144 |
- use readline || disable+=" readline" |
145 |
- use sqlite || disable+=" _sqlite3" |
146 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
147 |
- use tk || disable+=" _tkinter" |
148 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
149 |
- export PYTHON_DISABLE_MODULES="${disable}" |
150 |
- |
151 |
- if ! use xml; then |
152 |
- ewarn "You have configured Python without XML support." |
153 |
- ewarn "This is NOT a recommended configuration as you" |
154 |
- ewarn "may face problems parsing any XML documents." |
155 |
- fi |
156 |
- |
157 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
158 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
159 |
- fi |
160 |
- |
161 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
162 |
- append-flags -fwrapv |
163 |
- fi |
164 |
- |
165 |
- filter-flags -malign-double |
166 |
- |
167 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
168 |
- if is-flagq -O3; then |
169 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
170 |
- use hardened && replace-flags -O3 -O2 |
171 |
- fi |
172 |
- |
173 |
- # https://bugs.gentoo.org/700012 |
174 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
175 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
176 |
- fi |
177 |
- |
178 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
179 |
- tc-export CXX |
180 |
- |
181 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
182 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
183 |
- # Please query BSD team before removing this! |
184 |
- append-ldflags "-L." |
185 |
- |
186 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
187 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
188 |
- |
189 |
- local dbmliborder |
190 |
- if use gdbm; then |
191 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
192 |
- fi |
193 |
- |
194 |
- local myeconfargs=( |
195 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
196 |
- # Python on glibc upgrade, remove it proactively to give |
197 |
- # a chance for users rebuilding python before glibc |
198 |
- ac_cv_header_stropts_h=no |
199 |
- |
200 |
- --enable-shared |
201 |
- $(use_enable ipv6) |
202 |
- --infodir='${prefix}/share/info' |
203 |
- --mandir='${prefix}/share/man' |
204 |
- --with-computed-gotos |
205 |
- --with-dbmliborder="${dbmliborder}" |
206 |
- --with-libc= |
207 |
- --enable-loadable-sqlite-extensions |
208 |
- --without-ensurepip |
209 |
- --with-system-expat |
210 |
- --with-system-ffi |
211 |
- ) |
212 |
- |
213 |
- OPT="" econf "${myeconfargs[@]}" |
214 |
-} |
215 |
- |
216 |
-src_compile() { |
217 |
- # Ensure sed works as expected |
218 |
- # https://bugs.gentoo.org/594768 |
219 |
- local -x LC_ALL=C |
220 |
- |
221 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
222 |
- |
223 |
- # Work around bug 329499. See also bug 413751 and 457194. |
224 |
- if has_version dev-libs/libffi[pax_kernel]; then |
225 |
- pax-mark E python |
226 |
- else |
227 |
- pax-mark m python |
228 |
- fi |
229 |
-} |
230 |
- |
231 |
-src_test() { |
232 |
- # Tests will not work when cross compiling. |
233 |
- if tc-is-cross-compiler; then |
234 |
- elog "Disabling tests due to crosscompiling." |
235 |
- return |
236 |
- fi |
237 |
- |
238 |
- # Skip failing tests. |
239 |
- local skipped_tests="gdb" |
240 |
- |
241 |
- for test in ${skipped_tests}; do |
242 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
243 |
- done |
244 |
- |
245 |
- # bug 660358 |
246 |
- local -x COLUMNS=80 |
247 |
- |
248 |
- local -x PYTHONDONTWRITEBYTECODE= |
249 |
- |
250 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
251 |
- local result=$? |
252 |
- |
253 |
- for test in ${skipped_tests}; do |
254 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
255 |
- done |
256 |
- |
257 |
- elog "The following tests have been skipped:" |
258 |
- for test in ${skipped_tests}; do |
259 |
- elog "test_${test}.py" |
260 |
- done |
261 |
- |
262 |
- elog "If you would like to run them, you may:" |
263 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
264 |
- elog "and run the tests separately." |
265 |
- |
266 |
- if [[ ${result} -ne 0 ]]; then |
267 |
- die "emake test failed" |
268 |
- fi |
269 |
-} |
270 |
- |
271 |
-src_install() { |
272 |
- local libdir=${ED}/usr/lib/python${PYVER} |
273 |
- |
274 |
- emake DESTDIR="${D}" altinstall |
275 |
- |
276 |
- # Remove static library |
277 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
278 |
- |
279 |
- sed \ |
280 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
281 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
282 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
283 |
- |
284 |
- # Fix collisions between different slots of Python. |
285 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
286 |
- |
287 |
- # Cheap hack to get version with ABIFLAGS |
288 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
289 |
- if [[ ${abiver} != python${PYVER} ]]; then |
290 |
- # Replace python3.X with a symlink to python3.Xm |
291 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
292 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
293 |
- # Create python3.X-config symlink |
294 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
295 |
- # Create python-3.5m.pc symlink |
296 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
297 |
- fi |
298 |
- |
299 |
- # python seems to get rebuilt in src_install (bug 569908) |
300 |
- # Work around it for now. |
301 |
- if has_version dev-libs/libffi[pax_kernel]; then |
302 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
303 |
- else |
304 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
305 |
- fi |
306 |
- |
307 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
308 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
309 |
- |
310 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
311 |
- |
312 |
- if use examples; then |
313 |
- docinto examples |
314 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
315 |
- dodoc -r Tools |
316 |
- fi |
317 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
318 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
319 |
- emake --no-print-directory -s -f - 2>/dev/null) |
320 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
321 |
- |
322 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
323 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
324 |
- sed \ |
325 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
326 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
327 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
328 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
329 |
- |
330 |
- local -x EPYTHON=python${PYVER} |
331 |
- # if not using a cross-compiler, use the fresh binary |
332 |
- if ! tc-is-cross-compiler; then |
333 |
- local -x PYTHON=./python |
334 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
335 |
- else |
336 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
337 |
- fi |
338 |
- |
339 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
340 |
- python_domodule epython.py |
341 |
- |
342 |
- # python-exec wrapping support |
343 |
- local pymajor=${PYVER%.*} |
344 |
- local scriptdir=${D}$(python_get_scriptdir) |
345 |
- mkdir -p "${scriptdir}" || die |
346 |
- # python and pythonX |
347 |
- ln -s "../../../bin/${abiver}" \ |
348 |
- "${scriptdir}/python${pymajor}" || die |
349 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
350 |
- # python-config and pythonX-config |
351 |
- # note: we need to create a wrapper rather than symlinking it due |
352 |
- # to some random dirname(argv[0]) magic performed by python-config |
353 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
354 |
- #!/bin/sh |
355 |
- exec "${abiver}-config" "\${@}" |
356 |
- EOF |
357 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
358 |
- ln -s "python${pymajor}-config" \ |
359 |
- "${scriptdir}/python-config" || die |
360 |
- # 2to3, pydoc |
361 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
362 |
- "${scriptdir}/2to3" || die |
363 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
364 |
- "${scriptdir}/pydoc" || die |
365 |
- # idle |
366 |
- if use tk; then |
367 |
- ln -s "../../../bin/idle${PYVER}" \ |
368 |
- "${scriptdir}/idle" || die |
369 |
- fi |
370 |
-} |
371 |
|
372 |
diff --git a/dev-lang/python/python-3.9.0_beta4-r1.ebuild b/dev-lang/python/python-3.9.0_beta4-r1.ebuild |
373 |
deleted file mode 100644 |
374 |
index 1c5a83a1d9a..00000000000 |
375 |
--- a/dev-lang/python/python-3.9.0_beta4-r1.ebuild |
376 |
+++ /dev/null |
377 |
@@ -1,323 +0,0 @@ |
378 |
-# Copyright 1999-2020 Gentoo Authors |
379 |
-# Distributed under the terms of the GNU General Public License v2 |
380 |
- |
381 |
-EAPI="7" |
382 |
-WANT_LIBTOOL="none" |
383 |
- |
384 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
385 |
- toolchain-funcs |
386 |
- |
387 |
-MY_P="Python-${PV/_beta/b}" |
388 |
-PYVER=$(ver_cut 1-2) |
389 |
-PATCHSET="python-gentoo-patches-3.9.0b4" |
390 |
- |
391 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
392 |
-HOMEPAGE="https://www.python.org/" |
393 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
394 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
395 |
-S="${WORKDIR}/${MY_P}" |
396 |
- |
397 |
-LICENSE="PSF-2" |
398 |
-SLOT="${PYVER}" |
399 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
400 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
401 |
-RESTRICT="!test? ( test )" |
402 |
- |
403 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
404 |
-# If you need to apply a patch which requires python for bootstrapping, please |
405 |
-# run the bootstrap code on your dev box and include the results in the |
406 |
-# patchset. See bug 447752. |
407 |
- |
408 |
-RDEPEND="app-arch/bzip2:= |
409 |
- app-arch/xz-utils:= |
410 |
- dev-libs/libffi:= |
411 |
- sys-apps/util-linux:= |
412 |
- >=sys-libs/zlib-1.1.3:= |
413 |
- virtual/libcrypt:= |
414 |
- virtual/libintl |
415 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
416 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
417 |
- readline? ( >=sys-libs/readline-4.1:= ) |
418 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
419 |
- ssl? ( |
420 |
- !libressl? ( dev-libs/openssl:= ) |
421 |
- libressl? ( dev-libs/libressl:= ) |
422 |
- ) |
423 |
- tk? ( |
424 |
- >=dev-lang/tcl-8.0:= |
425 |
- >=dev-lang/tk-8.0:= |
426 |
- dev-tcltk/blt:= |
427 |
- dev-tcltk/tix |
428 |
- ) |
429 |
- xml? ( >=dev-libs/expat-2.1:= )" |
430 |
-# bluetooth requires headers from bluez |
431 |
-DEPEND="${RDEPEND} |
432 |
- bluetooth? ( net-wireless/bluez ) |
433 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
434 |
- virtual/pkgconfig |
435 |
- !sys-devel/gcc[libffi(-)]" |
436 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
437 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
438 |
- |
439 |
-# large file tests involve a 2.5G file being copied (duplicated) |
440 |
-CHECKREQS_DISK_BUILD=5500M |
441 |
- |
442 |
-pkg_pretend() { |
443 |
- use test && check-reqs_pkg_pretend |
444 |
-} |
445 |
- |
446 |
-pkg_setup() { |
447 |
- use test && check-reqs_pkg_setup |
448 |
-} |
449 |
- |
450 |
-src_prepare() { |
451 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
452 |
- rm -fr Modules/expat || die |
453 |
- rm -fr Modules/_ctypes/libffi* || die |
454 |
- rm -fr Modules/zlib || die |
455 |
- |
456 |
- local PATCHES=( |
457 |
- "${WORKDIR}/${PATCHSET}" |
458 |
- ) |
459 |
- |
460 |
- default |
461 |
- |
462 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
463 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
464 |
- |
465 |
- eautoreconf |
466 |
-} |
467 |
- |
468 |
-src_configure() { |
469 |
- local disable |
470 |
- # disable automagic bluetooth headers detection |
471 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
472 |
- use gdbm || disable+=" gdbm" |
473 |
- use ncurses || disable+=" _curses _curses_panel" |
474 |
- use readline || disable+=" readline" |
475 |
- use sqlite || disable+=" _sqlite3" |
476 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
477 |
- use tk || disable+=" _tkinter" |
478 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
479 |
- export PYTHON_DISABLE_MODULES="${disable}" |
480 |
- |
481 |
- if ! use xml; then |
482 |
- ewarn "You have configured Python without XML support." |
483 |
- ewarn "This is NOT a recommended configuration as you" |
484 |
- ewarn "may face problems parsing any XML documents." |
485 |
- fi |
486 |
- |
487 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
488 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
489 |
- fi |
490 |
- |
491 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
492 |
- append-flags -fwrapv |
493 |
- fi |
494 |
- |
495 |
- filter-flags -malign-double |
496 |
- |
497 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
498 |
- if is-flagq -O3; then |
499 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
500 |
- use hardened && replace-flags -O3 -O2 |
501 |
- fi |
502 |
- |
503 |
- # https://bugs.gentoo.org/700012 |
504 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
505 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
506 |
- fi |
507 |
- |
508 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
509 |
- tc-export CXX |
510 |
- |
511 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
512 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
513 |
- # Please query BSD team before removing this! |
514 |
- append-ldflags "-L." |
515 |
- |
516 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
517 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
518 |
- |
519 |
- local dbmliborder |
520 |
- if use gdbm; then |
521 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
522 |
- fi |
523 |
- |
524 |
- local myeconfargs=( |
525 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
526 |
- # Python on glibc upgrade, remove it proactively to give |
527 |
- # a chance for users rebuilding python before glibc |
528 |
- ac_cv_header_stropts_h=no |
529 |
- |
530 |
- --enable-shared |
531 |
- $(use_enable ipv6) |
532 |
- --infodir='${prefix}/share/info' |
533 |
- --mandir='${prefix}/share/man' |
534 |
- --with-computed-gotos |
535 |
- --with-dbmliborder="${dbmliborder}" |
536 |
- --with-libc= |
537 |
- --enable-loadable-sqlite-extensions |
538 |
- --without-ensurepip |
539 |
- --with-system-expat |
540 |
- --with-system-ffi |
541 |
- ) |
542 |
- |
543 |
- OPT="" econf "${myeconfargs[@]}" |
544 |
-} |
545 |
- |
546 |
-src_compile() { |
547 |
- # Ensure sed works as expected |
548 |
- # https://bugs.gentoo.org/594768 |
549 |
- local -x LC_ALL=C |
550 |
- |
551 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
552 |
- |
553 |
- # Work around bug 329499. See also bug 413751 and 457194. |
554 |
- if has_version dev-libs/libffi[pax_kernel]; then |
555 |
- pax-mark E python |
556 |
- else |
557 |
- pax-mark m python |
558 |
- fi |
559 |
-} |
560 |
- |
561 |
-src_test() { |
562 |
- # Tests will not work when cross compiling. |
563 |
- if tc-is-cross-compiler; then |
564 |
- elog "Disabling tests due to crosscompiling." |
565 |
- return |
566 |
- fi |
567 |
- |
568 |
- # Skip failing tests. |
569 |
- local skipped_tests="gdb" |
570 |
- |
571 |
- for test in ${skipped_tests}; do |
572 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
573 |
- done |
574 |
- |
575 |
- # bug 660358 |
576 |
- local -x COLUMNS=80 |
577 |
- |
578 |
- local -x PYTHONDONTWRITEBYTECODE= |
579 |
- |
580 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
581 |
- local result=$? |
582 |
- |
583 |
- for test in ${skipped_tests}; do |
584 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
585 |
- done |
586 |
- |
587 |
- elog "The following tests have been skipped:" |
588 |
- for test in ${skipped_tests}; do |
589 |
- elog "test_${test}.py" |
590 |
- done |
591 |
- |
592 |
- elog "If you would like to run them, you may:" |
593 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
594 |
- elog "and run the tests separately." |
595 |
- |
596 |
- if [[ ${result} -ne 0 ]]; then |
597 |
- die "emake test failed" |
598 |
- fi |
599 |
-} |
600 |
- |
601 |
-src_install() { |
602 |
- local libdir=${ED}/usr/lib/python${PYVER} |
603 |
- |
604 |
- emake DESTDIR="${D}" altinstall |
605 |
- |
606 |
- # Remove static library |
607 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
608 |
- |
609 |
- sed \ |
610 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
611 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
612 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
613 |
- |
614 |
- # Fix collisions between different slots of Python. |
615 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
616 |
- |
617 |
- # Cheap hack to get version with ABIFLAGS |
618 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
619 |
- if [[ ${abiver} != python${PYVER} ]]; then |
620 |
- # Replace python3.X with a symlink to python3.Xm |
621 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
622 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
623 |
- # Create python3.X-config symlink |
624 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
625 |
- # Create python-3.5m.pc symlink |
626 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
627 |
- fi |
628 |
- |
629 |
- # python seems to get rebuilt in src_install (bug 569908) |
630 |
- # Work around it for now. |
631 |
- if has_version dev-libs/libffi[pax_kernel]; then |
632 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
633 |
- else |
634 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
635 |
- fi |
636 |
- |
637 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
638 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
639 |
- |
640 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
641 |
- |
642 |
- if use examples; then |
643 |
- docinto examples |
644 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
645 |
- dodoc -r Tools |
646 |
- fi |
647 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
648 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
649 |
- emake --no-print-directory -s -f - 2>/dev/null) |
650 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
651 |
- |
652 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
653 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
654 |
- sed \ |
655 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
656 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
657 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
658 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
659 |
- |
660 |
- local -x EPYTHON=python${PYVER} |
661 |
- # if not using a cross-compiler, use the fresh binary |
662 |
- if ! tc-is-cross-compiler; then |
663 |
- local -x PYTHON=./python |
664 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
665 |
- else |
666 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
667 |
- fi |
668 |
- |
669 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
670 |
- python_domodule epython.py |
671 |
- |
672 |
- # python-exec wrapping support |
673 |
- local pymajor=${PYVER%.*} |
674 |
- local scriptdir=${D}$(python_get_scriptdir) |
675 |
- mkdir -p "${scriptdir}" || die |
676 |
- # python and pythonX |
677 |
- ln -s "../../../bin/${abiver}" \ |
678 |
- "${scriptdir}/python${pymajor}" || die |
679 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
680 |
- # python-config and pythonX-config |
681 |
- # note: we need to create a wrapper rather than symlinking it due |
682 |
- # to some random dirname(argv[0]) magic performed by python-config |
683 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
684 |
- #!/bin/sh |
685 |
- exec "${abiver}-config" "\${@}" |
686 |
- EOF |
687 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
688 |
- ln -s "python${pymajor}-config" \ |
689 |
- "${scriptdir}/python-config" || die |
690 |
- # 2to3, pydoc |
691 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
692 |
- "${scriptdir}/2to3" || die |
693 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
694 |
- "${scriptdir}/pydoc" || die |
695 |
- # idle |
696 |
- if use tk; then |
697 |
- ln -s "../../../bin/idle${PYVER}" \ |
698 |
- "${scriptdir}/idle" || die |
699 |
- fi |
700 |
-} |
701 |
|
702 |
diff --git a/dev-lang/python/python-3.9.0_beta4.ebuild b/dev-lang/python/python-3.9.0_beta4.ebuild |
703 |
deleted file mode 100644 |
704 |
index d59da139774..00000000000 |
705 |
--- a/dev-lang/python/python-3.9.0_beta4.ebuild |
706 |
+++ /dev/null |
707 |
@@ -1,323 +0,0 @@ |
708 |
-# Copyright 1999-2020 Gentoo Authors |
709 |
-# Distributed under the terms of the GNU General Public License v2 |
710 |
- |
711 |
-EAPI="7" |
712 |
-WANT_LIBTOOL="none" |
713 |
- |
714 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
715 |
- toolchain-funcs |
716 |
- |
717 |
-MY_P="Python-${PV/_beta/b}" |
718 |
-PYVER=$(ver_cut 1-2) |
719 |
-PATCHSET="python-gentoo-patches-3.9.0b3-r1" |
720 |
- |
721 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
722 |
-HOMEPAGE="https://www.python.org/" |
723 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
724 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
725 |
-S="${WORKDIR}/${MY_P}" |
726 |
- |
727 |
-LICENSE="PSF-2" |
728 |
-SLOT="${PYVER}" |
729 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
730 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
731 |
-RESTRICT="!test? ( test )" |
732 |
- |
733 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
734 |
-# If you need to apply a patch which requires python for bootstrapping, please |
735 |
-# run the bootstrap code on your dev box and include the results in the |
736 |
-# patchset. See bug 447752. |
737 |
- |
738 |
-RDEPEND="app-arch/bzip2:= |
739 |
- app-arch/xz-utils:= |
740 |
- dev-libs/libffi:= |
741 |
- sys-apps/util-linux:= |
742 |
- >=sys-libs/zlib-1.1.3:= |
743 |
- virtual/libcrypt:= |
744 |
- virtual/libintl |
745 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
746 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
747 |
- readline? ( >=sys-libs/readline-4.1:= ) |
748 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
749 |
- ssl? ( |
750 |
- !libressl? ( dev-libs/openssl:= ) |
751 |
- libressl? ( dev-libs/libressl:= ) |
752 |
- ) |
753 |
- tk? ( |
754 |
- >=dev-lang/tcl-8.0:= |
755 |
- >=dev-lang/tk-8.0:= |
756 |
- dev-tcltk/blt:= |
757 |
- dev-tcltk/tix |
758 |
- ) |
759 |
- xml? ( >=dev-libs/expat-2.1:= )" |
760 |
-# bluetooth requires headers from bluez |
761 |
-DEPEND="${RDEPEND} |
762 |
- bluetooth? ( net-wireless/bluez ) |
763 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
764 |
- virtual/pkgconfig |
765 |
- !sys-devel/gcc[libffi(-)]" |
766 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
767 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
768 |
- |
769 |
-# large file tests involve a 2.5G file being copied (duplicated) |
770 |
-CHECKREQS_DISK_BUILD=5500M |
771 |
- |
772 |
-pkg_pretend() { |
773 |
- use test && check-reqs_pkg_pretend |
774 |
-} |
775 |
- |
776 |
-pkg_setup() { |
777 |
- use test && check-reqs_pkg_setup |
778 |
-} |
779 |
- |
780 |
-src_prepare() { |
781 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
782 |
- rm -fr Modules/expat || die |
783 |
- rm -fr Modules/_ctypes/libffi* || die |
784 |
- rm -fr Modules/zlib || die |
785 |
- |
786 |
- local PATCHES=( |
787 |
- "${WORKDIR}/${PATCHSET}" |
788 |
- ) |
789 |
- |
790 |
- default |
791 |
- |
792 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
793 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
794 |
- |
795 |
- eautoreconf |
796 |
-} |
797 |
- |
798 |
-src_configure() { |
799 |
- local disable |
800 |
- # disable automagic bluetooth headers detection |
801 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
802 |
- use gdbm || disable+=" gdbm" |
803 |
- use ncurses || disable+=" _curses _curses_panel" |
804 |
- use readline || disable+=" readline" |
805 |
- use sqlite || disable+=" _sqlite3" |
806 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
807 |
- use tk || disable+=" _tkinter" |
808 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
809 |
- export PYTHON_DISABLE_MODULES="${disable}" |
810 |
- |
811 |
- if ! use xml; then |
812 |
- ewarn "You have configured Python without XML support." |
813 |
- ewarn "This is NOT a recommended configuration as you" |
814 |
- ewarn "may face problems parsing any XML documents." |
815 |
- fi |
816 |
- |
817 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
818 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
819 |
- fi |
820 |
- |
821 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
822 |
- append-flags -fwrapv |
823 |
- fi |
824 |
- |
825 |
- filter-flags -malign-double |
826 |
- |
827 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
828 |
- if is-flagq -O3; then |
829 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
830 |
- use hardened && replace-flags -O3 -O2 |
831 |
- fi |
832 |
- |
833 |
- # https://bugs.gentoo.org/700012 |
834 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
835 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
836 |
- fi |
837 |
- |
838 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
839 |
- tc-export CXX |
840 |
- |
841 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
842 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
843 |
- # Please query BSD team before removing this! |
844 |
- append-ldflags "-L." |
845 |
- |
846 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
847 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
848 |
- |
849 |
- local dbmliborder |
850 |
- if use gdbm; then |
851 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
852 |
- fi |
853 |
- |
854 |
- local myeconfargs=( |
855 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
856 |
- # Python on glibc upgrade, remove it proactively to give |
857 |
- # a chance for users rebuilding python before glibc |
858 |
- ac_cv_header_stropts_h=no |
859 |
- |
860 |
- --enable-shared |
861 |
- $(use_enable ipv6) |
862 |
- --infodir='${prefix}/share/info' |
863 |
- --mandir='${prefix}/share/man' |
864 |
- --with-computed-gotos |
865 |
- --with-dbmliborder="${dbmliborder}" |
866 |
- --with-libc= |
867 |
- --enable-loadable-sqlite-extensions |
868 |
- --without-ensurepip |
869 |
- --with-system-expat |
870 |
- --with-system-ffi |
871 |
- ) |
872 |
- |
873 |
- OPT="" econf "${myeconfargs[@]}" |
874 |
-} |
875 |
- |
876 |
-src_compile() { |
877 |
- # Ensure sed works as expected |
878 |
- # https://bugs.gentoo.org/594768 |
879 |
- local -x LC_ALL=C |
880 |
- |
881 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
882 |
- |
883 |
- # Work around bug 329499. See also bug 413751 and 457194. |
884 |
- if has_version dev-libs/libffi[pax_kernel]; then |
885 |
- pax-mark E python |
886 |
- else |
887 |
- pax-mark m python |
888 |
- fi |
889 |
-} |
890 |
- |
891 |
-src_test() { |
892 |
- # Tests will not work when cross compiling. |
893 |
- if tc-is-cross-compiler; then |
894 |
- elog "Disabling tests due to crosscompiling." |
895 |
- return |
896 |
- fi |
897 |
- |
898 |
- # Skip failing tests. |
899 |
- local skipped_tests="gdb" |
900 |
- |
901 |
- for test in ${skipped_tests}; do |
902 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
903 |
- done |
904 |
- |
905 |
- # bug 660358 |
906 |
- local -x COLUMNS=80 |
907 |
- |
908 |
- local -x PYTHONDONTWRITEBYTECODE= |
909 |
- |
910 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
911 |
- local result=$? |
912 |
- |
913 |
- for test in ${skipped_tests}; do |
914 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
915 |
- done |
916 |
- |
917 |
- elog "The following tests have been skipped:" |
918 |
- for test in ${skipped_tests}; do |
919 |
- elog "test_${test}.py" |
920 |
- done |
921 |
- |
922 |
- elog "If you would like to run them, you may:" |
923 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
924 |
- elog "and run the tests separately." |
925 |
- |
926 |
- if [[ ${result} -ne 0 ]]; then |
927 |
- die "emake test failed" |
928 |
- fi |
929 |
-} |
930 |
- |
931 |
-src_install() { |
932 |
- local libdir=${ED}/usr/lib/python${PYVER} |
933 |
- |
934 |
- emake DESTDIR="${D}" altinstall |
935 |
- |
936 |
- # Remove static library |
937 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
938 |
- |
939 |
- sed \ |
940 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
941 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
942 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
943 |
- |
944 |
- # Fix collisions between different slots of Python. |
945 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
946 |
- |
947 |
- # Cheap hack to get version with ABIFLAGS |
948 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
949 |
- if [[ ${abiver} != python${PYVER} ]]; then |
950 |
- # Replace python3.X with a symlink to python3.Xm |
951 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
952 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
953 |
- # Create python3.X-config symlink |
954 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
955 |
- # Create python-3.5m.pc symlink |
956 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
957 |
- fi |
958 |
- |
959 |
- # python seems to get rebuilt in src_install (bug 569908) |
960 |
- # Work around it for now. |
961 |
- if has_version dev-libs/libffi[pax_kernel]; then |
962 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
963 |
- else |
964 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
965 |
- fi |
966 |
- |
967 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
968 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
969 |
- |
970 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
971 |
- |
972 |
- if use examples; then |
973 |
- docinto examples |
974 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
975 |
- dodoc -r Tools |
976 |
- fi |
977 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
978 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
979 |
- emake --no-print-directory -s -f - 2>/dev/null) |
980 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
981 |
- |
982 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
983 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
984 |
- sed \ |
985 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
986 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
987 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
988 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
989 |
- |
990 |
- local -x EPYTHON=python${PYVER} |
991 |
- # if not using a cross-compiler, use the fresh binary |
992 |
- if ! tc-is-cross-compiler; then |
993 |
- local -x PYTHON=./python |
994 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
995 |
- else |
996 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
997 |
- fi |
998 |
- |
999 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1000 |
- python_domodule epython.py |
1001 |
- |
1002 |
- # python-exec wrapping support |
1003 |
- local pymajor=${PYVER%.*} |
1004 |
- local scriptdir=${D}$(python_get_scriptdir) |
1005 |
- mkdir -p "${scriptdir}" || die |
1006 |
- # python and pythonX |
1007 |
- ln -s "../../../bin/${abiver}" \ |
1008 |
- "${scriptdir}/python${pymajor}" || die |
1009 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
1010 |
- # python-config and pythonX-config |
1011 |
- # note: we need to create a wrapper rather than symlinking it due |
1012 |
- # to some random dirname(argv[0]) magic performed by python-config |
1013 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
1014 |
- #!/bin/sh |
1015 |
- exec "${abiver}-config" "\${@}" |
1016 |
- EOF |
1017 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
1018 |
- ln -s "python${pymajor}-config" \ |
1019 |
- "${scriptdir}/python-config" || die |
1020 |
- # 2to3, pydoc |
1021 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1022 |
- "${scriptdir}/2to3" || die |
1023 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1024 |
- "${scriptdir}/pydoc" || die |
1025 |
- # idle |
1026 |
- if use tk; then |
1027 |
- ln -s "../../../bin/idle${PYVER}" \ |
1028 |
- "${scriptdir}/idle" || die |
1029 |
- fi |
1030 |
-} |
1031 |
|
1032 |
diff --git a/dev-lang/python/python-3.9.0_beta5.ebuild b/dev-lang/python/python-3.9.0_beta5.ebuild |
1033 |
deleted file mode 100644 |
1034 |
index aaf7ebbbf1e..00000000000 |
1035 |
--- a/dev-lang/python/python-3.9.0_beta5.ebuild |
1036 |
+++ /dev/null |
1037 |
@@ -1,323 +0,0 @@ |
1038 |
-# Copyright 1999-2020 Gentoo Authors |
1039 |
-# Distributed under the terms of the GNU General Public License v2 |
1040 |
- |
1041 |
-EAPI="7" |
1042 |
-WANT_LIBTOOL="none" |
1043 |
- |
1044 |
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \ |
1045 |
- toolchain-funcs |
1046 |
- |
1047 |
-MY_P="Python-${PV/_beta/b}" |
1048 |
-PYVER=$(ver_cut 1-2) |
1049 |
-PATCHSET="python-gentoo-patches-${PV/_beta/b}" |
1050 |
- |
1051 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
1052 |
-HOMEPAGE="https://www.python.org/" |
1053 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz |
1054 |
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" |
1055 |
-S="${WORKDIR}/${MY_P}" |
1056 |
- |
1057 |
-LICENSE="PSF-2" |
1058 |
-SLOT="${PYVER}" |
1059 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
1060 |
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" |
1061 |
-RESTRICT="!test? ( test )" |
1062 |
- |
1063 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
1064 |
-# If you need to apply a patch which requires python for bootstrapping, please |
1065 |
-# run the bootstrap code on your dev box and include the results in the |
1066 |
-# patchset. See bug 447752. |
1067 |
- |
1068 |
-RDEPEND="app-arch/bzip2:= |
1069 |
- app-arch/xz-utils:= |
1070 |
- dev-libs/libffi:= |
1071 |
- sys-apps/util-linux:= |
1072 |
- >=sys-libs/zlib-1.1.3:= |
1073 |
- virtual/libcrypt:= |
1074 |
- virtual/libintl |
1075 |
- gdbm? ( sys-libs/gdbm:=[berkdb] ) |
1076 |
- ncurses? ( >=sys-libs/ncurses-5.2:= ) |
1077 |
- readline? ( >=sys-libs/readline-4.1:= ) |
1078 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
1079 |
- ssl? ( |
1080 |
- !libressl? ( dev-libs/openssl:= ) |
1081 |
- libressl? ( dev-libs/libressl:= ) |
1082 |
- ) |
1083 |
- tk? ( |
1084 |
- >=dev-lang/tcl-8.0:= |
1085 |
- >=dev-lang/tk-8.0:= |
1086 |
- dev-tcltk/blt:= |
1087 |
- dev-tcltk/tix |
1088 |
- ) |
1089 |
- xml? ( >=dev-libs/expat-2.1:= )" |
1090 |
-# bluetooth requires headers from bluez |
1091 |
-DEPEND="${RDEPEND} |
1092 |
- bluetooth? ( net-wireless/bluez ) |
1093 |
- test? ( app-arch/xz-utils[extra-filters(+)] ) |
1094 |
- virtual/pkgconfig |
1095 |
- !sys-devel/gcc[libffi(-)]" |
1096 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
1097 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
1098 |
- |
1099 |
-# large file tests involve a 2.5G file being copied (duplicated) |
1100 |
-CHECKREQS_DISK_BUILD=5500M |
1101 |
- |
1102 |
-pkg_pretend() { |
1103 |
- use test && check-reqs_pkg_pretend |
1104 |
-} |
1105 |
- |
1106 |
-pkg_setup() { |
1107 |
- use test && check-reqs_pkg_setup |
1108 |
-} |
1109 |
- |
1110 |
-src_prepare() { |
1111 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
1112 |
- rm -fr Modules/expat || die |
1113 |
- rm -fr Modules/_ctypes/libffi* || die |
1114 |
- rm -fr Modules/zlib || die |
1115 |
- |
1116 |
- local PATCHES=( |
1117 |
- "${WORKDIR}/${PATCHSET}" |
1118 |
- ) |
1119 |
- |
1120 |
- default |
1121 |
- |
1122 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
1123 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
1124 |
- |
1125 |
- eautoreconf |
1126 |
-} |
1127 |
- |
1128 |
-src_configure() { |
1129 |
- local disable |
1130 |
- # disable automagic bluetooth headers detection |
1131 |
- use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no |
1132 |
- use gdbm || disable+=" gdbm" |
1133 |
- use ncurses || disable+=" _curses _curses_panel" |
1134 |
- use readline || disable+=" readline" |
1135 |
- use sqlite || disable+=" _sqlite3" |
1136 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
1137 |
- use tk || disable+=" _tkinter" |
1138 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
1139 |
- export PYTHON_DISABLE_MODULES="${disable}" |
1140 |
- |
1141 |
- if ! use xml; then |
1142 |
- ewarn "You have configured Python without XML support." |
1143 |
- ewarn "This is NOT a recommended configuration as you" |
1144 |
- ewarn "may face problems parsing any XML documents." |
1145 |
- fi |
1146 |
- |
1147 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
1148 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
1149 |
- fi |
1150 |
- |
1151 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
1152 |
- append-flags -fwrapv |
1153 |
- fi |
1154 |
- |
1155 |
- filter-flags -malign-double |
1156 |
- |
1157 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
1158 |
- if is-flagq -O3; then |
1159 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
1160 |
- use hardened && replace-flags -O3 -O2 |
1161 |
- fi |
1162 |
- |
1163 |
- # https://bugs.gentoo.org/700012 |
1164 |
- if is-flagq -flto || is-flagq '-flto=*'; then |
1165 |
- append-cflags $(test-flags-CC -ffat-lto-objects) |
1166 |
- fi |
1167 |
- |
1168 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
1169 |
- tc-export CXX |
1170 |
- |
1171 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
1172 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
1173 |
- # Please query BSD team before removing this! |
1174 |
- append-ldflags "-L." |
1175 |
- |
1176 |
- # Fix implicit declarations on cross and prefix builds. Bug #674070. |
1177 |
- use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw |
1178 |
- |
1179 |
- local dbmliborder |
1180 |
- if use gdbm; then |
1181 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
1182 |
- fi |
1183 |
- |
1184 |
- local myeconfargs=( |
1185 |
- # glibc-2.30 removes it; since we can't cleanly force-rebuild |
1186 |
- # Python on glibc upgrade, remove it proactively to give |
1187 |
- # a chance for users rebuilding python before glibc |
1188 |
- ac_cv_header_stropts_h=no |
1189 |
- |
1190 |
- --enable-shared |
1191 |
- $(use_enable ipv6) |
1192 |
- --infodir='${prefix}/share/info' |
1193 |
- --mandir='${prefix}/share/man' |
1194 |
- --with-computed-gotos |
1195 |
- --with-dbmliborder="${dbmliborder}" |
1196 |
- --with-libc= |
1197 |
- --enable-loadable-sqlite-extensions |
1198 |
- --without-ensurepip |
1199 |
- --with-system-expat |
1200 |
- --with-system-ffi |
1201 |
- ) |
1202 |
- |
1203 |
- OPT="" econf "${myeconfargs[@]}" |
1204 |
-} |
1205 |
- |
1206 |
-src_compile() { |
1207 |
- # Ensure sed works as expected |
1208 |
- # https://bugs.gentoo.org/594768 |
1209 |
- local -x LC_ALL=C |
1210 |
- |
1211 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
1212 |
- |
1213 |
- # Work around bug 329499. See also bug 413751 and 457194. |
1214 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1215 |
- pax-mark E python |
1216 |
- else |
1217 |
- pax-mark m python |
1218 |
- fi |
1219 |
-} |
1220 |
- |
1221 |
-src_test() { |
1222 |
- # Tests will not work when cross compiling. |
1223 |
- if tc-is-cross-compiler; then |
1224 |
- elog "Disabling tests due to crosscompiling." |
1225 |
- return |
1226 |
- fi |
1227 |
- |
1228 |
- # Skip failing tests. |
1229 |
- local skipped_tests="gdb" |
1230 |
- |
1231 |
- for test in ${skipped_tests}; do |
1232 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
1233 |
- done |
1234 |
- |
1235 |
- # bug 660358 |
1236 |
- local -x COLUMNS=80 |
1237 |
- |
1238 |
- local -x PYTHONDONTWRITEBYTECODE= |
1239 |
- |
1240 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
1241 |
- local result=$? |
1242 |
- |
1243 |
- for test in ${skipped_tests}; do |
1244 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
1245 |
- done |
1246 |
- |
1247 |
- elog "The following tests have been skipped:" |
1248 |
- for test in ${skipped_tests}; do |
1249 |
- elog "test_${test}.py" |
1250 |
- done |
1251 |
- |
1252 |
- elog "If you would like to run them, you may:" |
1253 |
- elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" |
1254 |
- elog "and run the tests separately." |
1255 |
- |
1256 |
- if [[ ${result} -ne 0 ]]; then |
1257 |
- die "emake test failed" |
1258 |
- fi |
1259 |
-} |
1260 |
- |
1261 |
-src_install() { |
1262 |
- local libdir=${ED}/usr/lib/python${PYVER} |
1263 |
- |
1264 |
- emake DESTDIR="${D}" altinstall |
1265 |
- |
1266 |
- # Remove static library |
1267 |
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die |
1268 |
- |
1269 |
- sed \ |
1270 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1271 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1272 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1273 |
- |
1274 |
- # Fix collisions between different slots of Python. |
1275 |
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die |
1276 |
- |
1277 |
- # Cheap hack to get version with ABIFLAGS |
1278 |
- local abiver=$(cd "${ED}/usr/include"; echo python*) |
1279 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1280 |
- # Replace python3.X with a symlink to python3.Xm |
1281 |
- rm "${ED}/usr/bin/python${PYVER}" || die |
1282 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1283 |
- # Create python3.X-config symlink |
1284 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1285 |
- # Create python-3.5m.pc symlink |
1286 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1287 |
- fi |
1288 |
- |
1289 |
- # python seems to get rebuilt in src_install (bug 569908) |
1290 |
- # Work around it for now. |
1291 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1292 |
- pax-mark E "${ED}/usr/bin/${abiver}" |
1293 |
- else |
1294 |
- pax-mark m "${ED}/usr/bin/${abiver}" |
1295 |
- fi |
1296 |
- |
1297 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1298 |
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1299 |
- |
1300 |
- dodoc Misc/{ACKS,HISTORY,NEWS} |
1301 |
- |
1302 |
- if use examples; then |
1303 |
- docinto examples |
1304 |
- find Tools -name __pycache__ -exec rm -fr {} + || die |
1305 |
- dodoc -r Tools |
1306 |
- fi |
1307 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1308 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1309 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1310 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1311 |
- |
1312 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1313 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1314 |
- sed \ |
1315 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1316 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1317 |
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ |
1318 |
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1319 |
- |
1320 |
- local -x EPYTHON=python${PYVER} |
1321 |
- # if not using a cross-compiler, use the fresh binary |
1322 |
- if ! tc-is-cross-compiler; then |
1323 |
- local -x PYTHON=./python |
1324 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} |
1325 |
- else |
1326 |
- local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} |
1327 |
- fi |
1328 |
- |
1329 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1330 |
- python_domodule epython.py |
1331 |
- |
1332 |
- # python-exec wrapping support |
1333 |
- local pymajor=${PYVER%.*} |
1334 |
- local scriptdir=${D}$(python_get_scriptdir) |
1335 |
- mkdir -p "${scriptdir}" || die |
1336 |
- # python and pythonX |
1337 |
- ln -s "../../../bin/${abiver}" \ |
1338 |
- "${scriptdir}/python${pymajor}" || die |
1339 |
- ln -s "python${pymajor}" "${scriptdir}/python" || die |
1340 |
- # python-config and pythonX-config |
1341 |
- # note: we need to create a wrapper rather than symlinking it due |
1342 |
- # to some random dirname(argv[0]) magic performed by python-config |
1343 |
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die |
1344 |
- #!/bin/sh |
1345 |
- exec "${abiver}-config" "\${@}" |
1346 |
- EOF |
1347 |
- chmod +x "${scriptdir}/python${pymajor}-config" || die |
1348 |
- ln -s "python${pymajor}-config" \ |
1349 |
- "${scriptdir}/python-config" || die |
1350 |
- # 2to3, pydoc |
1351 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1352 |
- "${scriptdir}/2to3" || die |
1353 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1354 |
- "${scriptdir}/pydoc" || die |
1355 |
- # idle |
1356 |
- if use tk; then |
1357 |
- ln -s "../../../bin/idle${PYVER}" \ |
1358 |
- "${scriptdir}/idle" || die |
1359 |
- fi |
1360 |
-} |