Expand on pip compile default differences (#4306)

This commit is contained in:
Charlie Marsh 2024-06-13 07:18:52 -07:00 committed by GitHub
parent b1bf7f0524
commit 39b8c06842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 7 deletions

View File

@ -368,16 +368,20 @@ Specifically, uv does not support installing new `.egg-info`- or `.egg-link`-sty
but will respect any such existing distributions during resolution, list them with `uv pip list` and but will respect any such existing distributions during resolution, list them with `uv pip list` and
`uv pip freeze`, and uninstall them with `uv pip uninstall`. `uv pip freeze`, and uninstall them with `uv pip uninstall`.
## `pip compile` ## `pip compile` defaults
There are a few small but notable differences in the default behaviors of `pip compile` and There are a few small but notable differences in the default behaviors of `pip compile` and
`pip-tools`. `pip-tools`.
uv does not write the compiled requirements to file by default. Use the `-o` or `--output-file` By default, uv does not write the compiled requirements to an output file. Instead, uv requires
option. that the user specify an output file explicitly with the `-o` or `--output-file` option.
Currently, `pip-compile` defaults to `--no-strip-extras`, though this is scheduled to change in the By default, uv strips extras when outputting the compiled requirements. In other words, uv defaults to
next major release. `--strip-extras`, while `pip-compile` defaults to `--no-strip-extras`. `pip-compile` is scheduled to
change this default in the next major release (v8.0.0), at which point both tools will default to
`--strip-extras`. To retain extras with uv, pass the `--no-strip-extras` flag to `uv pip compile`.
If your requirements file includes an `--extra-index-url` directive, uv will not emit it by By default, uv does not write any index URLs to the output file, while `pip-compile` outputs any
default. Use the `--emit-index-url` option. uv will also include its default `--index-url`. `--index-url` or `--extra-index-url` that does not match the default (PyPI). To include index URLs
in the output file, pass the `--emit-index-url` flag to `uv pip compile`. Unlike `pip-compile`,
uv will include all index URLs when `--emit-index-url` is passed, including the default index URL.