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 54D16158094 for ; Sun, 2 Oct 2022 16:18:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00EFEE0901; Sun, 2 Oct 2022 16:18:49 +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 BD333E08FB for ; Sun, 2 Oct 2022 16:18:48 +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 1/4] distutils-r1.eclass: Remove obsolete DUS=pyproject.toml support Date: Sun, 2 Oct 2022 18:18:37 +0200 Message-Id: <20221002161840.5552-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.37.3 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: 40123df6-cec2-48a1-8640-7bac70bcd41d X-Archives-Hash: ec274bbee5347cb73b3d964cf5d67dfc Remove the obsolete code branches for DISTUTILS_USE_SETUPTOOLS pyproject.toml variant. dev-python/pyproject2setuppy is last rited now and there are no consumers of that mode left in ::gentoo. Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 60f81473c0a6..d011e5f97ad9 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -150,9 +150,6 @@ esac # # - rdepend -- add it to BDEPEND+RDEPEND (e.g. when using pkg_resources) # -# - pyproject.toml -- use pyproject2setuptools to install a project -# using pyproject.toml (flit, poetry...) -# # - manual -- do not add the dependency and suppress the checks # (assumes you will take care of doing it correctly) # @@ -293,7 +290,7 @@ _distutils_set_globals() { rdep+=" ${setuptools_dep}" ;; pyproject.toml) - bdep+=' >=dev-python/pyproject2setuppy-22[${PYTHON_USEDEP}]' + die "DISTUTILS_USE_SETUPTOOLS=pyproject.toml is no longer supported, use DISTUTILS_USE_PEP517" ;; *) die "Invalid DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}" @@ -668,9 +665,7 @@ esetup.py() { fi local setup_py=( setup.py ) - if [[ ${DISTUTILS_USE_SETUPTOOLS} == pyproject.toml ]]; then - setup_py=( -m pyproject2setuppy ) - elif [[ ! -f setup.py ]]; then + if [[ ! -f setup.py ]]; then if [[ ! -f setup.cfg ]]; then die "${FUNCNAME}: setup.py nor setup.cfg not found" fi @@ -883,12 +878,10 @@ _distutils-r1_handle_pyproject_toml() { [[ ${DISTUTILS_USE_SETUPTOOLS} == manual ]] && return if [[ ! -f setup.py && -f pyproject.toml ]]; then - if [[ ${DISTUTILS_USE_SETUPTOOLS} != pyproject.toml ]]; then - eerror "No setup.py found but pyproject.toml is present. Please migrate" - eerror "the package to use DISTUTILS_USE_PEP517. See:" - eerror " https://projects.gentoo.org/python/guide/distutils.html" - die "No setup.py found and PEP517 mode not enabled" - fi + eerror "No setup.py found but pyproject.toml is present. Please migrate" + eerror "the package to use DISTUTILS_USE_PEP517. See:" + eerror " https://projects.gentoo.org/python/guide/distutils.html" + die "No setup.py found and PEP517 mode not enabled" fi } -- 2.37.3