Skip to content

Commit

Permalink
python-r1.eclass: python_setup, use _python_impl_matches()
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed May 16, 2017
1 parent 6504a80 commit ece0dc4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions eclass/python-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ece0dc4

Please sign in to comment.