-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathMODULE.bazel
87 lines (71 loc) · 1.47 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
module(
name = "pybind11_protobuf",
version = "head",
)
bazel_dep(
name = "bazel_skylib",
version = "1.5.0",
)
bazel_dep(
name = "abseil-cpp",
version = "20230802.0.bcr.1",
repo_name = "com_google_absl",
)
bazel_dep(
name = "abseil-py",
version = "2.1.0",
repo_name = "com_google_absl_py",
)
bazel_dep(
name = "platforms",
version = "0.0.8"
)
bazel_dep(
name = "pybind11_bazel",
version = "2.11.1.bzl.2",
)
bazel_dep(
name = "protobuf",
version = "23.1",
repo_name = "com_google_protobuf"
)
bazel_dep(
name = "grpc",
version = "1.56.3.bcr.1",
repo_name = "com_github_grpc_grpc",
)
bazel_dep(
name = "rules_python",
version = "0.31.0",
)
SUPPORTED_PYTHON_VERSIONS = [
"3.12",
"3.11",
"3.10",
"3.9",
"3.8"
]
DEFAULT_PYTHON = "3.11"
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
python.toolchain(
python_version = version,
is_default = version == DEFAULT_PYTHON,
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(
python,
python = "python_versions",
)
#### DEV ONLY DEPENDENCIES BELOW HERE ####
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency=True)
[
pip.parse(
hub_name = "pypi",
python_version = version,
requirements_lock = "//pybind11_protobuf/requirements:requirements_lock_" + version.replace('.','_') + ".txt",
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(pip, "pypi")