python-r1.eclass: Inline implementation loop logic into python_setup
authorMichał Górny <mgorny@gentoo.org>
Fri, 19 May 2017 17:23:22 +0000 (19:23 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 29 May 2017 21:53:44 +0000 (23:53 +0200)
commit4722066cb86aa5854d9e9f40544556d742d09c8b
tree369b89bd50679024c583ad43dff333d3eaf871ed
parentec82e21c11d1b8ccb3e6bd7cf5fb530a099ecc48
python-r1.eclass: Inline implementation loop logic into python_setup

Inline the logic needed to iterate over implementations directly into
python_setup instead of using python_foreach_impl. This is mostly NFC,
except that we iterate in reverse order now -- that is, we start at
the newest implementation and stop at the first one that works for us.
Previously we (implicitly) started at the oldest implementation, checked
all implementation and used the last one (i.e. the newest) that worked.

More importantly, the new code makes it possible to alter the logic more
easily and avoid relying on implementation of python_foreach_impl().
eclass/python-r1.eclass