From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: [gentoo-dev] [PATCH 24/41] python-any-r1.eclass: drop EAPI 6 support
Date: Sun, 25 Dec 2022 23:15:35 +0100 [thread overview]
Message-ID: <20221225221552.8023-24-soap@gentoo.org> (raw)
In-Reply-To: <20221225221552.8023-1-soap@gentoo.org>
Signed-off-by: David Seifert <soap@gentoo.org>
---
eclass/docs.eclass | 2 +-
eclass/python-any-r1.eclass | 21 ++++++++-------------
eclass/python-r1.eclass | 2 +-
eclass/python-single-r1.eclass | 2 +-
eclass/scons-utils.eclass | 4 ++--
eclass/waf-utils.eclass | 4 ++--
6 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index ed1558bc9a8..859e8048893 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} && ! ${_PYTHON_SINGLE_R1} ]]; then
+ if [[ ! ${_PYTHON_R1} && ! ${_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/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 558f725f74b..bec15f7ca0b 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-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 packages having build-time dependency on Python.
# @DESCRIPTION:
@@ -38,13 +38,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_ANY_R1} ]]; then
+if [[ ! ${_PYTHON_ANY_R1_ECLASS} ]]; then
+_PYTHON_ANY_R1_ECLASS=1
if [[ ${_PYTHON_R1} ]]; then
die 'python-any-r1.eclass can not be used with python-r1.eclass.'
@@ -54,10 +54,6 @@ fi
inherit python-utils-r1
-fi
-
-EXPORT_FUNCTIONS pkg_setup
-
# @ECLASS_VARIABLE: PYTHON_COMPAT
# @REQUIRED
# @DESCRIPTION:
@@ -205,8 +201,6 @@ _python_any_set_globals() {
_python_any_set_globals
unset -f _python_any_set_globals
-if [[ ! ${_PYTHON_ANY_R1} ]]; then
-
# @FUNCTION: python_gen_any_dep
# @USAGE: <dependency-block>
# @DESCRIPTION:
@@ -348,5 +342,6 @@ python-any-r1_pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && python_setup
}
-_PYTHON_ANY_R1=1
fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index caa37bc54ae..bc10e83cf78 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -45,7 +45,7 @@ if [[ ! ${_PYTHON_R1} ]]; then
if [[ ${_PYTHON_SINGLE_R1} ]]; then
die 'python-r1.eclass can not be used with python-single-r1.eclass.'
-elif [[ ${_PYTHON_ANY_R1} ]]; then
+elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
die 'python-r1.eclass can not be used with python-any-r1.eclass.'
fi
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 740c3283d1b..59673d2a5bf 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -52,7 +52,7 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
if [[ ${_PYTHON_R1} ]]; then
die 'python-single-r1.eclass can not be used with python-r1.eclass.'
-elif [[ ${_PYTHON_ANY_R1} ]]; then
+elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
die 'python-single-r1.eclass can not be used with python-any-r1.eclass.'
fi
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
index acb51300f34..9fc048cadcd 100644
--- a/eclass/scons-utils.eclass
+++ b/eclass/scons-utils.eclass
@@ -95,7 +95,7 @@ inherit multiprocessing
SCONS_DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"
-if [[ ${_PYTHON_ANY_R1} ]]; then
+if [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
# when using python-any-r1, use any-of dep API
BDEPEND="$(python_gen_any_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")"
@@ -137,7 +137,7 @@ escons() {
if [[ ! ${EPYTHON} ]]; then
eerror "EPYTHON is unset while calling escons. This most likely means that"
eerror "the ebuild did not call the appropriate eclass function before calling scons."
- if [[ ${_PYTHON_ANY_R1} ]]; then
+ 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
eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()."
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
index 3ff74db0d79..e08515e4502 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} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1} ]]; then
+ if [[ ! ${_PYTHON_ANY_R1_ECLASS} && ! ${_PYTHON_SINGLE_R1} && ! ${_PYTHON_R1} ]]; 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:"
@@ -51,7 +51,7 @@ waf-utils_src_configure() {
if [[ ! ${EPYTHON} ]]; then
eerror "EPYTHON is unset while calling waf-utils. This most likely means that"
eerror "the ebuild did not call the appropriate eclass function before calling waf."
- if [[ ${_PYTHON_ANY_R1} ]]; then
+ 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
eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()."
--
2.39.0
next prev parent reply other threads:[~2022-12-25 22:22 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 22:15 [gentoo-dev] [PATCH 01/41] ada.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 02/41] alternatives.eclass: drop EAPI 5, " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 03/41] ant-tasks.eclass: drop EAPI " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 04/41] apache-2.eclass: " David Seifert
2022-12-26 9:38 ` Hans de Graaff
2022-12-25 22:15 ` [gentoo-dev] [PATCH 05/41] aspell-dict-r1.eclass: drop EAPI 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 06/41] bazel.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 07/41] docs.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 08/41] dotnet.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 09/41] dune.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 10/41] fcaps.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 11/41] java-osgi.eclass: drop EAPI 5, " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 12/41] java-virtuals-2.eclass: drop EAPI 5-7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 13/41] libretro-core.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 14/41] linux-mod.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 15/41] llvm.eclass: canonicalize eclass structure David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 16/41] mozcoreconf-v6.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 17/41] mozextension.eclass: drop EAPI 0-7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 18/41] mozlinguas-v2.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 19/41] ninja-utils.eclass: drop EAPI 5, 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 20/41] php-ext-pecl-r3.eclass: drop EAPI " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 21/41] php-ext-source-r3.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 22/41] postgres.eclass: drop EAPI 5, " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 23/41] postgres-multi.eclass: " David Seifert
2022-12-25 22:15 ` David Seifert [this message]
2022-12-25 22:15 ` [gentoo-dev] [PATCH 25/41] python-r1.eclass: drop EAPI " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 26/41] python-single-r1.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 27/41] python-utils-r1.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 28/41] rocm.eclass: drop EAPI 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 29/41] ruby-ng-gnome2.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 30/41] ruby-single.eclass: drop EAPI 4-6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 31/41] rust-toolchain.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 32/41] selinux-policy-2.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 33/41] toolchain-autoconf.eclass: drop EAPI 6, add EAPI 8 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 34/41] user-info.eclass: drop EAPI 6 support David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 35/41] usr-ldscript.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 36/41] waf-utils.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 37/41] xemacs-packages.eclass: drop EAPI 6, 7 support David Seifert
2022-12-25 22:35 ` Ulrich Mueller
2022-12-27 13:23 ` Ulrich Mueller
2022-12-25 22:15 ` [gentoo-dev] [PATCH 38/41] gnome2.eclass: remove useless || die on emake David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 39/41] gnustep-base.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 40/41] qmail.eclass: " David Seifert
2022-12-25 22:15 ` [gentoo-dev] [PATCH 41/41] xorg-3.eclass: " David Seifert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221225221552.8023-24-soap@gentoo.org \
--to=soap@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox