summaryrefslogtreecommitdiff
path: root/eclass/python-any-r1.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-27 20:10:49 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-27 20:10:49 +0000
commite44b9cf3e5b67eaf723e4a335faf39c87167abd3 (patch)
tree3e6660b30910e7eb33586a99c4e892b52380bad6 /eclass/python-any-r1.eclass
parent4429be000a778f363162554d59d903a725283d7d (diff)
gentoo auto-resync : 27:12:2022 - 20:10:49
Diffstat (limited to 'eclass/python-any-r1.eclass')
-rw-r--r--eclass/python-any-r1.eclass25
1 files changed, 10 insertions, 15 deletions
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 558f725f74b7..d7d44a87f516 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,26 +38,22 @@
# 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
+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
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