From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-98860-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E12CF158020
	for <garchives@archives.gentoo.org>; Sun, 25 Dec 2022 22:22:44 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 81118E0AED;
	Sun, 25 Dec 2022 22:16:37 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2266BE0AE8
	for <gentoo-dev@lists.gentoo.org>; Sun, 25 Dec 2022 22:16:37 +0000 (UTC)
From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: [gentoo-dev] [PATCH 26/41] python-single-r1.eclass: drop EAPI 6 support
Date: Sun, 25 Dec 2022 23:15:37 +0100
Message-Id: <20221225221552.8023-26-soap@gentoo.org>
X-Mailer: git-send-email 2.39.0
In-Reply-To: <20221225221552.8023-1-soap@gentoo.org>
References: <20221225221552.8023-1-soap@gentoo.org>
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Archives-Salt: fdeeaf88-0350-4b0a-9ed3-a52f031be789
X-Archives-Hash: d715c53f88487e5fd04b16d5294379b5

Signed-off-by: David Seifert <soap@gentoo.org>
---
 eclass/docs.eclass             |  6 +++---
 eclass/python-any-r1.eclass    |  2 +-
 eclass/python-r1.eclass        |  2 +-
 eclass/python-single-r1.eclass | 26 ++++++++------------------
 eclass/scons-utils.eclass      |  4 ++--
 eclass/waf-utils.eclass        |  4 ++--
 6 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index f4663c3575f..cbf35068de3 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_ECLASS} && ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} ]]; then
+		if [[ ! ${_PYTHON_R1_ECLASS} && ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 			die "distutils-r1, python-r1, python-single-r1 or python-any-r1 needs to be inherited to use python based documentation builders"
 		fi
 		;;
@@ -221,7 +221,7 @@ sphinx_deps() {
 	elif [[ ${DOCS_AUTODOC} != 0 && ${DOCS_AUTODOC} != 1 ]]; then
 		die "${FUNCNAME}: DOCS_AUTODOC should be set to 0 or 1"
 	fi
-	if [[ ${_PYTHON_SINGLE_R1} ]]; then
+	if [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 		DOCS_DEPEND="$(python_gen_cond_dep "${deps}")"
 	else
 		DOCS_DEPEND="$(python_gen_any_dep "${deps}")"
@@ -284,7 +284,7 @@ mkdocs_deps() {
 	elif [[ ${DOCS_AUTODOC} != 0 && ${DOCS_AUTODOC} != 1 ]]; then
 		die "${FUNCNAME}: DOCS_AUTODOC should be set to 0 or 1"
 	fi
-	if [[ ${_PYTHON_SINGLE_R1} ]]; then
+	if [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 		DOCS_DEPEND="$(python_gen_cond_dep "${deps}")"
 	else
 		DOCS_DEPEND="$(python_gen_any_dep "${deps}")"
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 7474ef0474b..d7d44a87f51 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -48,7 +48,7 @@ _PYTHON_ANY_R1_ECLASS=1
 
 if [[ ${_PYTHON_R1_ECLASS} ]]; then
 	die 'python-any-r1.eclass can not be used with python-r1.eclass.'
-elif [[ ${_PYTHON_SINGLE_R1} ]]; then
+elif [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 	die 'python-any-r1.eclass can not be used with python-single-r1.eclass.'
 fi
 
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 52822c5f47b..622a479dcfa 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -38,7 +38,7 @@ esac
 if [[ ! ${_PYTHON_R1_ECLASS} ]]; then
 _PYTHON_R1_ECLASS=1
 
-if [[ ${_PYTHON_SINGLE_R1} ]]; then
+if [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 	die 'python-r1.eclass can not be used with python-single-r1.eclass.'
 elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
 	die 'python-r1.eclass can not be used with python-any-r1.eclass.'
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 790477c1472..4d61f08c06f 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -7,7 +7,7 @@
 # @AUTHOR:
 # Author: Michał Górny <mgorny@gentoo.org>
 # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @PROVIDES: python-utils-r1
 # @BLURB: An eclass for Python packages not installed for multiple implementations.
 # @DESCRIPTION:
@@ -37,18 +37,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_SINGLE_R1} ]]; then
+if [[ ! ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
+_PYTHON_SINGLE_R1_ECLASS=1
 
 if [[ ${_PYTHON_R1_ECLASS} ]]; then
 	die 'python-single-r1.eclass can not be used with python-r1.eclass.'
@@ -58,10 +53,6 @@ fi
 
 inherit python-utils-r1
 
-fi
-
-EXPORT_FUNCTIONS pkg_setup
-
 # @ECLASS_VARIABLE: PYTHON_COMPAT
 # @REQUIRED
 # @DESCRIPTION:
@@ -257,8 +248,6 @@ _python_single_set_globals() {
 _python_single_set_globals
 unset -f _python_single_set_globals
 
-if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
-
 # @FUNCTION: python_gen_useflags
 # @USAGE: [<pattern>...]
 # @DESCRIPTION:
@@ -463,5 +452,6 @@ python-single-r1_pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && python_setup
 }
 
-_PYTHON_SINGLE_R1=1
 fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
index 619230ecca6..8d0076de97e 100644
--- a/eclass/scons-utils.eclass
+++ b/eclass/scons-utils.eclass
@@ -103,7 +103,7 @@ if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
 		python_has_version "${SCONS_DEPEND}[${PYTHON_USEDEP}]"
 	}
 	python_check_deps() { scons-utils_python_check_deps; }
-elif [[ ${_PYTHON_SINGLE_R1} ]]; then
+elif [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 	# when using python-single-r1, use PYTHON_USEDEP API
 	BDEPEND="
 		$(python_gen_cond_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")
@@ -139,7 +139,7 @@ escons() {
 		eerror "the ebuild did not call the appropriate eclass function before calling scons."
 		if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
 			eerror "Please ensure that python-any-r1_pkg_setup is called in pkg_setup()."
-		elif [[ ${_PYTHON_SINGLE_R1} ]]; then
+		elif [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 			eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()."
 		else # python-r1
 			eerror "Please ensure that python_setup is called before escons, or that escons"
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
index 61994e73bed..2f4a20cd457 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_ECLASS} ]]; then
+	if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1_ECLASS} && ! ${_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:"
@@ -53,7 +53,7 @@ waf-utils_src_configure() {
 			eerror "the ebuild did not call the appropriate eclass function before calling waf."
 			if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
 				eerror "Please ensure that python-any-r1_pkg_setup is called in pkg_setup()."
-			elif [[ ${_PYTHON_SINGLE_R1} ]]; then
+			elif [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
 				eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()."
 			else # python-r1
 				eerror "Please ensure that python_setup is called before waf-utils_src_configure(),"
-- 
2.39.0