|
| 1 | +bazel_dep(name = "hermetic_cc_toolchain", version = "4.0.0") |
| 2 | +bazel_dep(name = "platforms", version = "0.0.11") |
| 3 | +bazel_dep(name = "rules_cc", version = "0.1.1") |
| 4 | +bazel_dep(name = "rules_python", version = "1.4.1") |
| 5 | +bazel_dep(name = "rules_shell", version = "0.4.1") |
| 6 | +bazel_dep(name = "bazel_skylib", version = "1.7.1") |
| 7 | + |
| 8 | +# Minimal C++ toolchain required internally by rules_python. |
| 9 | +cc_toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains") |
| 10 | +use_repo(cc_toolchains, "zig_sdk") |
| 11 | + |
| 12 | +# Python configuration |
| 13 | +python = use_extension("@rules_python//python/extensions:python.bzl", "python") |
| 14 | +python.toolchain(python_version = "3.13") |
| 15 | + |
| 16 | +# Python packages |
| 17 | +pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") |
| 18 | +pip.parse( |
| 19 | + # CPU-only torch is not available in the regular pypi repositories. |
| 20 | + experimental_index_url = "https://pypi.org/simple", |
| 21 | + experimental_index_url_overrides = { |
| 22 | + "torch": "https://download.pytorch.org/whl/cpu", |
| 23 | + }, |
| 24 | + hub_name = "pypi", |
| 25 | + python_version = "3.13", |
| 26 | + # This file may be regenerated via `bazel run //:requirement.update`. |
| 27 | + requirements_lock = "//:requirements.lock", |
| 28 | +) |
| 29 | +use_repo(pip, "pypi") |
| 30 | + |
| 31 | +# UV toolchain config for regenerating the lockfile |
| 32 | +uv = use_extension( |
| 33 | + "@rules_python//python/uv:uv.bzl", |
| 34 | + "uv", |
| 35 | + dev_dependency = True, |
| 36 | +) |
| 37 | +uv.configure( |
| 38 | + # Latest version that supports the old URL schema used in rules_python. |
| 39 | + version = "0.6.5", |
| 40 | +) |
0 commit comments