commit:     afda6ba12b1e96a5a2f487ec26b67802e39c7152
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  6 11:52:49 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 20:31:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afda6ba1

distutils-r1.eclass: Require EPYTHON to be set

There is no context in which the function is called without EPYTHON
set, so require it to be set instead of adding a fallback.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/distutils-r1.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index cb64938c8c3..780becc3ace 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -518,6 +518,8 @@ distutils_enable_tests() {
 esetup.py() {
        debug-print-function ${FUNCNAME} "${@}"
 
+       [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context"
+
        local die_args=()
        [[ ${EAPI} != [45] ]] && die_args+=( -n )
 
@@ -529,7 +531,7 @@ esetup.py() {
                setup_py=( -m pyproject2setuppy.main )
        fi
 
-       set -- "${EPYTHON:-python}" "${setup_py[@]}" "${mydistutilsargs[@]}" 
"${@}"
+       set -- "${EPYTHON}" "${setup_py[@]}" "${mydistutilsargs[@]}" "${@}"
 
        echo "${@}" >&2
        "${@}" || die "${die_args[@]}"

Reply via email to