Enable the uv pep621 manager for Python work with dependencies in private registries
#31841
torarvid
started this conversation in
Suggest an Idea
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Tell us more.
Today, the
uvmanager works well as long as all dependencies in a repo are hosted publicly. However, for a repo that has one or more dependencies that are private, Renovate will fail to generate working PRs, since the step to update the lockfileuv.lockwill fail.This lock step is done by invoking
uv lock, and by defaultuvwill only be able to discover dependency information directly from pypi.I've made an example repo here: https://github.com/torarvid/renovate-test. It has configuration keys for
packageRulesto tell it the URL to my private registry, andhostRulesto give it credentials to said registry.When I clone the renovate repository and run it against this test repo, it generates a PR such as this one: torarvid/renovate-test#3 where the Renovate comment says
Command failed: uv lock --upgrade-package private-torarvid-package-1.I tried digging into this a little bit, and while I'm no expert on the inner workings of Renovate, it seems to me that this could be improved by matching the
registryUrlwith thehostRuleand create a URL that can be exported to the env varUV_EXTRA_INDEX_URLwhichuvwill recognize.I made a proof-of-concept PR here: #31840, and when I run against the same repo it then creates a working Renovate PR like this one: torarvid/renovate-test#9.
I'm aware that I could have discussed this topic here before starting to implement anything, but I just got curious and started poking around. Having said that, I'm in no way "heavily invested" in my PR, so feel free to critique it as you will 😄
All reactions