diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-05-08 13:55:16 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-05-09 22:31:52 +0200 |
commit | 6215e9cb94043395a448504f874699fc0ba07032 (patch) | |
tree | 93a84335527ff78d65089eac10bd95137106f6bd /eclass/distutils-r1.eclass | |
parent | distutils-r1.eclass: Support DISTUTILS_ARGS in PEP517 mode (diff) | |
download | gentoo-6215e9cb94043395a448504f874699fc0ba07032.tar.gz gentoo-6215e9cb94043395a448504f874699fc0ba07032.tar.bz2 gentoo-6215e9cb94043395a448504f874699fc0ba07032.zip |
distutils-r1.eclass: Print buildsys package versions to aid debug
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 92 |
1 files changed, 92 insertions, 0 deletions
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/hatchling + ) + ;; + jupyter) + packages+=( + dev-python/jupyter_packaging + dev-python/setuptools + dev-python/setuptools_scm + dev-python/wheel + ) + ;; + maturin) + packages+=( + dev-util/maturin + ) + ;; + pbr) + packages+=( + dev-python/pbr + dev-python/setuptools + dev-python/wheel + ) + ;; + pdm) + packages+=( + dev-python/pdm-pep517 + dev-python/setuptools + ) + ;; + poetry) + packages+=( + dev-python/poetry-core + ) + ;; + setuptools) + packages+=( + dev-python/setuptools + dev-python/setuptools_scm + dev-python/wheel + ) + ;; + esac + else + case ${DISTUTILS_USE_SETUPTOOLS} in + manual|no) + return + ;; + *) + packages+=( + dev-python/setuptools + ) + ;; + esac + fi + + local pkg + einfo "Build system packages:" + for pkg in "${packages[@]}"; do + local installed=$(best_version "${pkg}") + einfo " $(printf '%-30s' "${pkg}"): ${installed#${pkg}-}" + done +} + # @FUNCTION: distutils-r1_python_prepare_all # @DESCRIPTION: # The default python_prepare_all(). It applies the patches from PATCHES @@ -894,6 +985,7 @@ distutils-r1_python_prepare_all() { python_copy_sources fi + _distutils-r1_print_package_versions _DISTUTILS_DEFAULT_CALLED=1 } |