From ece0dc4ccef96142c754f27c1a8984b88b90a015 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 10 May 2017 17:24:37 +0200 Subject: python-r1.eclass: python_setup, use _python_impl_matches() --- eclass/python-r1.eclass | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'eclass/python-r1.eclass') 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 -- cgit v1.2.3-65-gdbad