forked from google/yggdrasil-decision-forests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
91 lines (80 loc) · 3.29 KB
/
Copy pathMODULE.bazel
File metadata and controls
91 lines (80 loc) · 3.29 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module(
name = "yggdrasil_decision_forests",
version = "1.12.0",
)
# BCR Dependencies
bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "boost.math", version = "1.83.0.bcr.1")
bazel_dep(name = "boringssl", version = "0.20250114.0")
bazel_dep(name = "crc32c", version = "1.1.0", repo_name = "com_github_google_crc32c")
bazel_dep(name = "curl", version = "8.8.0.bcr.3", repo_name = "com_github_curl_curl")
bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
bazel_dep(name = "googletest", version = "1.17.0", repo_name = "com_google_googletest")
bazel_dep(name = "grpc", version = "1.74.1", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "highway", version = "1.3.0", repo_name = "com_google_highway")
bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1", repo_name = "com_github_nlohmann_json")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "protobuf", version = "31.1", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_cc", version = "0.2.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_python", version = "1.6.0")
bazel_dep(name = "zlib", version = "1.3.1.bcr.7")
bazel_dep(name = "emsdk", version = "4.0.13", dev_dependency = True)
# Dependencies that are not available in BCR
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "farmhash",
build_file_content = """
cc_library(
name = "farmhash",
srcs = ["farmhash.cc"],
hdrs = ["farmhash.h"],
includes = ["src/."],
visibility = ["//visibility:public"],
defines = ["FARMHASH_NO_BUILTIN_EXPECT"],
)
""",
integrity = "sha256-GDks8HNuHWLsu41pXDFJa2UHhZ6MdVQdetC6CS3FIRU=",
strip_prefix = "farmhash-0d859a811870d10f53a594927d0d0b97573ad06d/src",
urls = ["https://github.com/google/farmhash/archive/0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz"],
)
http_archive(
name = "google_cloud_cpp",
integrity = "sha256-Ypy/zFvVgdOCd7qPqUpbZZGvHg9q8Nq20dnteWv0i2E=",
patch_args = ["-p1"],
strip_prefix = "google-cloud-cpp-2.39.0",
urls = ["https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.39.0.tar.gz"],
)
# If Tensorflow headers are required, download them from pip.
tf_ext = use_extension("//third_party:tf_downloader.bzl", "tf_downloaded_header_extension")
use_repo(tf_ext, "local_config_tf")
# Use system Python until the migration to hermetic Python is completed.
local_runtime_repo = use_repo_rule(
"@rules_python//python/local_toolchains:repos.bzl",
"local_runtime_repo",
)
local_runtime_toolchains_repo = use_repo_rule(
"@rules_python//python/local_toolchains:repos.bzl",
"local_runtime_toolchains_repo",
)
# Step 1: Define the Python runtime
local_runtime_repo(
name = "local_python3",
dev_dependency = True,
interpreter_path = "python3",
on_failure = "fail",
)
# Step 2: Create toolchains for the runtimes
local_runtime_toolchains_repo(
name = "local_toolchains",
# TIP: The `target_settings` arg can be used to activate them based on
# command line flags; see docs below.
dev_dependency = True,
runtimes = ["local_python3"],
)
# Step 3: Register the toolchains
register_toolchains(
"@local_toolchains//:all",
dev_dependency = True,
)