From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 3B895158020 for ; Sun, 25 Dec 2022 22:22:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 669ACE0ADC; Sun, 25 Dec 2022 22:16:36 +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 2271DE08FF for ; Sun, 25 Dec 2022 22:16:36 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 25/41] python-r1.eclass: drop EAPI 6 support Date: Sun, 25 Dec 2022 23:15:36 +0100 Message-Id: <20221225221552.8023-25-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: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail 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: a63428bc-8b1e-451d-915d-7dcca1d5a124 X-Archives-Hash: eae274236a074d6b1cc15106dc1dc1b8 Signed-off-by: David Seifert --- 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 # Based on work of: Krzysztof Pawlik -# @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