Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 03/18] distutils-r1.eclass: Call egg-info cleanup via post-test phase
Date: Sat, 04 Jun 2022 09:04:57
Message-Id: 20220604090334.4003-4-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/18] distutils-r1.eclass D_U_PEP517=no mode & other patches by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/distutils-r1.eclass | 15 ++++++++++++---
4 1 file changed, 12 insertions(+), 3 deletions(-)
5
6 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
7 index d6fd176192de..b690f21f9159 100644
8 --- a/eclass/distutils-r1.eclass
9 +++ b/eclass/distutils-r1.eclass
10 @@ -1818,15 +1818,24 @@ _distutils-r1_clean_egg_info() {
11 rm -rf "${BUILD_DIR}"/lib/*.egg-info || die
12 }
13
14 +# @FUNCTION: _distutils-r1_post_python_test
15 +# @INTERNAL
16 +# @DESCRIPTION:
17 +# Post-phase function called after python_test.
18 +_distutils-r1_post_python_test() {
19 + debug-print-function ${FUNCNAME} "${@}"
20 +
21 + if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
22 + _distutils-r1_clean_egg_info
23 + fi
24 +}
25 +
26 distutils-r1_src_test() {
27 debug-print-function ${FUNCNAME} "${@}"
28 local ret=0
29
30 if declare -f python_test >/dev/null; then
31 _distutils-r1_run_foreach_impl python_test || ret=${?}
32 - if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
33 - _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info
34 - fi
35 fi
36
37 if declare -f python_test_all >/dev/null; then
38 --
39 2.35.1