summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-05-10 17:25:17 +0200
committerMichał Górny <mgorny@gentoo.org>2017-05-16 19:11:35 +0200
commitbb7c80417e43eca203aaeb6a4aa208e3e0c3a9cb (patch)
tree348d776d7618719bbffcb9fda058ae3dc893b82b /eclass/python-single-r1.eclass
parentpython-single-r1.eclass: python_gen_usedep, use _python_impl_matches() (diff)
downloadgentoo-bb7c80417e43eca203aaeb6a4aa208e3e0c3a9cb.tar.gz
gentoo-bb7c80417e43eca203aaeb6a4aa208e3e0c3a9cb.tar.bz2
gentoo-bb7c80417e43eca203aaeb6a4aa208e3e0c3a9cb.zip
python-single-r1.eclass: python_gen_useflags, use _python_impl_matches()
Diffstat (limited to 'eclass/python-single-r1.eclass')
-rw-r--r--eclass/python-single-r1.eclass12
1 files changed, 4 insertions, 8 deletions
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 3145a17b1553..e43057f26d6f 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -328,8 +328,7 @@ python_gen_usedep() {
python_gen_useflags() {
debug-print-function ${FUNCNAME} "${@}"
- local flag_prefix impl pattern
- local matches=()
+ local flag_prefix impl matches=()
if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
flag_prefix=python_targets
@@ -338,12 +337,9 @@ python_gen_useflags() {
fi
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- for pattern; do
- if [[ ${impl} == ${pattern} ]]; then
- matches+=( "${flag_prefix}_${impl}" )
- break
- fi
- done
+ if _python_impl_matches "${impl}" "${@}"; then
+ matches+=( "${flag_prefix}_${impl}" )
+ fi
done
echo "${matches[@]}"