Diff python-3.8.1 with a python-3.9.0_alpha2

/usr/portage/dev-lang/python/python-3.9.0_alpha2.ebuild 2020-02-12 22:39:00.000000000 +0300
4 4
EAPI="7"
5 5
WANT_LIBTOOL="none"
6 6

  
7
inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
7
inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
8
	toolchain-funcs
8 9

  
9
MY_P="Python-${PV}"
10
MY_P="Python-${PV/_alpha/a}"
10 11
PYVER=$(ver_cut 1-2)
11
PATCHSET="python-gentoo-patches-${PV}-r2"
12
PATCHSET="python-gentoo-patches-${PV}"
12 13

  
13 14
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
14 15
HOMEPAGE="https://www.python.org/"
15
SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
16
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
16 17
	https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
17 18
S="${WORKDIR}/${MY_P}"
18 19

  
......
58 59
RDEPEND+=" !build? ( app-misc/mime-types )"
59 60
PDEPEND=">=app-eselect/eselect-python-20140125-r1"
60 61

  
62
# large file tests involve a 2.5G file being copied (duplicated)
63
CHECKREQS_DISK_BUILD=5500M
64

  
65
pkg_pretend() {
66
	use test && check-reqs_pkg_pretend
67

  
68
	ewarn "This is an early developer preview of Python 3.9.  New features"
69
	ewarn "can still be added up to 2020-05-18.  It's not suitable for production"
70
	ewarn "use, and it is not supported for Gentoo packages."
71
}
72

  
73
pkg_setup() {
74
	use test && check-reqs_pkg_setup
75
}
76

  
61 77
src_prepare() {
62 78
	# Ensure that internal copies of expat, libffi and zlib are not used.
63 79
	rm -fr Modules/expat || die
......
243 259
	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
244 260
	use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
245 261

  
246
	use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
247

  
248 262
	dodoc Misc/{ACKS,HISTORY,NEWS}
249 263

  
250 264
	if use examples; then
......
308 322
			"${D}${PYTHON_SCRIPTDIR}/idle" || die
309 323
	fi
310 324
}
311

  
312
pkg_preinst() {
313
	if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
314
		python_updater_warning="1"
315
	fi
316
}
317

  
318
eselect_python_update() {
319
	if [[ -z "$(eselect python show)" || \
320
			! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then
321
		eselect python update
322
	fi
323

  
324
	if [[ -z "$(eselect python show --python${PV%%.*})" || \
325
			! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]]
326
	then
327
		eselect python update --python${PV%%.*}
328
	fi
329
}
330

  
331
pkg_postinst() {
332
	eselect_python_update
333

  
334
	if [[ "${python_updater_warning}" == "1" ]]; then
335
		ewarn "You have just upgraded from an older version of Python."
336
		ewarn
337
		ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
338
	fi
339
}
340

  
341
pkg_postrm() {
342
	eselect_python_update
343
}
Thank you!