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

Allow --python and --system on pip compile #3115

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

I think these are useful to have for consistency, though the --system variant requires some new threading.

Closes: #2242.

@charliermarsh charliermarsh marked this pull request as ready for review April 18, 2024 04:45
@charliermarsh charliermarsh added the cli Related to the command line interface label Apr 18, 2024
/// - `python3.10` or `python.exe` looks for a binary with the given name in `PATH`.
/// - `/home/ferris/.local/bin/python3.10` uses the exact Python at the given path.
#[arg(long, verbatim_doc_comment, group = "discovery")]
pub(crate) python: Option<String>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of wish this was -p for consistency with other commands, but --python-version is already -p.

@charliermarsh charliermarsh merged commit 7688f46 into main Apr 18, 2024
38 checks passed
@charliermarsh charliermarsh deleted the charlie/pip-compile branch April 18, 2024 04:55
@T-256
Copy link
Contributor

T-256 commented Apr 18, 2024

Why not make these flags global instead of setting them separately for all subcommands of uv pip?

charliermarsh pushed a commit that referenced this pull request Apr 19, 2024
## Summary

Following up 

- #3113
- #3115

It looks like `uv pip compile` command with `UV_SYSTEM_PYTHON` is missed
because these two PRs are close in time. And thus resulting in


```bash
$ uv --version
uv 0.1.34 (9259ece 2024-04-19)
$ UV_SYSTEM_PYTHON=1 uv pip compile --upgrade requirements.in -o requirements.txt
error: invalid value '1' for '--system'
  [possible values: true, false]

For more information, try '--help'.
```

Signed-off-by: Jack Cherng <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --system/--python flag to uv pip compile
3 participants