From 6504a8065fcea6546d9c5de723115ac0b2bd15c3 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 10 May 2017 17:24:20 +0200 Subject: python-r1.eclass: python_gen_impl_dep, use _python_impl_matches() --- eclass/python-r1.eclass | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'eclass') diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 2618c6f57033..99dfc5028129 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[@]}" -- cgit v1.2.3-18-g5258