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 <mgo...@gentoo.org> --- eclass/python-r1.eclass | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 74e3fb38a1cc..5457b515a839 100644 --- a/eclass/python-r1.eclass +++ b/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 "${@}" -- 2.30.1