From 4d2906625a2322f5d551d5db3957e4be0749cdab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 2 May 2025 20:35:13 +0200 Subject: [PATCH] distutils-r1.eclass: Remove EAPI 7 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny Part-of: https://github.com/gentoo/gentoo/pull/41560 Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index a264ebcb0392a..ba97a95f5798c 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny # Based on the work of: Krzysztof Pawlik -# @SUPPORTED_EAPIS: 7 8 +# @SUPPORTED_EAPIS: 8 # @PROVIDES: python-r1 python-single-r1 # @BLURB: A simple eclass to build Python packages using distutils. # @DESCRIPTION: @@ -217,7 +217,7 @@ if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then _DISTUTILS_R1_ECLASS=1 case ${EAPI} in - 7|8) ;; + 8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -618,7 +618,7 @@ esetup.py() { setup_py=( -c "from setuptools import setup; setup()" ) fi - if [[ ${EAPI} != 7 && ${mydistutilsargs[@]} ]]; then + if [[ ${mydistutilsargs[@]} ]]; then die "mydistutilsargs is banned in EAPI ${EAPI} (use DISTUTILS_ARGS)" fi @@ -678,8 +678,7 @@ _distutils-r1_check_all_phase_mismatch() { eqawarn "QA Notice: distutils-r1_python_${EBUILD_PHASE}_all called" eqawarn "from python_${EBUILD_PHASE}. Did you mean to use" eqawarn "python_${EBUILD_PHASE}_all()?" - [[ ${EAPI} != 7 ]] && - die "distutils-r1_python_${EBUILD_PHASE}_all called from python_${EBUILD_PHASE}." + die "distutils-r1_python_${EBUILD_PHASE}_all called from python_${EBUILD_PHASE}." fi } @@ -1322,9 +1321,7 @@ _distutils-r1_wrap_scripts() { local basename=${f##*/} debug-print "${FUNCNAME}: installing wrapper at ${bindir}/${basename}" - local dosym=dosym - [[ ${EAPI} == 7 ]] && dosym=dosym8 - "${dosym}" -r /usr/lib/python-exec/python-exec2 \ + dosym -r /usr/lib/python-exec/python-exec2 \ "${bindir#${EPREFIX}}/${basename}" done