Skip to content

Commit 344fdf6

Browse files
Fix dependency-groups in uv_translator
1 parent 26ddc14 commit 344fdf6

File tree

6 files changed

+217
-22
lines changed

6 files changed

+217
-22
lines changed

e2e/uv/generate_lock/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ py_test(
2626
env = {
2727
"ALL_WHL_REQUIREMENTS": ",".join(all_whl_requirements),
2828
"EXPECTED_WHL_REQUIREMENTS": ",".join([
29+
"pytest",
30+
"pyyaml",
2931
"regex",
32+
"ruff",
3033
]),
3134
},
3235
main = "test_all_whl_requirements.py",

e2e/uv/generate_lock/MODULE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ lock_import = use_extension("@rules_pycross//pycross/extensions:lock_import.bzl"
4242

4343
# lock_repo with uv and some package overrides
4444
lock_import.import_uv(
45+
development_groups = ["dev"],
4546
lock_file = "//:uv.lock",
47+
optional_groups = ["yaml"],
4648
project_file = "//:pyproject.toml",
4749
repo = "uv",
4850
target_environments = ["@rules_pycross_e2e_environments//:environments"],

e2e/uv/generate_lock/WORKSPACE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ load("@rules_pycross_e2e_environments//:defs.bzl", "environments")
7272
pycross_lock_repo(
7373
name = "uv",
7474
lock_model = lock_repo_model_uv(
75+
development_groups = ["dev"],
7576
lock_file = "@//:uv.lock",
77+
optional_groups = ["yaml"],
7678
project_file = "@//:pyproject.toml",
7779
),
7880
target_environments = environments,

e2e/uv/generate_lock/pyproject.toml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@
22
name = "rules-pycross-test"
33
version = "0.1.0"
44
description = ""
5-
requires-python = ">=3.9, <3.13"
5+
requires-python = ">=3.10, <3.13"
66
dependencies = [
77
"regex",
8-
# should NOT be in uv.lock, simulating a user adding
9-
# numpy and regenerating it with BUILD.bazel
8+
# Should NOT be in uv.lock, simulating a user adding
9+
# numpy and regenerating it with BUILD.bazel.
10+
# Comment out when regenerating uv.lock.
1011
"numpy",
1112
]
1213

14+
[project.optional-dependencies]
15+
yaml = [
16+
"pyyaml",
17+
]
18+
19+
[dependency-groups]
20+
dev = [
21+
"pytest",
22+
"ruff",
23+
]
24+
1325
[build-system]
1426
requires = ["hatchling"]
1527
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)