@@ -174,16 +174,83 @@ use_repo(
174174 "build_bazel_bazel_self" ,
175175)
176176
177- # EXPERIMENTAL: This is experimental and may be removed without notice
178- uv = use_extension (
177+ # TODO @aignas 2025-01-27: should this be moved to `//python/extensions:uv.bzl` or should
178+ # it stay as it is? I think I may prefer to move it.
179+ uv = use_extension ("//python/uv:uv.bzl" , "uv" )
180+
181+ # Here is how we can define platforms for the `uv` binaries - this will affect
182+ # all of the downstream callers because we are using the extension without
183+ # `dev_dependency = True`.
184+ uv .default (
185+ base_url = "https://github.com/astral-sh/uv/releases/download" ,
186+ manifest_filename = "dist-manifest.json" ,
187+ version = "0.6.3" ,
188+ )
189+ uv .default (
190+ compatible_with = [
191+ "@platforms//os:macos" ,
192+ "@platforms//cpu:aarch64" ,
193+ ],
194+ platform = "aarch64-apple-darwin" ,
195+ )
196+ uv .default (
197+ compatible_with = [
198+ "@platforms//os:linux" ,
199+ "@platforms//cpu:aarch64" ,
200+ ],
201+ platform = "aarch64-unknown-linux-gnu" ,
202+ )
203+ uv .default (
204+ compatible_with = [
205+ "@platforms//os:linux" ,
206+ "@platforms//cpu:ppc" ,
207+ ],
208+ platform = "powerpc64-unknown-linux-gnu" ,
209+ )
210+ uv .default (
211+ compatible_with = [
212+ "@platforms//os:linux" ,
213+ "@platforms//cpu:ppc64le" ,
214+ ],
215+ platform = "powerpc64le-unknown-linux-gnu" ,
216+ )
217+ uv .default (
218+ compatible_with = [
219+ "@platforms//os:linux" ,
220+ "@platforms//cpu:s390x" ,
221+ ],
222+ platform = "s390x-unknown-linux-gnu" ,
223+ )
224+ uv .default (
225+ compatible_with = [
226+ "@platforms//os:macos" ,
227+ "@platforms//cpu:x86_64" ,
228+ ],
229+ platform = "x86_64-apple-darwin" ,
230+ )
231+ uv .default (
232+ compatible_with = [
233+ "@platforms//os:windows" ,
234+ "@platforms//cpu:x86_64" ,
235+ ],
236+ platform = "x86_64-pc-windows-msvc" ,
237+ )
238+ uv .default (
239+ compatible_with = [
240+ "@platforms//os:linux" ,
241+ "@platforms//cpu:x86_64" ,
242+ ],
243+ platform = "x86_64-unknown-linux-gnu" ,
244+ )
245+ use_repo (uv , "uv" )
246+
247+ register_toolchains ("@uv//:all" )
248+
249+ uv_dev = use_extension (
179250 "//python/uv:uv.bzl" ,
180251 "uv" ,
181252 dev_dependency = True ,
182253)
183- uv .toolchain (uv_version = "0.4.25" )
184- use_repo (uv , "uv_toolchains" )
185-
186- register_toolchains (
187- "@uv_toolchains//:all" ,
188- dev_dependency = True ,
254+ uv_dev .configure (
255+ version = "0.6.2" ,
189256)
0 commit comments