1 |
Signed-off-by: Michał Górny <mgorny@g.o> |
2 |
--- |
3 |
eclass/python-any-r2.eclass | 2 +- |
4 |
eclass/python-r2.eclass | 2 +- |
5 |
eclass/python-utils-r2.eclass | 5 +++-- |
6 |
3 files changed, 5 insertions(+), 4 deletions(-) |
7 |
|
8 |
diff --git a/eclass/python-any-r2.eclass b/eclass/python-any-r2.eclass |
9 |
index c680d383fef6..b85de5f7b32d 100644 |
10 |
--- a/eclass/python-any-r2.eclass |
11 |
+++ b/eclass/python-any-r2.eclass |
12 |
@@ -262,7 +262,7 @@ _python_EPYTHON_supported() { |
13 |
esac |
14 |
|
15 |
if has "${i}" "${_PYTHON_SUPPORTED_IMPLS[@]}"; then |
16 |
- if python_is_installed "${i}"; then |
17 |
+ if _python_is_installed "${i}"; then |
18 |
if declare -f python_check_deps >/dev/null; then |
19 |
local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)" |
20 |
python_check_deps |
21 |
diff --git a/eclass/python-r2.eclass b/eclass/python-r2.eclass |
22 |
index 64b3742fc08f..a96098fe65cf 100644 |
23 |
--- a/eclass/python-r2.eclass |
24 |
+++ b/eclass/python-r2.eclass |
25 |
@@ -723,7 +723,7 @@ python_setup() { |
26 |
# if python_check_deps() is declared, switch into any-of mode |
27 |
if [[ ${has_check_deps} ]]; then |
28 |
# first check if the interpreter is installed |
29 |
- python_is_installed "${impl}" || continue |
30 |
+ _python_is_installed "${impl}" || continue |
31 |
# then run python_check_deps |
32 |
local PYTHON_USEDEP="python_targets_${impl}(-),python_single_target_${impl}(+)" |
33 |
python_check_deps || continue |
34 |
diff --git a/eclass/python-utils-r2.eclass b/eclass/python-utils-r2.eclass |
35 |
index b49cd7cc6341..7d1ef1da2b04 100644 |
36 |
--- a/eclass/python-utils-r2.eclass |
37 |
+++ b/eclass/python-utils-r2.eclass |
38 |
@@ -1062,14 +1062,15 @@ python_is_python3() { |
39 |
[[ ${impl} == python3* || ${impl} == pypy3 ]] |
40 |
} |
41 |
|
42 |
-# @FUNCTION: python_is_installed |
43 |
+# @FUNCTION: _python_is_installed |
44 |
# @USAGE: [<impl>] |
45 |
+# @INTERNAL |
46 |
# @DESCRIPTION: |
47 |
# Check whether the interpreter for <impl> (or ${EPYTHON}) is installed. |
48 |
# Uses has_version with a proper dependency string. |
49 |
# |
50 |
# Returns 0 (true) if it is, 1 (false) otherwise. |
51 |
-python_is_installed() { |
52 |
+_python_is_installed() { |
53 |
local impl=${1:-${EPYTHON}} |
54 |
[[ ${impl} ]] || die "${FUNCNAME}: no impl nor EPYTHON" |
55 |
local hasv_args=() |
56 |
-- |
57 |
2.25.1 |