FWIW, when the PEP517/PEP518 builds were implemented in Fedora, we copied pip’s behavior to only fallback to setuptools when there is a setup.py file. That behavior made sense to me, but it was not explicitly stated that way in the PEPs.
However, recently somebody reported that as a problem, stating that pip no longer requires existing setup.py file to default to setuptools when there is no build backend specified. This has happened in Fix PEP 660 metadata preparation fallback by sbidoul · Pull Request #10577 · pypa/pip · GitHub
I didn’t get back to changing the behavior in Fedora. I don’t think defaulting to setuptools without a setup.py file makes sense.
Context from PEP 517:
If the
pyproject.tomlfile is absent, or thebuild-backendkey is missing, the source tree is not using this specification, and tools should revert to the legacy behaviour of runningsetup.py(either directly, or by implicitly invoking thesetuptools.build_meta:__legacy__backend).
(Emphasis mine.)
From PEP 518:
If the file exists but is lacking the
[build-system]table then the default values[1] as specified above should be used.
requires = ["setuptools"]↩︎