summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-03-08 11:04:17 +0100
committerMichał Górny <mgorny@gentoo.org>2021-03-11 09:47:59 +0100
commitfa1f11b031a51ca512fb498b64c3ce32aee2a8e7 (patch)
tree44c64729b5eefab3a22620a0c9f842cdd9cf039c /eclass/python-r1.eclass
parentdistutils-r1.eclass: Use underscores in .pydistutils.cfg keys (diff)
downloadgentoo-fa1f11b031a51ca512fb498b64c3ce32aee2a8e7.tar.gz
gentoo-fa1f11b031a51ca512fb498b64c3ce32aee2a8e7.tar.bz2
gentoo-fa1f11b031a51ca512fb498b64c3ce32aee2a8e7.zip
python-r1.eclass: Fix any-r1-style python_setup without USE flags
Fix python_setup() not to fail if no USE flags are set while any-r1 API is being used. Reported by Arfrever. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r--eclass/python-r1.eclass13
1 files changed, 8 insertions, 5 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 74e3fb38a1cc..5e9dafe63d85 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: python-r1.eclass
@@ -771,15 +771,18 @@ python_foreach_impl() {
python_setup() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
+ local has_check_deps
+ declare -f python_check_deps >/dev/null && has_check_deps=1
+
+ if [[ ! ${has_check_deps} ]]; then
+ _python_validate_useflags
+ fi
+
local pycompat=( "${PYTHON_COMPAT[@]}" )
if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then
pycompat=( ${PYTHON_COMPAT_OVERRIDE} )
fi
- local has_check_deps
- declare -f python_check_deps >/dev/null && has_check_deps=1
-
# (reverse iteration -- newest impl first)
local found
_python_verify_patterns "${@}"