Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Mar 8, 2025

Add the missing build-system section to fix compatibility with strict PEP 517 installers. Per PEP 517, projects are required to either specify a backend explicitly or (for compatibility with legacy projects) provide a setup.py file.

Add the missing `build-system` section to fix compatibility with strict
PEP 517 installers.  Per PEP 517, projects are required to either
specify a backend explicitly *or* (for compatibility with legacy
projects) provide a `setup.py` file.
@CLAassistant
Copy link

CLAassistant commented Mar 8, 2025

CLA assistant check
All committers have signed the CLA.

@woodruffw
Copy link
Member

LGTM, thanks!

Per PEP 517, projects are required to either specify a backend explicitly or (for compatibility with legacy projects) provide a setup.py file.

FWIW, this isn't my read of the spec: PEP 517 says:

Where the build-backend key exists, this takes precedence and the source tree follows the format and conventions of the specified backend (as such no setup.py is needed unless the backend requires it). Projects may still wish to include a setup.py for compatibility with tools that do not use this spec.

In other words: setup.py is not needed for strict compatibility, but for installers that don't follow PEP 517 yet. My understanding of PEP 517 is that the absence of a build-backend when pyproject.toml is present means that the installer is expected to invoke setuptools.build_meta:__legacy__.

(However, I recognize the spec could be read both ways, and I don't really feel 100% confident about the above. Besides, your change is much more explicit anyways 🙂)

@woodruffw
Copy link
Member

CI failure due to PR permissions, NFC.

@woodruffw woodruffw merged commit 601c3a9 into pypi:main Mar 10, 2025
2 of 7 checks passed
@mgorny mgorny deleted the build-system branch March 10, 2025 15:38
@mgorny
Copy link
Contributor Author

mgorny commented Mar 10, 2025

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants