From a0699585306aa9630fb7035215dc079dff4448ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Feb 2024 16:59:00 +0100 Subject: [PATCH] Document why we generate a dependency on wheel when the default build backend is used --- pyproject_buildrequires.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index e91111f..515da95 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -248,6 +248,14 @@ def get_backend(requirements): # with pyproject.toml without a specified build backend. # If the default requirements change, also change them in the macro! requirements.add('setuptools >= 40.8', source='default build backend') + # PEP 517 doesn't mandate depending on wheel when the default backend is used. + # Historically, it used to be assumed as necessary, but later it turned out to be wrong. + # See the removal in pip and build: + # https://github.com/pypa/pip/pull/12449 + # https://github.com/pypa/build/pull/716 + # However, the requirement *will* be generated by setuptools anyway + # as part of get_requires_for_build_wheel(). + # So we might as well keep it to skip one redundant step. requirements.add('wheel', source='default build backend') requirements.check(source='build backend')