From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 993A0158086 for ; Sun, 9 Jan 2022 08:16:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F37152BC01B; Sun, 9 Jan 2022 08:15:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 C307B2BC009 for ; Sun, 9 Jan 2022 08:15:52 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] install-qa-check.d: do not request DISTUTILS_USE_SETUPTOOLS=no Date: Sun, 9 Jan 2022 09:15:48 +0100 Message-Id: <20220109081548.123208-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 9efd3b7b-18f8-4c20-86f4-f3b6af9231d2 X-Archives-Hash: 5c3544a578770c1a8426cfa747d5f040 The Python distutils deprecation is for real, and nowadays setuptools installs hacks that override distutils with their own bundled version. For this reason, the check no longer works reliably and even if it were, we will eventually be requiring setuptools on all Python packages. Avoid asking people to set DISTUTILS_USE_SETUPTOOLS=no; allow either "no" or "bdepend" for the time being. Signed-off-by: Michał Górny --- metadata/install-qa-check.d/60distutils-use-setuptools | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools index a7905c3f0b2f..6b3d063c73cf 100644 --- a/metadata/install-qa-check.d/60distutils-use-setuptools +++ b/metadata/install-qa-check.d/60distutils-use-setuptools @@ -1,4 +1,4 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # QA check: verify correctness of DISTUTILS_USE_SETUPTOOLS @@ -63,6 +63,10 @@ distutils_use_setuptools_check() { eerror "https://dev.gentoo.org/~mgorny/python-guide/distutils.html#conditional-distutils-setuptools-use-in-packages" eerror "Please report a bug about this and CC python@" else + # now that distutils is deprecated and setuptools hacks its own + # version in, the check no longer works reliably. just assume + # either "bdepend" or "no" is fine for the time being + [[ ${expected} == no ]] && expected+=( bdepend ) # if we did not find anything, also assume 'no' is desired, # we do not want the setuptools dep [[ ${#expected[@]} -eq 0 ]] && expected=( no ) @@ -71,8 +75,6 @@ distutils_use_setuptools_check() { # NB: note that expected is overwritten above, so this implies !rdepend # if the package is using entry points, modern versions of setuptools # use built-in importlib.metadata module, so no rdep needed anymore - # NB2: this is incorrect for pypy3.7 but we ignore this for the time - # being has entry-point "${expected[@]}" && expected=( bdepend ) if ! has ${DISTUTILS_USE_SETUPTOOLS} "${expected[@]}"; then -- 2.34.1