forked from mongodb/mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE.bazel
69 lines (57 loc) · 2.78 KB
/
WORKSPACE.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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//bazel/platforms:local_config_platform.bzl", "setup_local_config_platform")
setup_local_config_platform(name="local_config_platform")
http_archive(
name = "mongo_toolchain",
build_file = "@//bazel/toolchains:mongo_toolchain.BUILD",
sha256 = "269e54f97d9049d24d934f549a8963c15c954a5cb6fc0d75bbbcfb78df3c3647",
urls = [
# v4 toolchain for amazon2/arm64
"https://mciuploads.s3.amazonaws.com/toolchain-builder/amazon2-arm64/11bae3c145a48dd7be9ee8aa44e5591783f787aa/bazel_v4_toolchain_builder_amazon2_arm64_11bae3c145a48dd7be9ee8aa44e5591783f787aa_24_01_09_16_10_07.tar.gz",
],
)
register_toolchains("@mongo_toolchain//:mongo_toolchain")
load("//bazel/toolchains:python_toolchain.bzl", "setup_mongo_python_toolchains")
[register_toolchains(toolchain) for toolchain in setup_mongo_python_toolchains()]
http_archive(
name = "rules_python",
sha256 = "8c8fe44ef0a9afc256d1e75ad5f448bb59b81aba149b8958f02f7b3a98f5d9b4",
strip_prefix = "rules_python-0.13.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.13.0.tar.gz",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "platforms",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
],
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
)
# We need skylib to be able to use config_setting_group in rule_poetry below
# https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectsconfig_setting_group
http_archive(
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
],
)
# Poetry rules for managing Python dependencies
http_archive(
name = "rules_poetry",
strip_prefix = "rules_poetry-fc645faf7fb2e7f6c8fce968801e2a63dc1332bb",
urls = ["https://github.com/mongodb-forks/rules_poetry/archive/fc645faf7fb2e7f6c8fce968801e2a63dc1332bb.tar.gz"],
)
load("@rules_poetry//rules_poetry:defs.bzl", "poetry_deps")
poetry_deps()
load("@rules_poetry//rules_poetry:poetry.bzl", "poetry")
poetry(
name = "poetry",
lockfile = "//:poetry.lock",
pyproject = "//:pyproject.toml",
python_interpreter_target_default="@py_host//:bin/python3",
python_interpreter_target_mac="@py_host//:bin/python3",
python_interpreter_target_win="@py_host//:python.exe",
)