This previously happened before checking but now exporting PYTHON involves creating the wrappers, which requires the requested Python to be installed.
We could also drop all the calls to python_wrapper_setup as this is now already done when exporting PYTHON but it doesn't hurt to be explicit. Signed-off-by: James Le Cuirot <ch...@gentoo.org> --- eclass/python-any-r1.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index 7a91507a600f..7c5ae87872eb 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: python-any-r1.eclass @@ -327,8 +327,8 @@ python_setup() { # fallback to best installed impl. # (reverse iteration over _PYTHON_SUPPORTED_IMPLS) for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do - python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON - if _python_EPYTHON_supported "${EPYTHON}"; then + if _python_EPYTHON_supported "${_PYTHON_SUPPORTED_IMPLS[i]}"; then + python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON python_wrapper_setup return fi -- 2.19.2