distutils-r1.eclass: Remove EAPI 7 support

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/41560
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-05-02 20:35:13 +02:00
parent 7972a9082e
commit 4d2906625a

View File

@@ -7,7 +7,7 @@
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# Based on the work of: Krzysztof Pawlik <nelchael@gentoo.org>
# @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