-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMODULE.bazel
94 lines (85 loc) · 2.64 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
module(
name = "bob-build",
version = "0.0.1",
repo_name = "bob",
)
print("WARNING: The `bob-build` Bazel module is still highly experimental and subject to change at any time!")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_multirun", version = "0.6.0")
bazel_dep(name = "rules_go", version = "0.52.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.41.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "blueprint", version = "0.0.1", repo_name = "com_github_google_blueprint")
local_path_override(
module_name = "blueprint",
path = "blueprint",
)
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
# NOTE: https://github.com/bazelbuild/bazel-gazelle/issues/1469
go_sdk.download(
version = "1.18",
)
use_repo(
go_sdk,
"go_toolchains",
)
register_toolchains("@go_toolchains//:all")
# We have to avoid the `chmod`/`chown`/`id` unhermetic-ness
# TODO: remove this when `ignore_root_user_error` is hermetic
# https://github.com/bazelbuild/rules_python/issues/2016
dev = use_extension(
"@rules_python//python/extensions:python.bzl",
"python",
dev_dependency = True,
)
dev.toolchain(
configure_coverage_tool = True,
# TODO: change the code to use Python for `chmod`/`id`
ignore_root_user_error = True,
python_version = "3.11",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pip",
python_version = "3.11",
requirements_lock = "//config_system:requirements_lock.txt",
)
use_repo(
pip,
config_deps = "pip",
)
python = use_extension("@rules_python//extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.11",
)
use_repo(python, "python_3_11", "python_versions")
# Set up dependencies
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.module(
path = "github.com/stretchr/testify",
sum = "h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho=",
version = "v1.6.0",
)
go_deps.module(
path = "github.com/davecgh/go-spew",
sum = "h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=",
version = "v1.1.0",
)
go_deps.module(
path = "gopkg.in/yaml.v3",
sum = "h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=",
version = "v3.0.0-20200313102051-9f266ea9e77c",
)
go_deps.module(
path = "github.com/stretchr/objx",
sum = "h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=",
version = "v0.1.0",
)
use_repo(
go_deps,
"com_github_davecgh_go_spew",
"com_github_stretchr_objx",
"com_github_stretchr_testify",
"in_gopkg_yaml_v3",
)