8000 bootstrap: fix overriden setuptools PEP 517 hooks by gotmax23 · Pull Request #2612 · PyO3/maturin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bootstrap: fix overriden setuptools PEP 517 hooks #2612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025

Conversation

gotmax23
Copy link
Contributor

config_settings is not supposed to have an underscore as per PEP 517. This changes the argument name to adhere to the PEP. Currently, this breaks pyproject-rpm-macros (Python build frontend used by Fedora Linux) which tries to pass a kwarg named config_settings and blows up. (We are considering changing pyproject-rpm-macros to pass it as a positional argument like pyproject-hooks/pip does, but this fix is still valid.)

Additionally, the overriden get_requires_for_* hooks still should include the values from setuptools. Older setuptools versions include "wheel" here, for example.

@LecrisUT
Copy link

I believe the output can be an iterator? Using yield from might be more technically correct?

@gotmax23
Copy link
Contributor Author

Nope, the PEP requires a "list of strings" and that's what setuptools already returns.

config_settings is not supposed to have an underscore as per PEP 517.
This changes the argument name to adhere to the PEP.
Currently, this breaks pyproject-rpm-macros (Python build frontend used
by Fedora Linux) which tries to pass a kwarg named `config_settings` and
blows up. (We are considering changing pyproject-rpm-macros to pass it
as a positional argument like pyproject-hooks/pip does, but this fix is
still valid.)

Additionally, the overriden get_requires_for_* hooks still should
include the values from setuptools. Older setuptools versions include
"wheel" here, for example.
@messense messense merged commit 41fdeb5 into PyO3:main May 20, 2025
42 checks passed
jollaitbot pushed a commit to sailfishos-mirror/pyproject-rpm-macros that referenced this pull request Jun 21, 2025
PEP 517 says that the argument should be named config_settings but
pip/pyproject-hooks and other build frontends just pass it as a
positional argument, so some build backends name this argument other
things. Even though those build backends are wrong, it still makes sense
to align pyproject-rpm-macros with what the other frontends do.

Ref: PyO3/maturin#2612
Ref: Rogdham/pyzstd#2
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
0