commit:     ece0dc4ccef96142c754f27c1a8984b88b90a015
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 15:24:37 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 16 17:11:34 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece0dc4c

python-r1.eclass: python_setup, use _python_impl_matches()

 eclass/python-r1.eclass | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 99dfc502812..f26233f7e85 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -601,12 +601,9 @@ python_setup() {
 
        local best_impl patterns=( "${@-*}" )
        _python_try_impl() {
-               local pattern
-               for pattern in "${patterns[@]}"; do
-                       if [[ ${EPYTHON} == ${pattern} ]]; then
-                               best_impl=${EPYTHON}
-                       fi
-               done
+               if _python_impl_matches "${impl}" "${patterns[@]}"; then
+                       best_impl=${EPYTHON}
+               fi
        }
        python_foreach_impl _python_try_impl
        unset -f _python_try_impl

Reply via email to