From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1365980-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0A2FA15808C for <garchives@archives.gentoo.org>; Wed, 9 Feb 2022 09:39:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 707ECE0917; Wed, 9 Feb 2022 09:39:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4907BE0917 for <gentoo-commits@lists.gentoo.org>; Wed, 9 Feb 2022 09:39:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35D8A340FB2 for <gentoo-commits@lists.gentoo.org>; Wed, 9 Feb 2022 09:39:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB5AE2D3 for <gentoo-commits@lists.gentoo.org>; Wed, 9 Feb 2022 09:39:30 +0000 (UTC) From: "Michał Górny" <mgorny@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org> Message-ID: <1644396231.beda1fe93abc87691239919653283ab0c299e00b.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/, eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/distutils-r1.eclass eclass/python-utils-r1.eclass eclass/tests/python-utils-r1.sh X-VCS-Directories: eclass/tests/ eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: beda1fe93abc87691239919653283ab0c299e00b X-VCS-Branch: master Date: Wed, 9 Feb 2022 09:39:30 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 96ae0f2a-121e-4d7e-8bb0-cda060cea704 X-Archives-Hash: 899d617c33c418f40eca81a57d815656 commit: beda1fe93abc87691239919653283ab0c299e00b Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Fri Feb 4 18:47:20 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Feb 9 08:43:51 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beda1fe9 python-utils-r1.eclass: Remove python_is_python3 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> eclass/distutils-r1.eclass | 8 +++----- eclass/python-utils-r1.eclass | 17 ----------------- 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'