commit:     6504a8065fcea6546d9c5de723115ac0b2bd15c3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 15:24:20 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=6504a806

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

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

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 2618c6f5703..99dfc502812 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -416,22 +416,17 @@ python_gen_cond_dep() {
 python_gen_impl_dep() {
        debug-print-function ${FUNCNAME} "${@}"
 
-       local impl pattern
-       local matches=()
-
+       local impl matches=()
        local PYTHON_REQ_USE=${1}
        shift
 
        local patterns=( "${@-*}" )
        for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
-               for pattern in "${patterns[@]}"; do
-                       if [[ ${impl} == ${pattern} ]]; then
-                               local PYTHON_PKG_DEP
-                               python_export "${impl}" PYTHON_PKG_DEP
-                               matches+=( "python_targets_${impl}? ( 
${PYTHON_PKG_DEP} )" )
-                               break
-                       fi
-               done
+               if _python_impl_matches "${impl}" "${patterns[@]}"; then
+                       local PYTHON_PKG_DEP
+                       python_export "${impl}" PYTHON_PKG_DEP
+                       matches+=( "python_targets_${impl}? ( ${PYTHON_PKG_DEP} 
)" )
+               fi
        done
 
        echo "${matches[@]}"

Reply via email to