Skip to content

Commit

Permalink
python-single-r1.eclass: python_gen_usedep, 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 ece0dc4 commit 35f5bf6
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions eclass/python-single-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -291,19 +291,15 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
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: ${@}"
Expand Down

0 comments on commit 35f5bf6

Please sign in to comment.