google-research
130 строк · 3.9 Кб
1load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
2load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3load("//build_deps/py:python_configure.bzl", "python_configure")
4load("//build_deps/tf_dependency:tf_configure.bzl", "tf_configure")
5
6# Needed for highway's config_setting_group
7http_archive(
8name = "bazel_skylib",
9urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz"],
10)
11
12load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
13
14bazel_skylib_workspace()
15
16http_archive(
17name = "platforms",
18sha256 = "5308fc1d8865406a49427ba24a9ab53087f17f5266a7aabbfc28823f3916e1ca",
19urls = [
20"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz",
21"https://github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz",
22],
23)
24
25tf_configure(
26name = "local_config_tf",
27)
28
29python_configure(name = "local_config_python")
30
31git_repository(
32name = "pybind11_bazel",
33commit = "af7151f632550cd2f470fdefacf17770d5b94959",
34remote = "https://github.com/pybind/pybind11_bazel.git",
35)
36
37http_archive(
38name = "pybind11",
39build_file = "@pybind11_bazel//:pybind11.BUILD",
40strip_prefix = "pybind11-2.11.1",
41urls = [
42"https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz",
43],
44)
45
46http_archive(
47name = "com_google_absl",
48sha256 = "0320586856674d16b0b7a4d4afb22151bdc798490bb7f295eddd8f6a62b46fea",
49strip_prefix = "abseil-cpp-fb3621f4f897824c0dbe0615fa94543df6192f30",
50urls = [
51"https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-cpp/archive/fb3621f4f897824c0dbe0615fa94543df6192f30.tar.gz",
52"https://github.com/abseil/abseil-cpp/archive/fb3621f4f897824c0dbe0615fa94543df6192f30.tar.gz",
53],
54)
55
56git_repository(
57name = "com_google_protobuf",
58patch_args = ["-p1"],
59patches = ["//build_deps/patches:protobuf.patch"],
60remote = "https://github.com/protocolbuffers/protobuf.git",
61tag = "v3.21.9",
62)
63
64load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
65
66protobuf_deps()
67
68# rules_proto defines abstract rules for building Protocol Buffers.
69http_archive(
70name = "rules_proto",
71sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
72strip_prefix = "rules_proto-5.3.0-21.7",
73urls = [
74"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
75],
76)
77
78load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
79
80rules_proto_dependencies()
81
82rules_proto_toolchains()
83
84http_archive(
85name = "rules_python",
86sha256 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141",
87strip_prefix = "rules_python-0.20.0",
88url = "https://github.com/bazelbuild/rules_python/releases/download/0.20.0/rules_python-0.20.0.tar.gz",
89)
90
91load("@rules_python//python:repositories.bzl", "py_repositories")
92
93py_repositories()
94
95bind(
96name = "python_headers",
97actual = "@local_config_python//:python_headers",
98)
99
100git_repository(
101name = "com_google_googletest",
102remote = "https://github.com/google/googletest.git",
103tag = "release-1.10.0",
104)
105
106git_repository(
107name = "com_google_highway",
108remote = "https://github.com/google/highway.git",
109tag = "1.0.1",
110)
111
112git_repository(
113name = "cnpy",
114commit = "57184ee0db37cac383fc29175950747a46a8b512",
115remote = "https://github.com/sammymax/cnpy.git",
116)
117
118# rules_cc defines rules for generating C++ code from Protocol Buffers.
119http_archive(
120name = "rules_cc",
121sha256 = "56ac9633c13d74cb71e0546f103ce1c58810e4a76aa8325da593ca4277908d72",
122strip_prefix = "rules_cc-40548a2974f1aea06215272d9c2b47a14a24e556",
123urls = [
124"https://github.com/bazelbuild/rules_cc/archive/40548a2974f1aea06215272d9c2b47a14a24e556.zip",
125],
126)
127
128load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies")
129
130rules_cc_dependencies()
131