1 |
commit: afda6ba12b1e96a5a2f487ec26b67802e39c7152 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 6 11:52:49 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 11 20:31:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afda6ba1 |
7 |
|
8 |
distutils-r1.eclass: Require EPYTHON to be set |
9 |
|
10 |
There is no context in which the function is called without EPYTHON |
11 |
set, so require it to be set instead of adding a fallback. |
12 |
|
13 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
14 |
|
15 |
eclass/distutils-r1.eclass | 4 +++- |
16 |
1 file changed, 3 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
19 |
index cb64938c8c3..780becc3ace 100644 |
20 |
--- a/eclass/distutils-r1.eclass |
21 |
+++ b/eclass/distutils-r1.eclass |
22 |
@@ -518,6 +518,8 @@ distutils_enable_tests() { |
23 |
esetup.py() { |
24 |
debug-print-function ${FUNCNAME} "${@}" |
25 |
|
26 |
+ [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context" |
27 |
+ |
28 |
local die_args=() |
29 |
[[ ${EAPI} != [45] ]] && die_args+=( -n ) |
30 |
|
31 |
@@ -529,7 +531,7 @@ esetup.py() { |
32 |
setup_py=( -m pyproject2setuppy.main ) |
33 |
fi |
34 |
|
35 |
- set -- "${EPYTHON:-python}" "${setup_py[@]}" "${mydistutilsargs[@]}" "${@}" |
36 |
+ set -- "${EPYTHON}" "${setup_py[@]}" "${mydistutilsargs[@]}" "${@}" |
37 |
|
38 |
echo "${@}" >&2 |
39 |
"${@}" || die "${die_args[@]}" |