forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MODULE.bazel
55 lines (46 loc) · 2 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
repo_license = use_repo_rule("//omd/packages/rules:repo_license.bzl", "detect_repo_license")
repo_license(name = "repo_license")
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
# No tags, no releases. Let's go with today's head.
commit = "1e08f8e0507b6b6b1f4416a9a22cf5c28beaba93",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_rust", version = "0.49.3")
# TODO: Switch back to upstream rules_python as soon as https://github.com/bazelbuild/rules_python/pull/2238 is merged
# We need this work-around to get the RECORD file from the wheel deployed...
git_override(
module_name = "rules_python",
commit = "41b8921f6cd1ec34d77db9d97e9ea0c22839ebb7",
remote = "https://github.com/TimotheusBachinger/rules_python",
)
bazel_dep(name = "rules_python", version = "0.1.0")
# TODO: how to sync this with the PYTHON_VERSION in package_versions.bzl?
PYTHON_VERSION = "3.12.3"
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
# We can specify the exact version.
python_version = PYTHON_VERSION,
)
bazel_dep(name = "aspect_rules_py", version = "0.7.4")
bazel_dep(name = "aspect_rules_lint", version = "1.0.2")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "cmk_requirements",
python_version = PYTHON_VERSION,
requirements_by_platform = {
"@//:requirements_lock.txt": "linux_*",
},
environment = {
# Hack for building extensions from source.
# See also: https://github.com/bazelbuild/rules_python/issues/1463
"CC": "gcc-13"
},
)
use_repo(pip, "cmk_requirements")
bazel_dep(name = "protobuf", version = "28.2", repo_name = "com_google_protobuf")