summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-05-10 17:23:17 +0200
committerMichał Górny <mgorny@gentoo.org>2017-05-16 19:11:32 +0200
commit22e4123f1e66a1f83add2ee7a3586f2eb8785c0c (patch)
tree29efcc7c5e3c8ff85490a4451a7abbe0f8934871 /eclass/python-r1.eclass
parentpython-utils-r1.eclass: _python_impl_matches for impl-pattern matching (diff)
downloadgentoo-22e4123f1e66a1f83add2ee7a3586f2eb8785c0c.tar.gz
gentoo-22e4123f1e66a1f83add2ee7a3586f2eb8785c0c.tar.bz2
gentoo-22e4123f1e66a1f83add2ee7a3586f2eb8785c0c.zip
python-r1.eclass: python_gen_usedep, use _python_impl_matches()
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r--eclass/python-r1.eclass18
1 files changed, 7 insertions, 11 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index df57cf1e1322..f337e25337b1 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -287,19 +287,15 @@ _python_validate_useflags() {
python_gen_usedep() {
debug-print-function ${FUNCNAME} "${@}"
- local impl pattern
- local matches=()
+ local impl matches=()
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- for pattern; do
- if [[ ${impl} == ${pattern} ]]; then
- matches+=(
- "python_targets_${impl}(-)?"
- "-python_single_target_${impl}(-)"
- )
- break
- fi
- done
+ if _python_impl_matches "${impl}" "${@}"; then
+ matches+=(
+ "python_targets_${impl}(-)?"
+ "-python_single_target_${impl}(-)"
+ )
+ fi
done
[[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}"