-
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`uv` has support for keyrings, as long as the option is `--keyring-provider=subprocess`. But this isn't exposed in the `rye` CLI. Some things I haven't addressed, happy to discuss: 1. I haven't implemented it for piptools. I expect it's possible, in fact more features could be implemented using pip-compile's `--pip-args` argument, but I think the plan is to move to `uv` as the default going forward, so I don't know how much desire there is to extend the piptools backend. But if it's needed, I can do it, either in this PR or as followup work. 2. In practice, I'd expect that people would want to always pass this `--keyring-provider` value for all calls, and it does pollute the code a bit, passing round the CLI options. I think another way to go could be to put it in the global config and/or the project TOML, and just read it from there. (I'd actually prefer this interface for my own uses.) But I wanted to stay close to the existing CLI of `uv` and `pip`, so stuck with that interface. Again, happy to iterate. # Test From a `rye init` project: ``` ❯ ../rye/target/debug/rye lock Generating production lockfile: /home/emarsden/src/rye-proj/test-proj/requirements.lock error: Failed to build editables Caused by: Failed to build editable: /home/emarsden/src/rye-proj/test-proj Caused by: Failed to install requirements from build-system.requires (resolve) Caused by: No solution found when resolving: hatchling Caused by: HTTP status client error (401 Unauthorized) for url (https://[snip]/hatchling/) error: could not write production lockfile for project Caused by: Failed to run uv compile /tmp/.tmplGQmy9/requirements.txt. uv exited with status: exit status: 2 ❯ ../rye/target/debug/rye lock --keyring-provider=subprocess Generating production lockfile: /home/emarsden/src/rye-proj/test-proj/requirements.lock Generating dev lockfile: /home/emarsden/src/rye-proj/test-proj/requirements-dev.lock Done! ```
- Loading branch information
1 parent
27e392b
commit 45b7bd3
Showing
8 changed files
with
98 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.