Skip to content
New issue

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

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

Already on GitHub? # to your account

Stop injecting wheel as a build dep fallback #716

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

webknjaz
Copy link
Member

PEP 517 doesn't mandate depending on wheel when a __legacy__ setuptools fallback is used. Historically, it used to be assumed as necessary, but later it turned out to be wrong. The reason is that setuptools' get_requires_for_build_wheel() hook already injects this dependency when building wheels is requested [1]. It also used to have this hint in the docs, but it was corrected earlier [2].

This patch removes wheel from said requires list fallback.

@webknjaz
Copy link
Member Author

Motivation/backstory: I was reading https://gregoryszorc.com/blog/2023/10/30/my-user-experience-porting-off-setup.py/ (it was shared @ pypa/packaging.python.org#1468) and it got me puzzled — I thought I'd gotten rid of all the prominent places newbies may copy-and-paste the suggestion to depend on wheel unconditionally...

@webknjaz webknjaz force-pushed the maintenance/pep517-fallback-wheel branch from 18cb2c1 to f951176 Compare December 23, 2023 02:38
@webknjaz
Copy link
Member Author

Similar PR in pip: pypa/pip#12449.

PEP 517 doesn't mandate depending on `wheel` when a `__legacy__`
setuptools fallback is used. Historically, it used to be assumed as
necessary, but later it turned out to be wrong. The reason is that
`setuptools`' `get_requires_for_build_wheel()` hook already injects
this dependency when building wheels is requested [[1]].
It also used to have this hint in the docs, but it was corrected
earlier [[2]].

This patch removes `wheel` from said `requires` list fallback.

[1]: https://github.com/pypa/setuptools/blob/v40.8.0/setuptools/build_meta.py#L130
[2]: pypa/setuptools#3056
@layday layday force-pushed the maintenance/pep517-fallback-wheel branch from f951176 to a7e3545 Compare January 17, 2024 09:21
@henryiii henryiii merged commit 0aced36 into pypa:main Jan 17, 2024
@henryiii
Copy link
Contributor

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants