-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Investigation] Reduce the amount of patching in setuptools.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 our terms of service and privacy 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?
Conversation
…explicit CLI flags
|
||
return SetupRequirementsError | ||
|
||
raise AttributeError(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 reason SetupRequirementsError
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 use SetupRequirementsError
to add dynamic build requirements because https://setuptools.pypa.io/en/stable/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks does not work in some cases due to setuptools
invoking setup.py
during get_requires_for_build_wheel
.
If this gets removed, what's the recommended alternative?
setuptools.build_meta
setuptools.build_meta
setuptools.build_meta
setuptools.build_meta
@jaraco is this direction something that makes sense to investigate? |
Summary of changes
This started as an exercise in #4973 (comment)
The idea is to avoid all the patching involved in making
setuptools.build_meta
compatible withsetup.py
.Currently
no_install_setup_requires
is 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/
.(See documentation for details)