1 |
commit: beda1fe93abc87691239919653283ab0c299e00b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 4 18:47:20 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 9 08:43:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beda1fe9 |
7 |
|
8 |
python-utils-r1.eclass: Remove python_is_python3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
eclass/distutils-r1.eclass | 8 +++----- |
13 |
eclass/python-utils-r1.eclass | 17 ----------------- |
14 |
eclass/tests/python-utils-r1.sh | 5 ----- |
15 |
3 files changed, 3 insertions(+), 27 deletions(-) |
16 |
|
17 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
18 |
index 0507551897b9..b4bbb7d67e04 100644 |
19 |
--- a/eclass/distutils-r1.eclass |
20 |
+++ b/eclass/distutils-r1.eclass |
21 |
@@ -333,11 +333,9 @@ unset -f _distutils_set_globals |
22 |
# (allowing any implementation). If multiple values are specified, |
23 |
# implementations matching any of the patterns will be accepted. |
24 |
# |
25 |
-# The patterns can be either fnmatch-style patterns (matched via bash |
26 |
-# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate |
27 |
-# appropriately all enabled Python 2/3 implementations (alike |
28 |
-# python_is_python3). Remember to escape or quote the fnmatch patterns |
29 |
-# to prevent accidental shell filename expansion. |
30 |
+# The patterns are fnmatch-style patterns (matched via bash == operator |
31 |
+# against PYTHON_COMPAT values). Remember to escape or quote the fnmatch |
32 |
+# patterns to prevent accidental shell filename expansion. |
33 |
# |
34 |
# If the restriction needs to apply conditionally to a USE flag, |
35 |
# the variable should be set conditionally as well (e.g. in an early |
36 |
|
37 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
38 |
index 395e3e6420f4..29ff04d2892c 100644 |
39 |
--- a/eclass/python-utils-r1.eclass |
40 |
+++ b/eclass/python-utils-r1.eclass |
41 |
@@ -945,23 +945,6 @@ _python_wrapper_setup() { |
42 |
export PATH PKG_CONFIG_PATH |
43 |
} |
44 |
|
45 |
-# @FUNCTION: python_is_python3 |
46 |
-# @USAGE: [<impl>] |
47 |
-# @DESCRIPTION: |
48 |
-# Check whether <impl> (or ${EPYTHON}) is a Python3k variant |
49 |
-# (i.e. uses syntax and stdlib of Python 3.*). |
50 |
-# |
51 |
-# Returns 0 (true) if it is, 1 (false) otherwise. |
52 |
-python_is_python3() { |
53 |
- eqawarn "${FUNCNAME} is deprecated, as Python 2 is not supported anymore" |
54 |
- [[ ${EAPI} == [67] ]] || die "${FUNCNAME} banned in EAPI ${EAPI}" |
55 |
- |
56 |
- local impl=${1:-${EPYTHON}} |
57 |
- [[ ${impl} ]] || die "python_is_python3: no impl nor EPYTHON" |
58 |
- |
59 |
- [[ ${impl} == python3* || ${impl} == pypy3 ]] |
60 |
-} |
61 |
- |
62 |
# @FUNCTION: python_fix_shebang |
63 |
# @USAGE: [-f|--force] [-q|--quiet] <path>... |
64 |
# @DESCRIPTION: |
65 |
|
66 |
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh |
67 |
index 7ba4a864ff10..0244ce26ad0f 100755 |
68 |
--- a/eclass/tests/python-utils-r1.sh |
69 |
+++ b/eclass/tests/python-utils-r1.sh |
70 |
@@ -156,11 +156,6 @@ fi |
71 |
test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:0=' |
72 |
test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3 |
73 |
|
74 |
-test_is "python_is_python3 python2.7" 1 |
75 |
-test_is "python_is_python3 python3.2" 0 |
76 |
-test_is "python_is_python3 pypy" 1 |
77 |
-test_is "python_is_python3 pypy3" 0 |
78 |
- |
79 |
# generic shebangs |
80 |
test_fix_shebang '#!/usr/bin/python' python3.6 '#!/usr/bin/python3.6' |
81 |
test_fix_shebang '#!/usr/bin/python' pypy3 '#!/usr/bin/pypy3' |