1 |
commit: 67ea3f75ef3e92cba1f33e1df36d6e53211251f0 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 12 22:28:16 2015 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 22 22:12:23 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67ea3f75 |
7 |
|
8 |
python-any-r1.eclass: Use reverse iter instead of reversing impls array |
9 |
|
10 |
eclass/python-any-r1.eclass | 10 +++------- |
11 |
1 file changed, 3 insertions(+), 7 deletions(-) |
12 |
|
13 |
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass |
14 |
index 99aac73..c6dfc9c 100644 |
15 |
--- a/eclass/python-any-r1.eclass |
16 |
+++ b/eclass/python-any-r1.eclass |
17 |
@@ -313,13 +313,9 @@ python_setup() { |
18 |
done |
19 |
|
20 |
# fallback to best installed impl. |
21 |
- local rev_impls=() |
22 |
- for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do |
23 |
- rev_impls=( "${i}" "${rev_impls[@]}" ) |
24 |
- done |
25 |
- |
26 |
- for i in "${rev_impls[@]}"; do |
27 |
- python_export "${i}" EPYTHON PYTHON |
28 |
+ # (reverse iteration over _PYTHON_SUPPORTED_IMPLS) |
29 |
+ for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do |
30 |
+ python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON |
31 |
if _python_EPYTHON_supported "${EPYTHON}"; then |
32 |
python_wrapper_setup |
33 |
return |