Signed-off-by: David Seifert <s...@gentoo.org>
---
 eclass/docs.eclass             |  2 +-
 eclass/mate.eclass             |  2 +-
 eclass/python-any-r1.eclass    |  2 +-
 eclass/python-r1.eclass        | 27 ++++++++-------------------
 eclass/python-single-r1.eclass |  2 +-
 eclass/scons-utils.eclass      |  2 +-
 eclass/waf-utils.eclass        |  2 +-
 7 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index 859e8048893..f4663c3575f 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -153,7 +153,7 @@ _DOCS_ECLASS=1
 case ${DOCS_BUILDER} in
        "sphinx"|"mkdocs")
                # We need the python_gen_any_dep function
-               if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1_ECLASS} && ! 
${_PYTHON_SINGLE_R1} ]]; then
+               if [[ ! ${_PYTHON_R1_ECLASS} && ! ${_PYTHON_ANY_R1_ECLASS} && ! 
${_PYTHON_SINGLE_R1} ]]; then
                        die "distutils-r1, python-r1, python-single-r1 or 
python-any-r1 needs to be inherited to use python based documentation builders"
                fi
                ;;
diff --git a/eclass/mate.eclass b/eclass/mate.eclass
index 66b4cf44624..c1886648140 100644
--- a/eclass/mate.eclass
+++ b/eclass/mate.eclass
@@ -45,7 +45,7 @@ DEPEND=">=mate-base/mate-common-${MATE_BRANCH}"
 # This function should only be used if the ebuild also inherits the
 # python-r1 eclass
 mate_py_cond_func_wrap() {
-       if [[ ! ${_PYTHON_R1} ]]; then
+       if [[ ! ${_PYTHON_R1_ECLASS} ]]; then
                die "This function requires the inheritence of the python-r1 
eclass"
        fi
        if use python; then
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index bec15f7ca0b..7474ef0474b 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -46,7 +46,7 @@ esac
 if [[ ! ${_PYTHON_ANY_R1_ECLASS} ]]; then
 _PYTHON_ANY_R1_ECLASS=1
 
-if [[ ${_PYTHON_R1} ]]; then
+if [[ ${_PYTHON_R1_ECLASS} ]]; then
        die 'python-any-r1.eclass can not be used with python-r1.eclass.'
 elif [[ ${_PYTHON_SINGLE_R1} ]]; then
        die 'python-any-r1.eclass can not be used with python-single-r1.eclass.'
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index bc10e83cf78..52822c5f47b 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -7,7 +7,7 @@
 # @AUTHOR:
 # Author: Michał Górny <mgo...@gentoo.org>
 # Based on work of: Krzysztof Pawlik <nelch...@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @PROVIDES: multibuild python-utils-r1
 # @BLURB: A common, simple eclass for Python packages.
 # @DESCRIPTION:
@@ -30,18 +30,13 @@
 # For more information, please see the Python Guide:
 # https://projects.gentoo.org/python/guide/
 
-case "${EAPI:-0}" in
-       [0-5])
-               die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-               ;;
-       [6-8])
-               ;;
-       *)
-               die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-               ;;
+case ${EAPI} in
+       7|8) ;;
+       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_PYTHON_R1} ]]; then
+if [[ ! ${_PYTHON_R1_ECLASS} ]]; then
+_PYTHON_R1_ECLASS=1
 
 if [[ ${_PYTHON_SINGLE_R1} ]]; then
        die 'python-r1.eclass can not be used with python-single-r1.eclass.'
@@ -49,11 +44,8 @@ elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
        die 'python-r1.eclass can not be used with python-any-r1.eclass.'
 fi
 
-[[ ${EAPI} == 6 ]] && inherit eqawarn
 inherit multibuild python-utils-r1
 
-fi
-
 # @ECLASS_VARIABLE: PYTHON_COMPAT
 # @REQUIRED
 # @DESCRIPTION:
@@ -244,8 +236,6 @@ _python_set_globals() {
 _python_set_globals
 unset -f _python_set_globals
 
-if [[ ! ${_PYTHON_R1} ]]; then
-
 # @FUNCTION: _python_validate_useflags
 # @INTERNAL
 # @DESCRIPTION:
@@ -636,7 +626,7 @@ python_foreach_impl() {
                        eqawarn "instead."
                        _DISTUTILS_FOREACH_IMPL_WARNED=1
 
-                       if ! has "${EAPI}" 6 7 8; then
+                       if ! has "${EAPI}" 7 8; then
                                die "Calling python_foreach_impl from 
distutils-r1 is banned in EAPI ${EAPI}"
                        fi
                fi
@@ -805,10 +795,9 @@ python_replicate_script() {
        local f
        for f; do
                local dosym=dosym
-               [[ ${EAPI} == [67] ]] && dosym=dosym8
+               [[ ${EAPI} == 7 ]] && dosym=dosym8
                "${dosym}" -r /usr/lib/python-exec/python-exec2 "${f#${ED}}"
        done
 }
 
-_PYTHON_R1=1
 fi
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 59673d2a5bf..790477c1472 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -50,7 +50,7 @@ esac
 
 if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
 
-if [[ ${_PYTHON_R1} ]]; then
+if [[ ${_PYTHON_R1_ECLASS} ]]; then
        die 'python-single-r1.eclass can not be used with python-r1.eclass.'
 elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
        die 'python-single-r1.eclass can not be used with python-any-r1.eclass.'
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
index 9fc048cadcd..619230ecca6 100644
--- a/eclass/scons-utils.eclass
+++ b/eclass/scons-utils.eclass
@@ -108,7 +108,7 @@ elif [[ ${_PYTHON_SINGLE_R1} ]]; then
        BDEPEND="
                $(python_gen_cond_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")
                ${PYTHON_DEPS}"
-elif [[ ${_PYTHON_R1} ]]; then
+elif [[ ${_PYTHON_R1_ECLASS} ]]; then
        # when using python-r1, you need to depend on scons yourself
        # (depending on whether you need any-r1 or full -r1 API)
        # -- since this is a breaking API change, it applies to EAPI 7+ only
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
index e08515e4502..61994e73bed 100644
--- a/eclass/waf-utils.eclass
+++ b/eclass/waf-utils.eclass
@@ -41,7 +41,7 @@ waf-utils_src_configure() {
        debug-print-function ${FUNCNAME} "$@"
 
        local fail
-       if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} && ! 
${_PYTHON_R1} ]]; then
+       if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} && ! 
${_PYTHON_R1_ECLASS} ]]; then
                eerror "Using waf-utils.eclass without any python-r1 suite 
eclass is not supported."
                eerror "Please make sure to configure and inherit appropriate 
-r1 eclass."
                eerror "For more information and examples, please see:"
-- 
2.39.0


Reply via email to