Gentoo Archives: gentoo-commits

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