diff options
| author | Michał Górny <mgorny@gentoo.org> | 2017-03-01 09:23:52 +0100 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2017-03-08 08:35:44 +0100 |
| commit | c83671e0aeb7026840c107f874741ef474622e8a (patch) | |
| tree | d4b6045a6faca4b413612710bef14b0498dfcef3 /eclass/python-any-r1.eclass | |
| parent | d2fb3f82e9c4ea1626eb465b153ccd1e8c5b2c9e (diff) | |
| download | gentoo-c83671e0aeb7026840c107f874741ef474622e8a.tar.gz gentoo-c83671e0aeb7026840c107f874741ef474622e8a.tar.bz2 gentoo-c83671e0aeb7026840c107f874741ef474622e8a.zip | |
python-any-r1.eclass: Global setter, refactor for more local vars
Refactor _python_any_set_globals() to use local variables while
generating all output, and copy it to final vars at the end. This is
in preparation for integrity checks. NFC.
Diffstat (limited to 'eclass/python-any-r1.eclass')
| -rw-r--r-- | eclass/python-any-r1.eclass | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index a1dd4282c1ef..d41cf6a5808d 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: python-any-r1.eclass @@ -148,19 +148,20 @@ if [[ ! ${_PYTHON_ANY_R1} ]]; then # @CODE _python_any_set_globals() { - local usestr i PYTHON_PKG_DEP + local usestr deps i PYTHON_PKG_DEP [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]" _python_set_impls - PYTHON_DEPS= for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do python_export "${i}" PYTHON_PKG_DEP # note: need to strip '=' slot operator for || deps - PYTHON_DEPS="${PYTHON_PKG_DEP%=} ${PYTHON_DEPS}" + deps="${PYTHON_PKG_DEP%=} ${deps}" done - PYTHON_DEPS="|| ( ${PYTHON_DEPS})" + deps="|| ( ${deps})" + + PYTHON_DEPS=${deps} readonly PYTHON_DEPS } _python_any_set_globals |
