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 7C361158087 for ; Sun, 16 Jan 2022 09:40:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA3BCE0823; Sun, 16 Jan 2022 09:40:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A3958E0823 for ; Sun, 16 Jan 2022 09:40:56 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7B9F734301F for ; Sun, 16 Jan 2022 09:40:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E63CA268 for ; Sun, 16 Jan 2022 09:40:53 +0000 (UTC) From: "Michał Górny" 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" Message-ID: <1642326049.f344326fa3c3653d85acf12bf053bfd98f354c56.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: metadata/install-qa-check.d/ X-VCS-Repository: repo/gentoo X-VCS-Files: metadata/install-qa-check.d/60distutils-use-setuptools X-VCS-Directories: metadata/install-qa-check.d/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: f344326fa3c3653d85acf12bf053bfd98f354c56 X-VCS-Branch: master Date: Sun, 16 Jan 2022 09:40:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9c184fa9-4e61-4566-8ba0-49d4a40b55e2 X-Archives-Hash: 53e78af3183c0d0360757062d9c314fa commit: f344326fa3c3653d85acf12bf053bfd98f354c56 Author: Michał Górny gentoo org> AuthorDate: Sun Jan 16 09:39:03 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Jan 16 09:40:49 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f344326f install-qa-check.d: Remove 60distutils-use-setuptools Remove the DISTUTILS_USE_SETUPTOOLS correctness check that is misfiring once again (with setuptools-60+). All the special cases it was supposed to detect are no longer relevant, and the upcoming PEP 517 mode deprecates DUS entirely. Signed-off-by: Michał Górny gentoo.org> .../install-qa-check.d/60distutils-use-setuptools | 97 ---------------------- 1 file changed, 97 deletions(-) diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools deleted file mode 100644 index a7905c3f0b2f..000000000000 --- a/metadata/install-qa-check.d/60distutils-use-setuptools +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2020-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# QA check: verify correctness of DISTUTILS_USE_SETUPTOOLS -# Maintainer: Python project - -distutils_use_setuptools_check() { - # applicable only to ebuilds inheriting distutils-r1 - [[ ${_DISTUTILS_R1} ]] || return - # 'manual' means no checking - [[ ${DISTUTILS_USE_SETUPTOOLS} == manual ]] && return - # pyproject.toml is verified by using it - [[ ${DISTUTILS_USE_SETUPTOOLS} == pyproject.toml ]] && return - - # setuptools dep is not set if distutils is optional - if [[ ${DISTUTILS_OPTIONAL} ]]; then - if [[ ${DISTUTILS_USE_SETUPTOOLS} != bdepend ]]; then - eerror "QA Notice: DISTUTILS_USE_SETUPTOOLS is not used when DISTUTILS_OPTIONAL" - eerror "is enabled." - fi - return - fi - - local expected=() - for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - local EPYTHON PYTHON - _python_export "${impl}" EPYTHON PYTHON - [[ -x ${PYTHON} ]] || continue - local sitedir=${D}$(python_get_sitedir) - if [[ -d ${sitedir} ]]; then - local egg new_expected - while read -d $'\0' -r egg; do - if [[ -f ${egg} ]]; then - # if .egg-info is a file, it's plain distutils - new_expected=no - elif [[ -f ${egg}/requires.txt ]] && - grep -q -s '^setuptools' \ - <(sed -e '/^\[/,$d' "${egg}"/requires.txt) - then - # explicit *unconditional* rdepend in package metadata - new_expected=rdepend - elif grep -q -s '\[\(console\|gui\)_scripts\]' \ - "${egg}"/entry_points.txt - then - new_expected=entry-point - else - new_expected=bdepend - fi - - if ! has "${new_expected}" "${expected[@]}"; then - expected+=( "${new_expected[@]}" ) - fi - done < <(find "${sitedir}" -name '*.egg-info' -print0) - fi - done - - if [[ ${#expected[@]} -gt 1 ]] && has no "${expected[@]}"; then - # 'no' and '[rb]depend' are mutually exclusive - eerror "QA Notice: The package seems to have used distutils and setuptools" - eerror "simultaneously" - eerror "" - eerror "This could mean the package has bad conditions:" - 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 - # if we did not find anything, also assume 'no' is desired, - # we do not want the setuptools dep - [[ ${#expected[@]} -eq 0 ]] && expected=( no ) - # *+rdepend=rdepend - has rdepend "${expected[@]}" && expected=( rdepend ) - # 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 - local def= - [[ ${DISTUTILS_USE_SETUPTOOLS} == bdepend ]] && def=' (or unset)' - - eqawarn "QA Notice: DISTUTILS_USE_SETUPTOOLS value is probably incorrect" - eqawarn " have: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}" - if [[ ${expected[0]} == bdepend ]]; then - eqawarn " expected: (unset)" - else - eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected[0]}" - fi - fi - fi -} - -distutils_use_setuptools_check - -: # guarantee successful exit - -# vim:ft=ebuild