Diff python-3.8.18 with a python-3.9.18

/usr/portage/dev-lang/python/python-3.9.18.ebuild 2023-10-09 14:52:29.472368350 +0300
4 4
EAPI="7"
5 5
WANT_LIBTOOL="none"
6 6

  
7
inherit autotools flag-o-matic multiprocessing pax-utils
7
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
8 8
inherit prefix python-utils-r1 toolchain-funcs verify-sig
9 9

  
10 10
MY_PV=${PV/_rc/rc}
......
31 31
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
32 32
IUSE="
33 33
	bluetooth build debug +ensurepip examples gdbm lto +ncurses pgo
34
	+readline +sqlite +ssl test tk valgrind wininst +xml
34
	+readline +sqlite +ssl test tk valgrind +xml
35 35
"
36 36
RESTRICT="!test? ( test )"
37 37

  
......
44 44
	app-arch/bzip2:=
45 45
	app-arch/xz-utils:=
46 46
	dev-libs/libffi:=
47
	dev-python/gentoo-common
47 48
	>=sys-libs/zlib-1.1.3:=
48 49
	virtual/libcrypt:=
49 50
	virtual/libintl
......
82 83

  
83 84
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
84 85

  
86
# large file tests involve a 2.5G file being copied (duplicated)
87
CHECKREQS_DISK_BUILD=5500M
88

  
85 89
QA_PKGCONFIG_VERSION=${PYVER}
86 90
# false positives -- functions specific to *BSD
87 91
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
88 92

  
93
pkg_pretend() {
94
	use test && check-reqs_pkg_pretend
95
}
96

  
97
pkg_setup() {
98
	use test && check-reqs_pkg_setup
99
}
100

  
89 101
src_unpack() {
90 102
	if use verify-sig; then
91 103
		verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
......
113 125
	sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
114 126
	sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
115 127

  
116
	if ! use wininst; then
117
		rm Lib/distutils/command/wininst*.exe || die
118
	fi
119

  
120 128
	eautoreconf
121 129
}
122 130

  
......
146 154
	fi
147 155

  
148 156
	append-flags -fwrapv
149

  
150 157
	filter-flags -malign-double
151 158

  
152 159
	# https://bugs.gentoo.org/700012
......
163 170
		dbmliborder+="${dbmliborder:+:}gdbm"
164 171
	fi
165 172

  
173
	if use pgo; then
174
		local profile_task_flags=(
175
			-m test
176
			"-j$(makeopts_jobs)"
177
			--pgo-extended
178
			-x test_gdb
179
			-x test_dtrace
180
			-u-network
181

  
182
			# All of these seem to occasionally hang for PGO inconsistently
183
			# They'll even hang here but be fine in src_test sometimes.
184
			# bug #828535 (and related: bug #788022)
185
			-x test_asyncio
186
			-x test_httpservers
187
			-x test_logging
188
			-x test_multiprocessing_fork
189
			-x test_socket
190
			-x test_xmlrpc
191

  
192
			# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
193
			# bug #900429
194
			-x test_tools
195
		)
196

  
197
		if has_version "app-arch/rpm" ; then
198
			# Avoid sandbox failure (attempts to write to /var/lib/rpm)
199
			profile_task_flags+=(
200
				-x test_distutils
201
			)
202
		fi
203
		local -x PROFILE_TASK="${profile_task_flags[*]}"
204
	fi
205

  
166 206
	local myeconfargs=(
167 207
		# glibc-2.30 removes it; since we can't cleanly force-rebuild
168 208
		# Python on glibc upgrade, remove it proactively to give
......
183 223
		--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
184 224

  
185 225
		$(use_with debug assertions)
226
		$(use_with lto)
227
		$(use_enable pgo optimizations)
186 228
		$(use_with valgrind)
187 229
	)
188 230

  
......
287 329
	# https://bugs.gentoo.org/823728
288 330
	export SETUPTOOLS_USE_DISTUTILS=stdlib
289 331

  
332
	# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
333
	# end up writing bytecode & violating sandbox.
334
	# bug #831897
335
	local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
336

  
337
	if use pgo ; then
338
		# bug 660358
339
		local -x COLUMNS=80
340
		local -x PYTHONDONTWRITEBYTECODE=
341

  
342
		addpredict "/usr/lib/python${PYVER}/site-packages"
343
	fi
344

  
290 345
	# also need to clear the flags explicitly here or they end up
291 346
	# in _sysconfigdata*
292 347
	emake CPPFLAGS= CFLAGS= LDFLAGS=
293 348

  
349
	# Restore saved value from above.
350
	local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
351

  
294 352
	# Work around bug 329499. See also bug 413751 and 457194.
295 353
	if has_version dev-libs/libffi[pax-kernel]; then
296 354
		pax-mark E python
......
383 441
		rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
384 442
	fi
385 443

  
444
	ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
445

  
386 446
	dodoc Misc/{ACKS,HISTORY,NEWS}
387 447

  
388 448
	if use examples; then
Thank you!