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')