summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-03-01 09:44:02 +0100
committerMichał Górny <mgorny@gentoo.org>2017-03-08 08:35:47 +0100
commit6024888985b6455db9235ffe30c66279f69342f3 (patch)
tree5a026110bb13f4a960f8012b69a340ce15fb2e86 /eclass
parentpython-r1.eclass: Remove stale EAPI=4 branch in globals (diff)
downloadgentoo-6024888985b6455db9235ffe30c66279f69342f3.tar.gz
gentoo-6024888985b6455db9235ffe30c66279f69342f3.tar.bz2
gentoo-6024888985b6455db9235ffe30c66279f69342f3.zip
python-r1.eclass: Refactor globals to use local vars, NFC
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-r1.eclass18
1 files changed, 10 insertions, 8 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 18f11fd597de..856f7554dd59 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -165,14 +165,13 @@ inherit multibuild python-utils-r1
# @CODE
_python_set_globals() {
- PYTHON_DEPS=
- local i PYTHON_PKG_DEP
+ local deps i PYTHON_PKG_DEP
_python_set_impls
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
python_export "${i}" PYTHON_PKG_DEP
- PYTHON_DEPS+="python_targets_${i}? ( ${PYTHON_PKG_DEP} ) "
+ deps+="python_targets_${i}? ( ${PYTHON_PKG_DEP} ) "
done
local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" )
@@ -186,10 +185,8 @@ _python_set_globals() {
local flags_st=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/-python_single_target_}" )
optflags+=,${flags_st[@]/%/(-)}
-
- IUSE=${flags[*]}
- PYTHON_REQUIRED_USE="|| ( ${flags[*]} )"
- PYTHON_USEDEP=${optflags// /,}
+ local requse="|| ( ${flags[*]} )"
+ local usedep=${optflags// /,}
# 1) well, python-exec would suffice as an RDEP
# but no point in making this overcomplex, BDEP doesn't hurt anyone
@@ -198,8 +195,13 @@ _python_set_globals() {
if [[ ${_PYTHON_WANT_PYTHON_EXEC2} == 0 ]]; then
die "python-exec:0 is no longer supported, please fix your ebuild to work with python-exec:2"
else
- PYTHON_DEPS+=">=dev-lang/python-exec-2:=[${PYTHON_USEDEP}]"
+ deps+=">=dev-lang/python-exec-2:=[${usedep}]"
fi
+
+ PYTHON_DEPS=${deps}
+ IUSE=${flags[*]}
+ PYTHON_REQUIRED_USE=${requse}
+ PYTHON_USEDEP=${usedep}
readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_USEDEP
}
_python_set_globals