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: Sun, 29 Dec 2019 10:15:13
Message-Id: 1577614391.e6b02656fe04592ffc952b503673e908c1e6dbb7.mgorny@gentoo
1 commit: e6b02656fe04592ffc952b503673e908c1e6dbb7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 29 10:12:43 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 29 10:13:11 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6b02656
7
8 dev-lang/python: Revert "Bump 2.7.17 to EAPI 7, unify"
9
10 Accidentally mixed two commits.
11
12 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
13
14 dev-lang/python/Manifest | 1 -
15 dev-lang/python/python-2.7.17-r1.ebuild | 368 --------------------------------
16 dev-lang/python/python-3.6.10.ebuild | 6 +-
17 3 files changed, 3 insertions(+), 372 deletions(-)
18
19 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
20 index c974616a85a..7165b0d55c1 100644
21 --- a/dev-lang/python/Manifest
22 +++ b/dev-lang/python/Manifest
23 @@ -10,7 +10,6 @@ DIST Python-3.8.1.tar.xz 17828408 BLAKE2B db1841625de89b812cadcd538a990401a4e49d
24 DIST python-gentoo-patches-2.7.16.tar.xz 13904 BLAKE2B 218b46f8656f4a792dcd47eabca6d59a1558276b77676544991ee75914cd76dda84c36f43e72e477b850dd4cb52374d289f20dccd244a3b52ae5debaf3363432 SHA512 83f90545231c663a34c6925352a357a2b15997ac0362578a1893304c5070b5251922585ae8bc1bafb68d306bcddd4cdba4b6406648d473bd3e980eef65fe3ecd
25 DIST python-gentoo-patches-2.7.17.tar.xz 13476 BLAKE2B 788688e2941d2d6d4f768168881b2c3639213a97e214557b3a93f8db44d81e2b6d70be847b7462e54e3786660ebee4ee331402081d92167d74ad149279c3f389 SHA512 1641737635d33607a77ed2ee2462854cec603be39737de3f81abb188702aaf46f039d1616f9dcd413da1f4a8040175c66a2883e496132c2e4ebe8f860b36f9f1
26 DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec
27 -DIST python-gentoo-patches-3.6.10.tar.xz 10964 BLAKE2B e32c8cb3050c7324ee234f585be7fc40cfacc6ad87759eaa300e57289e6dc6cbaed3913f33ad632b8754638e8d71983d8364ceeaad8ef325cfa6d4d2dfb56df0 SHA512 71fea7306c876c63888c4547eaf14dc2e0413dec343609d748cd1b5888e4605d47888758ebc5120a287ce833b69dd538073f91989460da7c40462b53eefca7ce
28 DIST python-gentoo-patches-3.6.8.tar.xz 11224 BLAKE2B 5fe38282bcf28df18e0bd37756c880ae191ea738dc92f1cf83f682cfdc52525b9c44287dc99191a73d75c90672ab501b56adf49515b35ff1fdee88c8dc07b175 SHA512 89e700663db25d6d78eee1d4bfdab686c5341a794062f3a63df3485ac0b58deb4b4885d24701f3ae138d06ca783be92e310e1100c6d633910c33732f3cb0d7df
29 DIST python-gentoo-patches-3.7.4-1.tar.xz 10100 BLAKE2B 63e8fada89b64b59ba083745626a1e8a07bec0cf93b7b6ab405c33a0f2932cbe497a331c52895a07f10434b230c438f27c9582efecdd57f3bad15d9aa604d157 SHA512 11b0e811a9890a1235c85426061b35f9964eba64cac0536f4c9e0498b1cc66eb005f14aed34eead735b43e91c2b5babced60e3310f5329231a1706871b95b547
30 DIST python-gentoo-patches-3.7.6.tar.xz 10084 BLAKE2B 220869e85bdaf9c21b1b05e13803bdb6ecc22ac0f69da77e57fd7c1cd93ef45ec43401b62732842e1bb3467feb6d65c8204120e2741e9eb6f4cab673fd3a8d62 SHA512 4c04b0cf7da55fa7973ab178e3ac2c59bc2142924bdced5954c058053280b6c663d7c39912286d10fe0e82ca30af6a0dd6a56fa85433f836217ca3dcbb284def
31
32 diff --git a/dev-lang/python/python-2.7.17-r1.ebuild b/dev-lang/python/python-2.7.17-r1.ebuild
33 deleted file mode 100644
34 index 424cdec1208..00000000000
35 --- a/dev-lang/python/python-2.7.17-r1.ebuild
36 +++ /dev/null
37 @@ -1,368 +0,0 @@
38 -# Copyright 1999-2019 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI="7"
42 -WANT_LIBTOOL="none"
43 -
44 -inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
45 -
46 -MY_P="Python-${PV}"
47 -PYVER=$(ver_cut 1-2)
48 -PATCHSET_VERSION="2.7.17"
49 -
50 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
51 -HOMEPAGE="https://www.python.org/"
52 -SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
53 - https://dev.gentoo.org/~mgorny/dist/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
54 -S="${WORKDIR}/${MY_P}"
55 -
56 -LICENSE="PSF-2"
57 -SLOT="${PYVER}"
58 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
59 -IUSE="-berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
60 -
61 -# Do not add a dependency on dev-lang/python to this ebuild.
62 -# If you need to apply a patch which requires python for bootstrapping, please
63 -# run the bootstrap code on your dev box and include the results in the
64 -# patchset. See bug 447752.
65 -
66 -RDEPEND="app-arch/bzip2:=
67 - >=sys-libs/zlib-1.1.3:=
68 - virtual/libffi:=
69 - virtual/libintl
70 - berkdb? ( || (
71 - sys-libs/db:5.3
72 - sys-libs/db:5.1
73 - sys-libs/db:4.8
74 - sys-libs/db:4.7
75 - sys-libs/db:4.6
76 - sys-libs/db:4.5
77 - sys-libs/db:4.4
78 - sys-libs/db:4.3
79 - sys-libs/db:4.2
80 - ) )
81 - gdbm? ( sys-libs/gdbm:=[berkdb] )
82 - ncurses? ( >=sys-libs/ncurses-5.2:= )
83 - readline? ( >=sys-libs/readline-4.1:= )
84 - sqlite? ( >=dev-db/sqlite-3.3.8:3= )
85 - ssl? (
86 - !libressl? ( dev-libs/openssl:= )
87 - libressl? ( dev-libs/libressl:= )
88 - )
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 - virtual/pkgconfig
100 - !sys-devel/gcc[libffi(-)]"
101 -RDEPEND+=" !build? ( app-misc/mime-types )"
102 -PDEPEND=">=app-eselect/eselect-python-20140125-r1"
103 -
104 -pkg_setup() {
105 - if use berkdb; then
106 - ewarn "'bsddb' module is out-of-date and no longer maintained inside"
107 - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
108 - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
109 - ewarn "is provided by dev-python/bsddb3."
110 - else
111 - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
112 - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
113 - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
114 - ewarn "You might need to migrate your databases."
115 - fi
116 - fi
117 -}
118 -
119 -src_prepare() {
120 - # Ensure that internal copies of expat, libffi and zlib are not used.
121 - rm -fr Modules/expat || die
122 - rm -fr Modules/_ctypes/libffi* || die
123 - rm -fr Modules/zlib || die
124 -
125 - local PATCHES=(
126 - "${WORKDIR}/patches"
127 - # Fix for cross-compiling.
128 - "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
129 - "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
130 - "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
131 - "${FILESDIR}/python-2.7.10-system-libffi.patch"
132 - )
133 -
134 - default
135 -
136 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
137 - Lib/distutils/command/install.py \
138 - Lib/distutils/sysconfig.py \
139 - Lib/site.py \
140 - Lib/sysconfig.py \
141 - Lib/test/test_site.py \
142 - Makefile.pre.in \
143 - Modules/Setup.dist \
144 - Modules/getpath.c \
145 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
146 -
147 - eautoreconf
148 -}
149 -
150 -src_configure() {
151 - # dbm module can be linked against berkdb or gdbm.
152 - # Defaults to gdbm when both are enabled, #204343.
153 - local disable
154 - use berkdb || use gdbm || disable+=" dbm"
155 - use berkdb || disable+=" _bsddb"
156 - # disable automagic bluetooth headers detection
157 - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
158 - use gdbm || disable+=" gdbm"
159 - use ncurses || disable+=" _curses _curses_panel"
160 - use readline || disable+=" readline"
161 - use sqlite || disable+=" _sqlite3"
162 - use ssl || export PYTHON_DISABLE_SSL="1"
163 - use tk || disable+=" _tkinter"
164 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
165 - export PYTHON_DISABLE_MODULES="${disable}"
166 -
167 - if ! use xml; then
168 - ewarn "You have configured Python without XML support."
169 - ewarn "This is NOT a recommended configuration as you"
170 - ewarn "may face problems parsing any XML documents."
171 - fi
172 -
173 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
174 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
175 - fi
176 -
177 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
178 - append-flags -fwrapv
179 - fi
180 -
181 - filter-flags -malign-double
182 -
183 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
184 - if is-flagq -O3; then
185 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
186 - use hardened && replace-flags -O3 -O2
187 - fi
188 -
189 - if tc-is-cross-compiler; then
190 - # Force some tests that try to poke fs paths.
191 - export ac_cv_file__dev_ptc=no
192 - export ac_cv_file__dev_ptmx=yes
193 - fi
194 -
195 - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
196 - tc-export CXX
197 - # The configure script fails to use pkg-config correctly.
198 - # http://bugs.python.org/issue15506
199 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
200 -
201 - # Set LDFLAGS so we link modules with -lpython2.7 correctly.
202 - # Needed on FreeBSD unless Python 2.7 is already installed.
203 - # Please query BSD team before removing this!
204 - append-ldflags "-L."
205 -
206 - local dbmliborder
207 - if use gdbm; then
208 - dbmliborder+="${dbmliborder:+:}gdbm"
209 - fi
210 - if use berkdb; then
211 - dbmliborder+="${dbmliborder:+:}bdb"
212 - fi
213 -
214 - local myeconfargs=(
215 - # The check is broken on clang, and gives false positive:
216 - # https://bugs.gentoo.org/596798
217 - # (upstream dropped this flag in 3.2a4 anyway)
218 - ac_cv_opt_olimit_ok=no
219 -
220 - --with-fpectl
221 - --enable-shared
222 - $(use_enable ipv6)
223 - $(use_with threads)
224 - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2")
225 - --infodir='${prefix}/share/info'
226 - --mandir='${prefix}/share/man'
227 - --with-computed-gotos
228 - --with-dbmliborder="${dbmliborder}"
229 - --with-libc=
230 - --enable-loadable-sqlite-extensions
231 - --with-system-expat
232 - --with-system-ffi
233 - --without-ensurepip
234 - )
235 -
236 - OPT="" econf "${myeconfargs[@]}"
237 -
238 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
239 - eerror "configure has detected that the sem_open function is broken."
240 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
241 - die "Broken sem_open function (bug 496328)"
242 - fi
243 -}
244 -
245 -src_compile() {
246 - # Ensure sed works as expected
247 - # https://bugs.gentoo.org/594768
248 - local -x LC_ALL=C
249 -
250 - # Avoid invoking pgen for cross-compiles.
251 - touch Include/graminit.h Python/graminit.c
252 -
253 - emake
254 -
255 - # Work around bug 329499. See also bug 413751 and 457194.
256 - if has_version dev-libs/libffi[pax_kernel]; then
257 - pax-mark E python
258 - else
259 - pax-mark m python
260 - fi
261 -}
262 -
263 -src_test() {
264 - # Tests will not work when cross compiling.
265 - if tc-is-cross-compiler; then
266 - elog "Disabling tests due to crosscompiling."
267 - return
268 - fi
269 -
270 - # Skip failing tests.
271 - local skipped_tests="distutils gdb"
272 -
273 - for test in ${skipped_tests}; do
274 - mv "${S}"/Lib/test/test_${test}.py "${T}"
275 - done
276 -
277 - # bug 660358
278 - local -x COLUMNS=80
279 -
280 - # Daylight saving time problem
281 - # https://bugs.python.org/issue22067
282 - # https://bugs.gentoo.org/610628
283 - local -x TZ=UTC
284 -
285 - # Rerun failed tests in verbose mode (regrtest -w).
286 - emake test EXTRATESTOPTS="-w" < /dev/tty
287 - local result="$?"
288 -
289 - for test in ${skipped_tests}; do
290 - mv "${T}/test_${test}.py" "${S}"/Lib/test
291 - done
292 -
293 - elog "The following tests have been skipped:"
294 - for test in ${skipped_tests}; do
295 - elog "test_${test}.py"
296 - done
297 -
298 - elog "If you would like to run them, you may:"
299 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
300 - elog "and run the tests separately."
301 -
302 - if [[ ${result} -ne 0 ]]; then
303 - die "emake test failed"
304 - fi
305 -}
306 -
307 -src_install() {
308 - local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
309 -
310 - emake DESTDIR="${D}" altinstall
311 -
312 - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die
313 -
314 - # Fix collisions between different slots of Python.
315 - mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die
316 - mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die
317 - mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die
318 - rm "${ED}/usr/bin/smtpd.py" || die
319 -
320 - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
321 - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
322 - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die
323 - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
324 -
325 - use threads || rm -r "${libdir}/multiprocessing" || die
326 - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
327 -
328 - dodoc Misc/{ACKS,HISTORY,NEWS}
329 -
330 - if use examples; then
331 - docinto examples
332 - dodoc -r Tools
333 - fi
334 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
335 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
336 - emake --no-print-directory -s -f - 2>/dev/null)
337 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
338 -
339 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
340 - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
341 - sed \
342 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
343 - -e "s:@PYDOC@:pydoc${PYVER}:" \
344 - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
345 - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
346 -
347 - # for python-exec
348 - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
349 -
350 - # if not using a cross-compiler, use the fresh binary
351 - if ! tc-is-cross-compiler; then
352 - local -x PYTHON=./python
353 - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
354 - else
355 - vars=( PYTHON "${vars[@]}" )
356 - fi
357 -
358 - python_export "python${PYVER}" "${vars[@]}"
359 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
360 - python_domodule epython.py
361 -
362 - # python-exec wrapping support
363 - local pymajor=${PYVER%.*}
364 - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
365 - # python and pythonX
366 - ln -s "../../../bin/python${PYVER}" \
367 - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
368 - ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die
369 - # python-config and pythonX-config
370 - ln -s "../../../bin/python${PYVER}-config" \
371 - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
372 - ln -s "python${pymajor}-config" \
373 - "${D}${PYTHON_SCRIPTDIR}/python-config" || die
374 - # 2to3, pydoc, pyvenv
375 - ln -s "../../../bin/2to3-${PYVER}" \
376 - "${D}${PYTHON_SCRIPTDIR}/2to3" || die
377 - ln -s "../../../bin/pydoc${PYVER}" \
378 - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
379 - # idle
380 - if use tk; then
381 - ln -s "../../../bin/idle${PYVER}" \
382 - "${D}${PYTHON_SCRIPTDIR}/idle" || die
383 - fi
384 -}
385 -
386 -eselect_python_update() {
387 - if [[ -z "$(eselect python show)" || \
388 - ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then
389 - eselect python update
390 - fi
391 -
392 - if [[ -z "$(eselect python show --python${PV%%.*})" || \
393 - ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]]
394 - then
395 - eselect python update --python${PV%%.*}
396 - fi
397 -}
398 -
399 -pkg_postinst() {
400 - eselect_python_update
401 -}
402 -
403 -pkg_postrm() {
404 - eselect_python_update
405 -}
406
407 diff --git a/dev-lang/python/python-3.6.10.ebuild b/dev-lang/python/python-3.6.10.ebuild
408 index 43dc80e812f..c0c1738557f 100644
409 --- a/dev-lang/python/python-3.6.10.ebuild
410 +++ b/dev-lang/python/python-3.6.10.ebuild
411 @@ -8,12 +8,12 @@ inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
412
413 MY_P="Python-${PV}"
414 PYVER=$(ver_cut 1-2)
415 -PATCHSET="python-gentoo-patches-3.6.10"
416 +PATCHSET_VERSION="3.6.8"
417
418 DESCRIPTION="An interpreted, interactive, object-oriented programming language"
419 HOMEPAGE="https://www.python.org/"
420 SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
421 - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
422 + https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
423 S="${WORKDIR}/${MY_P}"
424
425 LICENSE="PSF-2"
426 @@ -63,7 +63,7 @@ src_prepare() {
427 rm -fr Modules/zlib || die
428
429 local PATCHES=(
430 - "${WORKDIR}/${PATCHSET}"
431 + "${WORKDIR}/patches"
432 )
433
434 default