-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
pip-build-hook: enable validation of build dependencies #1431
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.
Thank you! Would you be OK to include a copy of a relevant error message in the ticket, for reference?
Added an example to the issue body, getting it to trigger intentionally was trickier than I expected |
One difficulty here is that this check enforces version constraints, which I think might make adding the build time dependency check a non-starter without some |
Another issue is that this flag results in a failure for packages that are missing build time dependencies that are circular. In some cases we have to remove those build time dependencies to prevent infinite recursion. So, for example, if we add the flag we'd need to add jupyterlab as a build time dependency to jupyterlab-widgets which would pass the build time check but then fail with an infinite recursion error later. |
I do think there's value in checking for missing build-time dependencies but I'm not sure how to surface only those and ignore the errors coming from constraint violations. |
Happy to accept the changes other than the build hook modification, merge those shortly! |
Passing locally on:
|
Per https://pip.pypa.io/en/stable/cli/pip_wheel/#cmdoption-check-build-dependencies
It turns out that unlike pypa, pip only checks build dependencies if it is told to.
This makes the missing build dependencies a lot clearer, since it immediately lists all missing dependencies rather than fail when it can't find them.
Example output for
uri-template
:This change turns out to have surfaced a few hidden bugs with existing test cases, additional commits fix these issues.
Contribution checklist (recommended but not always applicable/required):