Conversation
3980c84 to
a124c41
Compare
a124c41 to
84f7870
Compare
8625949 to
5958129
Compare
3b4e2a0 to
9a20518
Compare
|
Added a couple of tests and rebased. This is ready to review and merge. |
9a20518 to
b8093de
Compare
b8093de to
7a87682
Compare
7a87682 to
51c78b4
Compare
|
I've rebased this to check how it combines with the other related deprecations. Using |
src/pip/_internal/req/req_install.py
Outdated
| "--install-option is deprecated because " | ||
| "it forces pip to use the 'setup.py install' " | ||
| "command which is itself deprecated." | ||
| ), |
There was a problem hiding this comment.
To be precise, --install-option is ignored when --use-pep517 is enabled, so this deprecation may now appear when it is actually ignored.
There was a problem hiding this comment.
So I added some logic to print a warning instead when pep 517 is enabled.
Before 'build' was never called in presence of install_option/global_option/build_option. Now that it can build in such cases, pass these options as well, for consistency with the wheel command.
Due to building with pep 517.
| global_options=[], | ||
| global_options=global_options, |
There was a problem hiding this comment.
Hmm this one’s unexpected. Why was it []…?
There was a problem hiding this comment.
Actually, the only way to reach this point when --global-option is present, is to --use-pep517.
By passing it here, we trigger the warning in wheel_builder that global options are ignored when doing pep 517 builds.
This should help nudging users to use --config-settings.
There was a problem hiding this comment.
I guess what I’m wondering is mostly, was it a bug global_options wasn’t passed previously?
There was a problem hiding this comment.
was it a bug
Yes and no. The only "bug" was that --global-option was ignored without warning in pep 517 mode.
Towards #8102 and #11358.
This PR does the following:
--install-options.check_install_build_globalintocheck_legacy_setup_py_optionsthat is called after parsing the requirements from CLI options and req files. This allows us to reason about these options in the context of the command for which they are used, and also avoids a side effect (disallow_binaries) in the req file parserDisabling all use of wheels due to the use of --build-option / --global-option / --install-option.intoImplying --no-binary=:all: due to the presence of --build-option / --global-option / --install-option. Consider using --config-settings for more flexibility.. This is clearer and will help understanding when we disentangle--no-binary. Fixes Confusing message when pip wheel is used with --(global|build)-option #8406.TODO