summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-05-10 17:24:20 +0200
committerMichał Górny <mgorny@gentoo.org>2017-05-16 19:11:34 +0200
commit6504a8065fcea6546d9c5de723115ac0b2bd15c3 (patch)
tree56b1669b393377c6f74e2c62ea9aa63e4d46eb48 /eclass
parentpython-r1.eclass: python_gen_cond_dep, use _python_impl_matches() (diff)
downloadgentoo-6504a8065fcea6546d9c5de723115ac0b2bd15c3.tar.gz
gentoo-6504a8065fcea6546d9c5de723115ac0b2bd15c3.tar.bz2
gentoo-6504a8065fcea6546d9c5de723115ac0b2bd15c3.zip
python-r1.eclass: python_gen_impl_dep, use _python_impl_matches()
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-r1.eclass17
1 files changed, 6 insertions, 11 deletions
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[@]}"