diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-02-04 19:47:20 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-02-09 09:43:51 +0100 |
commit | beda1fe93abc87691239919653283ab0c299e00b (patch) | |
tree | 264c573e678a424f952c89baba8c25ccc17e59a2 /eclass | |
parent | python-r1.eclass: Improve comment for USE-dep generation (diff) | |
download | gentoo-beda1fe93abc87691239919653283ab0c299e00b.tar.gz gentoo-beda1fe93abc87691239919653283ab0c299e00b.tar.bz2 gentoo-beda1fe93abc87691239919653283ab0c299e00b.zip |
python-utils-r1.eclass: Remove python_is_python3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 8 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 17 | ||||
-rwxr-xr-x | eclass/tests/python-utils-r1.sh | 5 |
3 files changed, 3 insertions, 27 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 0507551897b9..b4bbb7d67e04 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -333,11 +333,9 @@ unset -f _distutils_set_globals # (allowing any implementation). If multiple values are specified, # implementations matching any of the patterns will be accepted. # -# The patterns can be either fnmatch-style patterns (matched via bash -# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate -# appropriately all enabled Python 2/3 implementations (alike -# python_is_python3). Remember to escape or quote the fnmatch patterns -# to prevent accidental shell filename expansion. +# The patterns are fnmatch-style patterns (matched via bash == operator +# against PYTHON_COMPAT values). Remember to escape or quote the fnmatch +# patterns to prevent accidental shell filename expansion. # # If the restriction needs to apply conditionally to a USE flag, # the variable should be set conditionally as well (e.g. in an early diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 395e3e6420f4..29ff04d2892c 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -945,23 +945,6 @@ _python_wrapper_setup() { export PATH PKG_CONFIG_PATH } -# @FUNCTION: python_is_python3 -# @USAGE: [<impl>] -# @DESCRIPTION: -# Check whether <impl> (or ${EPYTHON}) is a Python3k variant -# (i.e. uses syntax and stdlib of Python 3.*). -# -# Returns 0 (true) if it is, 1 (false) otherwise. -python_is_python3() { - eqawarn "${FUNCNAME} is deprecated, as Python 2 is not supported anymore" - [[ ${EAPI} == [67] ]] || die "${FUNCNAME} banned in EAPI ${EAPI}" - - local impl=${1:-${EPYTHON}} - [[ ${impl} ]] || die "python_is_python3: no impl nor EPYTHON" - - [[ ${impl} == python3* || ${impl} == pypy3 ]] -} - # @FUNCTION: python_fix_shebang # @USAGE: [-f|--force] [-q|--quiet] <path>... # @DESCRIPTION: diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index 7ba4a864ff10..0244ce26ad0f 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -156,11 +156,6 @@ fi test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:0=' test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3 -test_is "python_is_python3 python2.7" 1 -test_is "python_is_python3 python3.2" 0 -test_is "python_is_python3 pypy" 1 -test_is "python_is_python3 pypy3" 0 - # generic shebangs test_fix_shebang '#!/usr/bin/python' python3.6 '#!/usr/bin/python3.6' test_fix_shebang '#!/usr/bin/python' pypy3 '#!/usr/bin/pypy3' |