-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMODULE.bazel
119 lines (100 loc) · 3.88 KB
/
MODULE.bazel
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module(
name = "tf-shell",
version = "0.1.36",
)
SUPPORTED_PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
] # Also see ./.github/workflows/wheel.yaml
DEFAULT_PYTHON = "3.10" # Also see ./BUILD
bazel_dep(name = "rules_python", version = "0.38.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
python.toolchain(
is_default = version == DEFAULT_PYTHON,
python_version = version,
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(
python,
"python_versions",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
[
pip.parse(
hub_name = "pip",
python_version = version,
requirements_lock = "//:requirements_" + version.replace(".", "_") + ".txt",
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(pip, "pip")
# Since we compile against the tensorflow headers which make heavy use of
# abseil, the version used here must match the version used by tensorflow.
# See what version of abseil tensorflow is using here:
# https://github.com/tensorflow/tensorflow/blob/master/third_party/absl/workspace.bzl
bazel_dep(name = "abseil-cpp", version = "20230802.1", repo_name = "com_google_absl")
single_version_override(
module_name = "abseil-cpp",
version = "20230802.1",
)
# Additionally, tensorflow headers use a protobuf version which which is a
# python dependency. Other dependencies (like rules_cc >= 0.0.13 and tink_cc)
# also use protobuf, so the versions must match.
# See what version tensorflow is using here:
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/tools/cmake/modules/protobuf.cmake
bazel_dep(name = "protobuf", version = "21.7")
single_version_override(
module_name = "protobuf",
version = "21.7",
)
# Note, rule_cc>=0.0.13 is not compatible with protobuf 3.21.7, as required by
# TensorFlow. That makes updating remaining deps below difficult.
bazel_dep(name = "rules_cc", version = "0.0.12")
bazel_dep(name = "glog", version = "0.7.1", repo_name = "com_github_google_glog")
bazel_dep(name = "boringssl", version = "0.20240930.0")
bazel_dep(name = "googletest", version = "1.16.0")
bazel_dep(name = "tink_cc", version = "2.3.0", repo_name = "com_github_tink_crypto_tink_cc")
bazel_dep(name = "rules_foreign_cc", version = "0.12.0")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "highway", version = "1.2.0", repo_name = "com_github_google_highway")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "shell_encryption",
integrity = "sha256-Hxswh3VNBz08KWFK1czyvANhdsEs+IyIi/AQbujtIaY=",
strip_prefix = "shell-encryption-f5230c1922b1c647ba7f80ec12b689a61877f059",
urls = ["https://github.com/google/shell-encryption/archive/f5230c1922b1c647ba7f80ec12b689a61877f059.zip"],
)
_ALL_CONTENT = """\
filegroup(
name = "all_srcs",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)
"""
http_archive(
name = "emp-tool",
build_file_content = _ALL_CONTENT,
integrity = "sha256-jEpsiBYbcu1pqP9NYmIBresj6I83XeGb1IuMs0psI7c=",
strip_prefix = "emp-tool-0.2.5",
urls = ["https://github.com/emp-toolkit/emp-tool/archive/refs/tags/0.2.5.zip"],
)
http_archive(
name = "emp-ot",
build_file_content = _ALL_CONTENT,
integrity = "sha256-wXi5/rDgw9EysMutJ4Tm1wirf/SGkDSJwsHQdeuA21E=",
strip_prefix = "emp-ot-0.2.4",
urls = ["https://github.com/emp-toolkit/emp-ot/archive/refs/tags/0.2.4.zip"],
)
http_archive(
name = "emp-sh2pc",
build_file_content = _ALL_CONTENT,
integrity = "sha256-yQPfQV4sILqQcz/K5hWGL/eDePanilLChGIp3wVx8TI=",
strip_prefix = "emp-sh2pc-0.2.2",
urls = ["https://github.com/emp-toolkit/emp-sh2pc/archive/refs/tags/0.2.2.zip"],
)