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: Sat, 04 Dec 2021 19:05:56
Message-Id: 1638644727.43dcfb628dd5a1c37e764ee96e31ba61ebed3644.mgorny@gentoo
1 commit: 43dcfb628dd5a1c37e764ee96e31ba61ebed3644
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 4 19:05:27 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 4 19:05:27 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43dcfb62
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 | 3 -
13 dev-lang/python/python-3.9.8.ebuild | 349 ------------------------------------
14 2 files changed, 352 deletions(-)
15
16 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
17 index 0a3258758432..7670a47c22e9 100644
18 --- a/dev-lang/python/Manifest
19 +++ b/dev-lang/python/Manifest
20 @@ -10,8 +10,6 @@ DIST Python-3.7.12.tar.xz 17401916 BLAKE2B f01b5cc54cd0ffe2e8756767c624dda8d2fbf
21 DIST Python-3.7.12.tar.xz.asc 833 BLAKE2B 587fcf019f4b07b811834d7279b9861eb709731a431be9cbe8f5b868ac72b6d9a4de8b24e3fefd6b339813299514a0ac12b5f627acd04c185ff8dea22a044723 SHA512 a47003dd5c784eca4e3c34dc8705d1171043e060f3a97e4dd63ce4aec2bceac56d7e808924d63b2a38f9a020bf799cf29e5055fb444b9b2c3f03976d47122355
22 DIST Python-3.8.12.tar.xz 18443568 BLAKE2B 73413aee7a31347ac4342718a54d23d4036220262c4cd41cd50b06c3b1698d52d11cf7ac2c781b919f2cdb0dcb6397d623c463dcdcd1edca99abbbce239a3c6e SHA512 2f93fe5ff83f470c7b6a1b7f29f499a2a010fabd649e9fe65ad3fbfa21b6e1966e77c9b7ac012d978159bc3fe63fec2d64bc6982fc2ee1714d3fa0e47631f279
23 DIST Python-3.8.12.tar.xz.asc 833 BLAKE2B 33f59aa667555832ee510d2a7295079f34a3983dfa84beab20b33ec691ea3eecfcc4a62591fe233fc30622d0236ee69a3d41b8922ee2f4c632df3523d565c3ec SHA512 ef552b716a721f410abb14387594c8b0ddc65ce4b8a6ae6bf920c1db2ea9ddf6bbf547e93d3716495ae31848eb1049aae4257016e888393681bbfb6f6529bc12
24 -DIST Python-3.9.8.tar.xz 19149464 BLAKE2B 739eb22bae8b44cf5be9a24ca6ecacb80eaca65684abf1fef18b7adcac9adede2eff60e8a9ac5db2672511d180d6079c39e2ff2901ab454c0876ae8e1bfe96cc SHA512 5d5b46a242525b2e6a7f9c69c63c6d7cd985e1443a7d9b716107e75f14fef7b5c9c2e5e8a90adbbbf5f7a8b90a483d01e18c1732470e6e54b611b5aba9f99fe1
25 -DIST Python-3.9.8.tar.xz.asc 833 BLAKE2B ec94293d0d28398b425a0a6cd502f6540b23f6788874160216d0575fe23a4ad8e5636c5d4deae7bc193d00bd18aff12f935a6ea807786a87f041046d6693fd20 SHA512 1329a8e114feb010bb3618472cddd9fdea59fc38e9583002eb457e1c0cf1716bd7c0d51887e91b9eef09c3977879aa4be9909e5997be7dfdcca08ca04794bfaf
26 DIST Python-3.9.9.tar.xz 19144372 BLAKE2B 3a144ca5e4b11b2fd09d05a4a40ddf3f622c077338602c519b21ea827c96e0f14ab97563c0a9d306ae4a5c3f44753573a07474dc084fb364d24b2128bb378ddd SHA512 0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6
27 DIST Python-3.9.9.tar.xz.asc 833 BLAKE2B 41d05ee1ec256f0cab4e9d3540877783745f0f30e3f1177d01096b352341a90893c5c9523926bed8176bd304cbb1fd6619be3b4e375103874eac5e5ebc113135 SHA512 84fb739c60216ab9a7a487a0ec4039a7e85c7684ef1f71d8b3bc415ff2ae284f79474103ae05385502bc2510401f8cfb33d84dccf5d0ea9a0dd62528519d935f
28 DIST python-gentoo-patches-2.7.18_p13.tar.xz 33296 BLAKE2B 91b711458aff4f6337ee1b34aff58d7edda6725644a64c9320076a1e04c816729ed163d82333cfe4dfef379a9ad5ef50ba00abdbbfed4503b0f92c8f0b7ca683 SHA512 97f3657a4a95e8492aa710801b974a56e6dd4636e475aea45cbbe76e7ae32d00f07b05769887f05e49cb0df8584ac9499a7ce842bad77f837a7c869f9b769b07
29 @@ -20,5 +18,4 @@ DIST python-gentoo-patches-3.11.0a2.tar.xz 8472 BLAKE2B 440e31d70895a537bb89099c
30 DIST python-gentoo-patches-3.6.15.tar.xz 15300 BLAKE2B f49fd96f6ad1a1c94fea6b83acd229a81754b86061e243044ead4b9a9d5122a2e43b270b68722c359c084c05a566a3ad70aa46588ab7a005ee560ee118b92b8b SHA512 cc33491a33f3f1d990cf494d53b91b74db761142e8aebe1bd4b128ef10a268ff945e5ba08daad39cee095612a8e52265d6988873ecf9c073377cbbc10735aa39
31 DIST python-gentoo-patches-3.7.12_p1.tar.xz 19112 BLAKE2B e9964244af3db544dd6e96d85ca4bc24d7131b48eda85df5bafa3fb36474a024cecbbf4b27324e1f35f76ae6a1aed31dd7896e831b79b574b45a4371afcc7e5b SHA512 9ec996c2904f99bd6651ed1b700eabd91f2b82b1e9e0f3d9572243886a9c7139bf8ac2af04169485d3ca6339e1a87044cba203f6f0aee9609d2a1d53c812548d
32 DIST python-gentoo-patches-3.8.12_p1.tar.xz 16632 BLAKE2B cce7a41d020af1ffc55a01ef67b20bcb16c68adbccc1e44ef166d1707e817ed6c3bae70f84c56553f27bca449015e273014c0be73bc2f9b4e25844ddce385486 SHA512 4621727c2e9cc1c5519e021210e16a97e7167ea831445dfdd07f5b0ed642b5919834244111708a971ce098b10b439797e1c76827eccab803f801052c671f1ae6
33 -DIST python-gentoo-patches-3.9.8.tar.xz 13192 BLAKE2B 995bead7e87b1d2eb9984012065c0f752d51e5a78dd9019270e071f83660cdab71c39e5be0104919f5af9089dede71d9c918a521f76e67c6ef1aeab5ffb58991 SHA512 80dfa3766bb5546924a5fccf4f469ce409cb8a4b0873c3d2fb737b3eb27b7c2b29337e0179624bbe077273b8e475f7921d6479ca7eb8e31ba423d0cea2f3d1cf
34 DIST python-gentoo-patches-3.9.9.tar.xz 13200 BLAKE2B 672e3b79094cbc791988639a5dde4c9e5622e91bef4310d26838716c65763ca69a12c6afef2f19487f4389974af009896e452c19783b0a491072d13f893af7e9 SHA512 3cd4ddd070ab48d9978e1136d237fc24030fd3ce6704371ce99815702a45d839ee26c7e9552b004661827759edd30222434e4166f9ee16f873ad4783c83f723f
35
36 diff --git a/dev-lang/python/python-3.9.8.ebuild b/dev-lang/python/python-3.9.8.ebuild
37 deleted file mode 100644
38 index 5d601882aaa0..000000000000
39 --- a/dev-lang/python/python-3.9.8.ebuild
40 +++ /dev/null
41 @@ -1,349 +0,0 @@
42 -# Copyright 1999-2021 Gentoo Authors
43 -# Distributed under the terms of the GNU General Public License v2
44 -
45 -EAPI="7"
46 -WANT_LIBTOOL="none"
47 -
48 -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
49 - python-utils-r1 toolchain-funcs verify-sig
50 -
51 -MY_PV=${PV/_rc/rc}
52 -MY_P="Python-${MY_PV%_p*}"
53 -PYVER=$(ver_cut 1-2)
54 -PATCHSET="python-gentoo-patches-${MY_PV}"
55 -
56 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
57 -HOMEPAGE="https://www.python.org/"
58 -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
59 - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
60 - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PATCHSET}.tar.xz
61 - verify-sig? (
62 - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
63 - )"
64 -S="${WORKDIR}/${MY_P}"
65 -
66 -LICENSE="PSF-2"
67 -SLOT="${PYVER}"
68 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
69 -IUSE="bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl test tk wininst +xml"
70 -RESTRICT="!test? ( test )"
71 -
72 -# Do not add a dependency on dev-lang/python to this ebuild.
73 -# If you need to apply a patch which requires python for bootstrapping, please
74 -# run the bootstrap code on your dev box and include the results in the
75 -# patchset. See bug 447752.
76 -
77 -RDEPEND="app-arch/bzip2:=
78 - app-arch/xz-utils:=
79 - dev-libs/libffi:=
80 - sys-apps/util-linux:=
81 - >=sys-libs/zlib-1.1.3:=
82 - virtual/libcrypt:=
83 - virtual/libintl
84 - gdbm? ( sys-libs/gdbm:=[berkdb] )
85 - ncurses? ( >=sys-libs/ncurses-5.2:= )
86 - readline? ( >=sys-libs/readline-4.1:= )
87 - sqlite? ( >=dev-db/sqlite-3.3.8:3= )
88 - ssl? ( >=dev-libs/openssl-1.1.1:= )
89 - tk? (
90 - >=dev-lang/tcl-8.0:=
91 - >=dev-lang/tk-8.0:=
92 - dev-tcltk/blt:=
93 - dev-tcltk/tix
94 - )
95 - xml? ( >=dev-libs/expat-2.1:= )"
96 -# bluetooth requires headers from bluez
97 -DEPEND="${RDEPEND}
98 - bluetooth? ( net-wireless/bluez )
99 - test? ( app-arch/xz-utils[extra-filters(+)] )"
100 -BDEPEND="
101 - virtual/awk
102 - virtual/pkgconfig
103 - sys-devel/autoconf-archive
104 - verify-sig? ( app-crypt/openpgp-keys-python )
105 - !sys-devel/gcc[libffi(-)]"
106 -RDEPEND+=" !build? ( app-misc/mime-types )"
107 -
108 -VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
109 -
110 -# large file tests involve a 2.5G file being copied (duplicated)
111 -CHECKREQS_DISK_BUILD=5500M
112 -
113 -pkg_pretend() {
114 - use test && check-reqs_pkg_pretend
115 -}
116 -
117 -pkg_setup() {
118 - use test && check-reqs_pkg_setup
119 -}
120 -
121 -src_unpack() {
122 - if use verify-sig; then
123 - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
124 - fi
125 - default
126 -}
127 -
128 -src_prepare() {
129 - # Ensure that internal copies of expat, libffi and zlib are not used.
130 - rm -fr Modules/expat || die
131 - rm -fr Modules/_ctypes/libffi* || die
132 - rm -fr Modules/zlib || die
133 -
134 - local PATCHES=(
135 - "${WORKDIR}/${PATCHSET}"
136 - )
137 -
138 - default
139 -
140 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
141 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
142 -
143 - # force correct number of jobs
144 - # https://bugs.gentoo.org/737660
145 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
146 - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
147 - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
148 -
149 - eautoreconf
150 -}
151 -
152 -src_configure() {
153 - local disable
154 - # disable automagic bluetooth headers detection
155 - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
156 - use gdbm || disable+=" gdbm"
157 - use ncurses || disable+=" _curses _curses_panel"
158 - use readline || disable+=" readline"
159 - use sqlite || disable+=" _sqlite3"
160 - use ssl || export PYTHON_DISABLE_SSL="1"
161 - use tk || disable+=" _tkinter"
162 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
163 - export PYTHON_DISABLE_MODULES="${disable}"
164 -
165 - if ! use xml; then
166 - ewarn "You have configured Python without XML support."
167 - ewarn "This is NOT a recommended configuration as you"
168 - ewarn "may face problems parsing any XML documents."
169 - fi
170 -
171 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
172 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
173 - fi
174 -
175 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
176 - append-flags -fwrapv
177 - fi
178 -
179 - filter-flags -malign-double
180 -
181 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
182 - if is-flagq -O3; then
183 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
184 - use hardened && replace-flags -O3 -O2
185 - fi
186 -
187 - # https://bugs.gentoo.org/700012
188 - if is-flagq -flto || is-flagq '-flto=*'; then
189 - append-cflags $(test-flags-CC -ffat-lto-objects)
190 - fi
191 -
192 - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
193 - tc-export CXX
194 -
195 - # Fix implicit declarations on cross and prefix builds. Bug #674070.
196 - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
197 -
198 - local dbmliborder
199 - if use gdbm; then
200 - dbmliborder+="${dbmliborder:+:}gdbm"
201 - fi
202 -
203 - local myeconfargs=(
204 - # glibc-2.30 removes it; since we can't cleanly force-rebuild
205 - # Python on glibc upgrade, remove it proactively to give
206 - # a chance for users rebuilding python before glibc
207 - ac_cv_header_stropts_h=no
208 -
209 - --enable-shared
210 - --enable-ipv6
211 - --infodir='${prefix}/share/info'
212 - --mandir='${prefix}/share/man'
213 - --with-computed-gotos
214 - --with-dbmliborder="${dbmliborder}"
215 - --with-libc=
216 - --enable-loadable-sqlite-extensions
217 - --without-ensurepip
218 - --with-system-expat
219 - --with-system-ffi
220 - )
221 -
222 - OPT="" econf "${myeconfargs[@]}"
223 -
224 - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
225 - eerror "configure has detected that the sem_open function is broken."
226 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
227 - die "Broken sem_open function (bug 496328)"
228 - fi
229 -}
230 -
231 -src_compile() {
232 - # Ensure sed works as expected
233 - # https://bugs.gentoo.org/594768
234 - local -x LC_ALL=C
235 - # Prevent using distutils bundled by setuptools.
236 - # https://bugs.gentoo.org/823728
237 - export SETUPTOOLS_USE_DISTUTILS=stdlib
238 -
239 - emake CPPFLAGS= CFLAGS= LDFLAGS=
240 -
241 - # Work around bug 329499. See also bug 413751 and 457194.
242 - if has_version dev-libs/libffi[pax-kernel]; then
243 - pax-mark E python
244 - else
245 - pax-mark m python
246 - fi
247 -}
248 -
249 -src_test() {
250 - # Tests will not work when cross compiling.
251 - if tc-is-cross-compiler; then
252 - elog "Disabling tests due to crosscompiling."
253 - return
254 - fi
255 -
256 - # Skip failing tests.
257 - local skipped_tests="gdb"
258 -
259 - for test in ${skipped_tests}; do
260 - mv "${S}"/Lib/test/test_${test}.py "${T}"
261 - done
262 -
263 - # bug 660358
264 - local -x COLUMNS=80
265 - local -x PYTHONDONTWRITEBYTECODE=
266 -
267 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
268 -
269 - emake test EXTRATESTOPTS="-u-network -j${jobs}" \
270 - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
271 - local result=$?
272 -
273 - for test in ${skipped_tests}; do
274 - mv "${T}/test_${test}.py" "${S}"/Lib/test
275 - done
276 -
277 - elog "The following tests have been skipped:"
278 - for test in ${skipped_tests}; do
279 - elog "test_${test}.py"
280 - done
281 -
282 - elog "If you would like to run them, you may:"
283 - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
284 - elog "and run the tests separately."
285 -
286 - if [[ ${result} -ne 0 ]]; then
287 - die "emake test failed"
288 - fi
289 -}
290 -
291 -src_install() {
292 - local libdir=${ED}/usr/lib/python${PYVER}
293 -
294 - emake DESTDIR="${D}" altinstall
295 -
296 - # Remove static library
297 - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
298 -
299 - sed \
300 - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
301 - -e "s/\(PY_LDFLAGS=\).*/\1/" \
302 - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
303 -
304 - # Fix collisions between different slots of Python.
305 - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
306 -
307 - # Cheap hack to get version with ABIFLAGS
308 - local abiver=$(cd "${ED}/usr/include"; echo python*)
309 - if [[ ${abiver} != python${PYVER} ]]; then
310 - # Replace python3.X with a symlink to python3.Xm
311 - rm "${ED}/usr/bin/python${PYVER}" || die
312 - dosym "${abiver}" "/usr/bin/python${PYVER}"
313 - # Create python3.X-config symlink
314 - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
315 - # Create python-3.5m.pc symlink
316 - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
317 - fi
318 -
319 - # python seems to get rebuilt in src_install (bug 569908)
320 - # Work around it for now.
321 - if has_version dev-libs/libffi[pax-kernel]; then
322 - pax-mark E "${ED}/usr/bin/${abiver}"
323 - else
324 - pax-mark m "${ED}/usr/bin/${abiver}"
325 - fi
326 -
327 - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
328 - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
329 -
330 - dodoc Misc/{ACKS,HISTORY,NEWS}
331 -
332 - if use examples; then
333 - docinto examples
334 - find Tools -name __pycache__ -exec rm -fr {} + || die
335 - dodoc -r Tools
336 - fi
337 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
338 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
339 - emake --no-print-directory -s -f - 2>/dev/null)
340 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
341 -
342 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
343 - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
344 - sed \
345 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
346 - -e "s:@PYDOC@:pydoc${PYVER}:" \
347 - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
348 - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
349 -
350 - local -x EPYTHON=python${PYVER}
351 - # if not using a cross-compiler, use the fresh binary
352 - if ! tc-is-cross-compiler; then
353 - local -x PYTHON=./python
354 - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
355 - else
356 - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
357 - fi
358 -
359 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
360 - python_domodule epython.py
361 -
362 - # python-exec wrapping support
363 - local pymajor=${PYVER%.*}
364 - local scriptdir=${D}$(python_get_scriptdir)
365 - mkdir -p "${scriptdir}" || die
366 - # python and pythonX
367 - ln -s "../../../bin/${abiver}" \
368 - "${scriptdir}/python${pymajor}" || die
369 - ln -s "python${pymajor}" "${scriptdir}/python" || die
370 - # python-config and pythonX-config
371 - # note: we need to create a wrapper rather than symlinking it due
372 - # to some random dirname(argv[0]) magic performed by python-config
373 - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
374 - #!/bin/sh
375 - exec "${abiver}-config" "\${@}"
376 - EOF
377 - chmod +x "${scriptdir}/python${pymajor}-config" || die
378 - ln -s "python${pymajor}-config" \
379 - "${scriptdir}/python-config" || die
380 - # 2to3, pydoc
381 - ln -s "../../../bin/2to3-${PYVER}" \
382 - "${scriptdir}/2to3" || die
383 - ln -s "../../../bin/pydoc${PYVER}" \
384 - "${scriptdir}/pydoc" || die
385 - # idle
386 - if use tk; then
387 - ln -s "../../../bin/idle${PYVER}" \
388 - "${scriptdir}/idle" || die
389 - fi
390 -}