You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doc: howto configure bazel downloader with pip.parse #3102
I think I've seen this question a few times: I want to customize where wheels are downloaded from. What parameters do I set in (pip.parse or compile_pip_requirements) to do that?
When the answer is non-obvious: use bazel downloader to redirect the url requests.
This is mentioned in the regular pypi docs, but only briefly; it's easy to overlook.
We should give an example in the docs on how to do this.
A dedicated "how to" sub-directory of docs is probably a good idea. It'll be a good place to put prose documentation that draws people in, and we can easily expand it with arbitrary topics and content without it feeling out of place or bloating the more dry/technical/reference docs.
@dougthor42 here we have a scenary where we need to pull a wheel from Google Artifact Registry. I tried using credential helper, but didnt get lucky. Since this how to doc is still not ready, would you mind share how you made it work?
# .bazelrc
common --credential_helper=us-west2-python.pkg.dev=%workspace%/cred_helper.sh
common --credential_helper=us-python.pkg.dev=%workspace%/cred_helper.sh
# requirements.txt
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version=3.12 --output-file=requirements.txt requirements.in
--index-url https://oauth2accesstoken@us-python.pkg.dev/REDACTED/simple
--extra-index-url https://oauth2accesstoken@us-west2-python.pkg.dev/REDACTED/simple
absl-py==2.3.0 \
--hash=sha256:9824a48b654a306168f63e0d97714665f8490b8d89ec7bf2efc24bf67cf579b3 \
--hash=sha256:d96fda5c884f1b22178852f30ffa85766d50b99e00775ea626c23304f582fc4f
# via
# dm-tree
...
Activity
dougthor42 commentedon Jul 18, 2025
I have some experience here - we pull our all python wheels from internal Airlock and a private GAR. Please at least CC me on the PR.
AFMiziara commentedon Sep 22, 2025
@dougthor42 here we have a scenary where we need to pull a wheel from Google Artifact Registry. I tried using credential helper, but didnt get lucky. Since this how to doc is still not ready, would you mind share how you made it work?
dougthor42 commentedon Oct 6, 2025
Here's a quick summary example, specific to Google Artifact Registry ("GAR").
AFMiziara commentedon Oct 7, 2025
Thank you @dougthor42