• [gentoo-dev] [PATCH] install-qa-check.d: do not request DISTUTILS_USE_S

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sun Jan 9 09:20:02 2022
    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 <mgorny@gentoo.org>
    ---
    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 +
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to All on Sun Jan 9 09:30:02 2022
    On Sun, 2022-01-09 at 09:15 +0100, Michał Górny wrote:
    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.


    To be clearer:

    If you have setuptools-60+ installed (currently p.masked but not for
    very long), the check will always detect setuptools and demand "bdepend"
    from packages using pure distutils. With older setuptools, the current
    version will demand "no" instead -- effectively two devs could get
    conflicting demands.

    This change prevents that by allowing "bdepend" or "no" with
    setuptools<60. Setuptools 60+ will still demand "bdepend" and this is
    where we'll all eventually end up.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)