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 2/2] distutils-r1.eclass: Move setup from src_configure to prepare_all
Date: Sun, 08 May 2022 18:29:39
Message-Id: 20220508182735.4191-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] distutils-r1.eclass: Print buildsys package versions to aid debug by "Michał Górny"
1 Move a few minor setup calls from distutils-r1_src_configure()
2 to distutils-r1_python_prepare_all(). Since we do not declare default
3 configure sub-phases, it is easy to override src_configure() entirely
4 and accidentally skip these steps. We already warn for missing
5 distutils-r1_python_prepare_all() call, so let's move them there.
6
7 Signed-off-by: Michał Górny <mgorny@g.o>
8 ---
9 eclass/distutils-r1.eclass | 6 +++---
10 1 file changed, 3 insertions(+), 3 deletions(-)
11
12 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
13 index c2f5ab263cd5..17286070e712 100644
14 --- a/eclass/distutils-r1.eclass
15 +++ b/eclass/distutils-r1.eclass
16 @@ -985,7 +985,10 @@ distutils-r1_python_prepare_all() {
17 python_copy_sources
18 fi
19
20 + python_export_utf8_locale
21 + [[ ${EAPI} == 6 ]] && xdg_environment_reset # Bug 577704
22 _distutils-r1_print_package_versions
23 +
24 _DISTUTILS_DEFAULT_CALLED=1
25 }
26
27 @@ -1715,9 +1718,6 @@ distutils-r1_src_configure() {
28 debug-print-function ${FUNCNAME} "${@}"
29 local ret=0
30
31 - python_export_utf8_locale
32 - [[ ${EAPI} == 6 ]] && xdg_environment_reset # Bug 577704
33 -
34 if declare -f python_configure >/dev/null; then
35 _distutils-r1_run_foreach_impl python_configure || ret=${?}
36 fi
37 --
38 2.35.1