summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-12-12 23:28:16 +0100
committerMichał Górny <mgorny@gentoo.org>2015-12-22 23:12:23 +0100
commit67ea3f75ef3e92cba1f33e1df36d6e53211251f0 (patch)
tree7e8a9eb267fa8dc0a561768e25aca972082132cb /eclass/python-any-r1.eclass
parentpython-single-r1.eclass: Support PYTHON_COMPAT_OVERRIDE (diff)
downloadgentoo-67ea3f75ef3e92cba1f33e1df36d6e53211251f0.tar.gz
gentoo-67ea3f75ef3e92cba1f33e1df36d6e53211251f0.tar.bz2
gentoo-67ea3f75ef3e92cba1f33e1df36d6e53211251f0.zip
python-any-r1.eclass: Use reverse iter instead of reversing impls array
Diffstat (limited to 'eclass/python-any-r1.eclass')
-rw-r--r--eclass/python-any-r1.eclass10
1 files changed, 3 insertions, 7 deletions
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 99aac739b302..c6dfc9c7aecb 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -313,13 +313,9 @@ python_setup() {
done
# fallback to best installed impl.
- local rev_impls=()
- for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- rev_impls=( "${i}" "${rev_impls[@]}" )
- done
-
- for i in "${rev_impls[@]}"; do
- python_export "${i}" EPYTHON PYTHON
+ # (reverse iteration over _PYTHON_SUPPORTED_IMPLS)
+ for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do
+ python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON
if _python_EPYTHON_supported "${EPYTHON}"; then
python_wrapper_setup
return