Skip to content

[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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented May 22, 2025

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 with setup.py.
Currently no_install_setup_requires is patching the distribution class that is already patched by setuptools.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


return SetupRequirementsError

raise AttributeError(name)
Copy link
Contributor Author

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).

@abravalheri abravalheri changed the title [Exploration] Reduce the amount o patching in setuptools.build_meta [Investigation] Reduce the amount o patching in setuptools.build_meta May 22, 2025
@abravalheri abravalheri changed the title [Investigation] Reduce the amount o patching in setuptools.build_meta [Investigation] Reduce the amount of patching in setuptools.build_meta May 22, 2025
@abravalheri abravalheri marked this pull request as ready for review May 23, 2025 09:02
@abravalheri abravalheri requested a review from jaraco May 23, 2025 09:02
@abravalheri
Copy link
Contributor Author

@jaraco is this direction something that makes sense to investigate?

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.

1 participant