• [gentoo-dev] [PATCH 1/6] distutils-r1.eclass: Disable stale egg-info cl

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue Feb 1 00:00:02 2022
    Signed-off-by: Michał Górny <mgorny@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 8d03d2d1771d..4ec252958408 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -1428,6 +1428,10 @@ distutils-r1_src_compile() {
    # Those files ended up being unversioned, and caused issues:
    # https://bugs.gentoo.org/534058
    _distutils-r1_clean_egg_info() {
    + if [[ ${DISTUTILS_USE_PEP517} ]]; then
    + die "${FUNCNAME} is not implemented in PEP517 mode"
    + fi
    +
    rm -rf "${BUILD_DIR}"/lib/*.egg-info || die
    }

    @@ -1436,7 +1440,9 @@ distutils-r1_src_test() {

    if declare -f python_test >/dev/null; then
    _distutils-r1_run_foreach_impl python_test
    - _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info
    + if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
    + _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info
    + fi
    fi

    if declare -f python_test_all >/dev/null; then
    --
    2.35.1

    ---