summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-05-31 10:21:53 +0200
committerMichał Górny <mgorny@gentoo.org>2022-06-07 08:53:44 +0200
commit033ffdfa2348fe955ee2b6da60140d99a9e8e026 (patch)
treef9b2d44adf8587d174ecbbfad5ef622953de7db2 /eclass
parentpython-utils-r1.eclass: Strip stray *-pytest-*.pyc files in epytest (diff)
downloadgentoo-033ffdfa2348fe955ee2b6da60140d99a9e8e026.tar.gz
gentoo-033ffdfa2348fe955ee2b6da60140d99a9e8e026.tar.bz2
gentoo-033ffdfa2348fe955ee2b6da60140d99a9e8e026.zip
distutils-r1.eclass: Support internal post-python_* phase functions
Support running additional post-python_* phase functions for internal usage. The goal is to replace some of the inline logic in distutils-r1_python_* functions that relies on the user calling them and additional calls to python_foreach_impl. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils-r1.eclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index ed368da79896..d6fd176192de 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1687,6 +1687,11 @@ distutils-r1_run_phase() {
fi
cd "${_DISTUTILS_INITIAL_CWD}" || die
+ if [[ ! ${_DISTUTILS_IN_COMMON_IMPL} ]] &&
+ declare -f "_distutils-r1_post_python_${EBUILD_PHASE}" >/dev/null
+ then
+ "_distutils-r1_post_python_${EBUILD_PHASE}"
+ fi
return "${ret}"
}
@@ -1701,6 +1706,7 @@ distutils-r1_run_phase() {
# of sources made for the selected Python interpreter.
_distutils-r1_run_common_phase() {
local DISTUTILS_ORIG_BUILD_DIR=${BUILD_DIR}
+ local _DISTUTILS_IN_COMMON_IMPL=1
if [[ ${DISTUTILS_SINGLE_IMPL} ]]; then
# reuse the dedicated code branch