forked from aspect-build/toolchains_protoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODULE.bazel
53 lines (45 loc) · 1.68 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
"Bazel dependencies"
module(
name = "toolchains_protoc",
version = "0.0.0",
compatibility_level = 1,
)
bazel_dep(name = "bazel_features", version = "1.9.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "rules_proto", version = "6.0.0")
bazel_dep(name = "platforms", version = "0.0.10")
protoc = use_extension("//protoc:extensions.bzl", "protoc")
protoc.toolchain(
google_protobuf = "com_google_protobuf",
version = "LATEST",
)
use_repo(protoc, "com_google_protobuf", "toolchains_protoc_hub")
register_toolchains("@toolchains_protoc_hub//:all")
# Assert no CC compilation occurs
register_toolchains(
"//tools/toolchains:all",
dev_dependency = True,
)
bazel_dep(name = "aspect_bazel_lib", version = "1.32.1", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "6.1.2", dev_dependency = True)
bazel_dep(name = "aspect_rules_py", version = "0.7.1", dev_dependency = True)
bazel_dep(name = "rules_java", version = "7.4.0", dev_dependency = True)
bazel_dep(name = "rules_python", version = "0.32.2", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.48.0", dev_dependency = True)
bazel_dep(name = "rules_uv", version = "0.10.0", dev_dependency = True)
register_toolchains(
"//examples/lang_toolchains:all",
dev_dependency = True,
)
# Shows how a typical Python user fetches all the dependencies of their app, including the protobuf runtime
dev_pip = use_extension(
"@rules_python//python/extensions:pip.bzl",
"pip",
dev_dependency = True,
)
dev_pip.parse(
hub_name = "pypi",
python_version = "3.11",
requirements_lock = "//examples/lang_toolchains:requirements.txt",
)
use_repo(dev_pip, "pypi")