Skip to content
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

Simplify _should_build #13232

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

Simplify _should_build #13232

wants to merge 4 commits into from

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Feb 23, 2025

This is a suite of simple commits to simplify _should_build, as the circumstances in which it is invoked have evolved over time.

Each individual commit explains the reasoning.

towards #11457

The only call sites are in pip install in pip wheel,
after resolution, so there are never constraint requirements there.
In pip wheel, we always want wheels, of course.
should_build_for_wheel_command was only called when is_wheel is False,
so the logging statement part of _should_build was never reached.
Since this is the only side effect and _should_build otherwise always return
true in these circumstances, it can be removed.
The need_wheel argument is now always False
@sbidoul sbidoul added skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes labels Feb 23, 2025
It is a remnant of the `setup.py install` era, and we can safely assume it is always set.
@sbidoul
Copy link
Member Author

sbidoul commented Feb 23, 2025

I think should_build_for_wheel_command became a no-op with #8843.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants