• [gentoo-dev] [PATCH 2/2] distutils-r1.eclass: use _python_check_EPYTHON

    From Florian Schmaus@21:1/5 to All on Mon Sep 13 09:50:02 2021
    Replace the existing EPYTHON check with _python_check_EPYTHON and use _python_check_EPYTHON in a few additional places.

    Signed-off-by: Florian Schmaus <flow@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 8 +++++++-
    1 file changed, 7 insertions(+), 1 deletion(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 786f59636638..1326809a8bc1 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -460,7 +460,7 @@ distutils_enable_tests() {
    esetup.py() {
    debug-print-function ${FUNCNAME} "${@}"

    - [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context"
    + _python_check_EPYTHON

    [[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg

    @@ -743,6 +743,8 @@ _distutils-r1_copy_egg_info() {
    distutils-r1_python_compile() {
    debug-print-function ${FUNCNAME} "${@}"

    + _python_check_EPYTHON
    +
    _distutils-r1_copy_egg_info

    # distutils is parallel-capable since py3.5
    @@ -821,6 +823,8 @@ distutils-r1_python_test() {
    die "${FUNCNAME} can be only used after calling distutils_enable_tests"
    fi

    + _python_check_EPYTHON
    +
    if [[ ${_DISTUTILS_TEST_INSTALL} ]]; then
    distutils_install_for_testing
    fi