commit: 1fdfa3d7d4b980c37626b2bea5aa2e156dd99517
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 2 08:37:57 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 3 06:48:07 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fdfa3d7
distutils-r1.eclass: Do not force stdlib distutils on py3.12+
Do not force SETUPTOOLS_USE_DISTUTILS=stdlib on Python 3.12+
(in non-PEP517 mode), as stdlib no longer supplies distutils there.
Thanks to Sam for the report!
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/distutils-r1.eclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 0ccd59fb6c78..f3325d5bd8f4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1814,9 +1814,11 @@ distutils-r1_run_phase() {
# and _all() already localizes it
local -x PATH=${PATH}
- # Undo the default switch in setuptools-60+ for the time being,
- # to avoid replacing .egg-info file with directory in-place.
- local -x
SETUPTOOLS_USE_DISTUTILS="${SETUPTOOLS_USE_DISTUTILS:-stdlib}"
+ if _python_impl_matches "${EPYTHON}" 3.{9..11}; then
+ # Undo the default switch in setuptools-60+ for the
time being,
+ # to avoid replacing .egg-info file with directory
in-place.
+ local -x
SETUPTOOLS_USE_DISTUTILS="${SETUPTOOLS_USE_DISTUTILS:-stdlib}"
+ fi
# Bug 559644
# using PYTHONPATH when the ${BUILD_DIR}/lib is not created yet
might lead to