Skip to content
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

--python should be allowed before command #3704

Open
thejcannon opened this issue May 21, 2024 · 2 comments · May be fixed by #3889
Open

--python should be allowed before command #3704

thejcannon opened this issue May 21, 2024 · 2 comments · May be fixed by #3889
Assignees
Labels
cli Related to the command line interface compatibility Compatibility with a specification or another tool
Milestone

Comments

@thejcannon
Copy link

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 thejcannon changed the title --python should be allowed before command --python should be allowed before command May 21, 2024
@zanieb
Copy link
Member

zanieb commented May 21, 2024

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 zanieb added compatibility Compatibility with a specification or another tool cli Related to the command line interface labels May 21, 2024
@charliermarsh charliermarsh self-assigned this May 28, 2024
@charliermarsh charliermarsh linked a pull request May 28, 2024 that will close this issue
@charliermarsh charliermarsh added this to the v0.3.0 milestone Jun 1, 2024
@charliermarsh
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface compatibility Compatibility with a specification or another tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants