bazel-contrib / bazel-contrib/rules_uv

feat: add support for `uv` environment variables

Open
#274 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

Description

The wish here would be to add support for inheriting / recognizing UV env vars as described at https://docs.astral.sh/uv/reference/environment

So, for example, I could have a

```sh
common --repo_env=UV_DEFAULT_INDEX=https://artifactory.corp.net/artifactory/api/pypi/pypi/simple
```

Inspirations from `rules_go` and `gazelle`:

https://github.com/bazel-contrib/bazel-gazelle/blob/0990b28954080252c89369d7a27176aee7381ab5/internal/go_repository.bzl#L220
https://github.com/bazel-contrib/rules_go/blob/7bf46c13dbb1556df1ca58cdd632b717670a3280/tests/bcr/go_tool_test.sh#L17
https://github.com/bazel-contrib/rules_go/pull/3909

Contributor guide

Open the contributing guide

Research direction

Start with the UV environment reference and the linked rules_go and Gazelle examples, especially go_repository.bzl and tests/bcr/go_tool_test.sh. Locate the rules_uv repository-environment entry point and determine how the requested variables should be propagated; done means UV variables such as UV_DEFAULT_INDEX work through --repo_env.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.