-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Opt to check build dependencies #11117
Conversation
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.
LGTM, with one minor user-facing behaviour change suggestion.
This also needs a bugfix news entry along the lines of Change the build environment depedency checking to be opt-in.
and a test that conflicting dependencies don't warn when the flag is not passed.
Does/should this also control environment validation when build isolation is enabled? If not, it should be described in the help string. |
What do you mean by "environment validation"? |
Validate the requirements are installed correctly in the isolated environment. In other words, since we are making this build dependency check optional without build isolation, should we do the same when there is an isolated build environment? It makes sense to me to make that check optional as well, because since the isolated build environment was populated by pip in the first place, the requirement should theoratically be valid (at least if we use the modern resolver), and any errors should have been raised when the build requirements are being installed anyway. |
Well, we can add it in, in a follow up. I think it's useful, but I'd like to stop the "immediate bleeding" AKA you can't work on a project that depends on numpy until this is changed. :) |
Thank you, much appreciated! |
Agreed thank you all! 🙏 |
Would it be possible to get this in a release as well? |
@uranusjr but if not raising conflicting/missing reqs errors for isolated env, then it would be raised later. Should it be tested like this or what behavior is expected? def test_check_build_deps(
script: PipTestEnvironment, tmpdir: Path, data: TestData
) -> None:
project_dir = make_project(
tmpdir, requires=["test_backend", "simplewheel==1.0"], backend="test_backend"
)
project_dir.joinpath("backend_reqs.txt").write_text("simplewheel==2.0")
result = script.pip(
"install",
"--no-index",
"-f",
data.backends,
"-f",
data.packages,
project_dir,
expect_error=True,
)
assert result.returncode != 0 |
@pradyunsg @q0w thank you for working this out. Just to clarify, do you intend to cut a new release soon ? This can easily be mitigated downstream but I’m hesitant to introduce temporary workarounds that may become useless a couple days later. |
Yup, I plan on cutting a release in the next few days. |
Closes #11116