Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
34 lines (30 loc) · 1.53 KB
/
Copy pathMODULE.bazel
File metadata and controls
34 lines (30 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module(name = "dgf")
bazel_dep(name = "abseil-cpp", version = "20250814.1")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "grpc", version = "1.76.0.bcr.1")
bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "protobuf", version = "33.2")
bazel_dep(name = "rules_cc", version = "0.2.15")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_python", version = "1.7.0")
bazel_dep(name = "nanobind_bazel", version = "2.12.0")
numpy_headers = use_extension("//:numpy_headers.bzl", "numpy_headers")
use_repo(numpy_headers, "numpy_headers")
# Hermetic Python toolchains. They provide the Python headers used to compile
# the nanobind extensions for the version selected with
# `--@rules_python//python/config_settings:python_version=<version>`. Without
# them, the extensions are always compiled against the default (3.11) headers,
# which produces `.so` files that cannot be loaded by other Python versions.
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.11",
)
python.toolchain(python_version = "3.12")
python.toolchain(python_version = "3.13")
# The Python runtime is the venv interpreter (see //:system_python_toolchain).
# It is registered by the root module and therefore takes precedence over the
# hermetic runtimes registered above.
register_toolchains("//:system_python_toolchain")