uv icon indicating copy to clipboard operation
uv copied to clipboard

`--python` should be allowed before command

Open thejcannon opened this issue 1 year ago • 1 comments

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.

thejcannon avatar May 21 '24 17:05 thejcannon

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.

zanieb avatar May 21 '24 17:05 zanieb

We'll ship this in v0.3.0. It requires changing the -p specifier on uv pip compile.

charliermarsh avatar Jun 01 '24 16:06 charliermarsh