commit: 0ad4b1b16e47df3f10dd31c3ba897279388ce3de Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue May 31 08:27:10 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Jun 7 06:53:45 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ad4b1b1
distutils-r1.eclass: Call egg-info cleanup via post-test phase Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> eclass/distutils-r1.eclass | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index d6fd176192de..b690f21f9159 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1818,15 +1818,24 @@ _distutils-r1_clean_egg_info() { rm -rf "${BUILD_DIR}"/lib/*.egg-info || die } +# @FUNCTION: _distutils-r1_post_python_test +# @INTERNAL +# @DESCRIPTION: +# Post-phase function called after python_test. +_distutils-r1_post_python_test() { + debug-print-function ${FUNCNAME} "${@}" + + if [[ ! ${DISTUTILS_USE_PEP517} ]]; then + _distutils-r1_clean_egg_info + fi +} + distutils-r1_src_test() { debug-print-function ${FUNCNAME} "${@}" local ret=0 if declare -f python_test >/dev/null; then _distutils-r1_run_foreach_impl python_test || ret=${?} - if [[ ! ${DISTUTILS_USE_PEP517} ]]; then - _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info - fi fi if declare -f python_test_all >/dev/null; then