Gentoo Archives: gentoo-commits

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