Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 92 ++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e9a28056e9cc..c2f5ab263cd5 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -851,6 +851,97 @@ _distutils-r1_check_all_phase_mismatch() {
fi
}
+# @FUNCTION: _distutils-r1_print_package_versions
+# @INTERNAL
+# @DESCRIPTION:
+# Print the version of the relevant build system packages to aid
+# debugging.
+_distutils-r1_print_package_versions() {
+ local packages=()
+
+ if [[ ${DISTUTILS_USE_PEP517} ]]; then
+ packages+=(
+ dev-python/gpep517
+ dev-python/installer
+ )
+ case ${DISTUTILS_USE_PEP517} in
+ flit)
+ packages+=(
+ dev-python/flit_core
+ )
+ ;;
+ flit_scm)
+ packages+=(
+ dev-python/flit_core
+ dev-python/flit_scm
+ dev-python/setuptools_scm
+ )
+ ;;
+ hatchling)
+ packages+=(
+ dev-python/hatchli