uv
uv copied to clipboard
`--python` should be allowed before command
I'm writing some tests that ensure my funky build backend works for several build frontends (uv and pip).
I make a venv, and want to point uv and pip to it, however they currently disagree:
uv wants it after the command:
$ uv pip --python foo install bar
error: unexpected argument '--python' found
tip: 'install --python' exists
Usage: uv pip [OPTIONS] <COMMAND>
For more information, try '--help'.
pip wants it before the command:
$ pip install --python foo bar
ERROR: The --python option must be placed before the pip subcommand name
I just want to the pain to stop:
$ make it-stop
make: *** No rule to make target `it-stop'. Stop.
Thanks for the report. --python isn't currently treated as a "global" pip flag. We might be able to change it.. but we'll need to make sure all the pip sub-commands support it the same way.
We'll ship this in v0.3.0. It requires changing the -p specifier on uv pip compile.