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
# Use `dev_dependency` so that the toolchains are not defined pulled when
34
+
# your module is used elsewhere.
33
35
dev_dependency = True,
34
36
)
35
-
uv.toolchain(
36
-
name = "uv_toolchains",
37
-
version = "0.5.24",
38
-
)
39
-
use_repo(uv, "uv_toolchains")
40
-
41
-
register_toolchains(
42
-
"@uv_toolchains//:all",
43
-
dev_dependency = True,
44
-
)
37
+
uv.configure(version = "0.5.24")
45
38
```
46
39
47
40
Since this is only for locking the requirements files, it should be always
@@ -75,11 +68,29 @@ Set the uv configuration defaults.
75
68
},
76
69
)
77
70
78
-
append_config=tag_class(
71
+
configure=tag_class(
79
72
doc="""\
80
-
Build the UV toolchain configuration appending the last configuration fragment or creating a new.
73
+
Build the UV toolchain configuration appending configuration to the last version configuration or starting a new version configuration if {attr}`version` is passed.
74
+
75
+
In addition to the very basic configuration pattern outlined above you can customize
76
+
the configuration:
77
+
```starlark
78
+
# Configure the base_url for the specified version.
79
+
uv.configure(base_url = "my_mirror")
80
+
81
+
# Add an extra platform that can be used with your version.
82
+
uv.configure(
83
+
platform = "extra-platform",
84
+
target_settings = ["//my_config_setting_label"],
85
+
compatible_with = ["@platforms//os:exotic"],
86
+
)
87
+
```
81
88
82
-
A new configuration is created whenever {attr}`version` is passed.
89
+
::::tip
90
+
The configuration is additive for each version. This means that if you need to set
91
+
defaults for all versions, use the {attr}`default` for all of the configuration,
0 commit comments