summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-05-10 17:24:37 +0200
committerMichał Górny <mgorny@gentoo.org>2017-05-16 19:11:34 +0200
commitece0dc4ccef96142c754f27c1a8984b88b90a015 (patch)
tree05ea7ac385bb246fd3c20057b8010d47e32d4631 /eclass
parentpython-r1.eclass: python_gen_impl_dep, use _python_impl_matches() (diff)
downloadgentoo-ece0dc4ccef96142c754f27c1a8984b88b90a015.tar.gz
gentoo-ece0dc4ccef96142c754f27c1a8984b88b90a015.tar.bz2
gentoo-ece0dc4ccef96142c754f27c1a8984b88b90a015.zip
python-r1.eclass: python_setup, use _python_impl_matches()
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-r1.eclass9
1 files changed, 3 insertions, 6 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 99dfc5028129..f26233f7e855 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -601,12 +601,9 @@ python_setup() {
local best_impl patterns=( "${@-*}" )
_python_try_impl() {
- local pattern
- for pattern in "${patterns[@]}"; do
- if [[ ${EPYTHON} == ${pattern} ]]; then
- best_impl=${EPYTHON}
- fi
- done
+ if _python_impl_matches "${impl}" "${patterns[@]}"; then
+ best_impl=${EPYTHON}
+ fi
}
python_foreach_impl _python_try_impl
unset -f _python_try_impl