1 |
commit: 6024888985b6455db9235ffe30c66279f69342f3 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 1 08:44:02 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 8 07:35:47 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60248889 |
7 |
|
8 |
python-r1.eclass: Refactor globals to use local vars, NFC |
9 |
|
10 |
eclass/python-r1.eclass | 18 ++++++++++-------- |
11 |
1 file changed, 10 insertions(+), 8 deletions(-) |
12 |
|
13 |
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass |
14 |
index 18f11fd597d..856f7554dd5 100644 |
15 |
--- a/eclass/python-r1.eclass |
16 |
+++ b/eclass/python-r1.eclass |
17 |
@@ -165,14 +165,13 @@ inherit multibuild python-utils-r1 |
18 |
# @CODE |
19 |
|
20 |
_python_set_globals() { |
21 |
- PYTHON_DEPS= |
22 |
- local i PYTHON_PKG_DEP |
23 |
+ local deps i PYTHON_PKG_DEP |
24 |
|
25 |
_python_set_impls |
26 |
|
27 |
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do |
28 |
python_export "${i}" PYTHON_PKG_DEP |
29 |
- PYTHON_DEPS+="python_targets_${i}? ( ${PYTHON_PKG_DEP} ) " |
30 |
+ deps+="python_targets_${i}? ( ${PYTHON_PKG_DEP} ) " |
31 |
done |
32 |
|
33 |
local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" ) |
34 |
@@ -186,10 +185,8 @@ _python_set_globals() { |
35 |
|
36 |
local flags_st=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/-python_single_target_}" ) |
37 |
optflags+=,${flags_st[@]/%/(-)} |
38 |
- |
39 |
- IUSE=${flags[*]} |
40 |
- PYTHON_REQUIRED_USE="|| ( ${flags[*]} )" |
41 |
- PYTHON_USEDEP=${optflags// /,} |
42 |
+ local requse="|| ( ${flags[*]} )" |
43 |
+ local usedep=${optflags// /,} |
44 |
|
45 |
# 1) well, python-exec would suffice as an RDEP |
46 |
# but no point in making this overcomplex, BDEP doesn't hurt anyone |
47 |
@@ -198,8 +195,13 @@ _python_set_globals() { |
48 |
if [[ ${_PYTHON_WANT_PYTHON_EXEC2} == 0 ]]; then |
49 |
die "python-exec:0 is no longer supported, please fix your ebuild to work with python-exec:2" |
50 |
else |
51 |
- PYTHON_DEPS+=">=dev-lang/python-exec-2:=[${PYTHON_USEDEP}]" |
52 |
+ deps+=">=dev-lang/python-exec-2:=[${usedep}]" |
53 |
fi |
54 |
+ |
55 |
+ PYTHON_DEPS=${deps} |
56 |
+ IUSE=${flags[*]} |
57 |
+ PYTHON_REQUIRED_USE=${requse} |
58 |
+ PYTHON_USEDEP=${usedep} |
59 |
readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_USEDEP |
60 |
} |
61 |
_python_set_globals |