Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.3k
[Investigation] Reduce the amount of patching insetuptools.build_meta#5008
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| returnSetupRequirementsError | ||
| raiseAttributeError(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For some reasonSetupRequirementsError has been listed in__all__, so this__getattr__ and deprecation warning are here just to be on the safe side (and be very conservative regarding breaking changes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hi, I'm trying to useSetupRequirementsError to add dynamic build requirements becausehttps://setuptools.pypa.io/en/stable/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks does not work insome cases due tosetuptools invokingsetup.py duringget_requires_for_build_wheel.
If this gets removed, what's the recommended alternative?
setuptools.build_metasetuptools.build_metasetuptools.build_metasetuptools.build_metaabravalheri commentedMay 23, 2025
@jaraco is this direction something that makes sense to investigate? |
Uh oh!
There was an error while loading.Please reload this page.
Summary of changes
This started as an exercise in#4973 (comment)
The idea is to avoid all the patching involved in making
setuptools.build_metacompatible withsetup.py.Currently
no_install_setup_requiresis patching the distribution class that is already patched bysetuptools.monkey. It looks very fragile.(Granted, this PR replaces patching with magic argv flags + a bunch of
if-statements, but that can be slightly better?)Closes
Pull Request Checklist
newsfragments/.(Seedocumentation for details)