From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 5/5] python-any-r1.eclass: Use reverse iter instead of reversing impls array
Date: Thu, 17 Dec 2015 23:02:58 +0100 [thread overview]
Message-ID: <1450389778-10144-6-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <1450389778-10144-1-git-send-email-mgorny@gentoo.org>
---
eclass/python-any-r1.eclass | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 99aac73..c6dfc9c 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
--
2.6.4
prev parent reply other threads:[~2015-12-17 22:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 22:02 [gentoo-dev] [PATCH 0/5] python*-r1: commonize PYTHON_COMPAT handling Michał Górny
2015-12-17 22:02 ` [gentoo-dev] [PATCH 1/5] python*-r1.eclass: Commonize PYTHON_COMPAT processing, cache the result Michał Górny
2015-12-17 22:02 ` [gentoo-dev] [PATCH 2/5] python-single-r1.eclass: Fix python_gen_* w/ single PYTHON_COMPAT impl Michał Górny
2015-12-17 22:02 ` [gentoo-dev] [PATCH 3/5] python-any-r1.eclass: Support PYTHON_COMPAT_OVERRIDE Michał Górny
2015-12-17 22:02 ` [gentoo-dev] [PATCH 4/5] python-single-r1.eclass: " Michał Górny
2015-12-17 22:02 ` Michał Górny [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450389778-10144-6-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox