-
-
Notifications
You must be signed in to change notification settings - Fork 681
Expand file tree
/
Copy pathMODULE.bazel
More file actions
50 lines (44 loc) · 1.27 KB
/
MODULE.bazel
File metadata and controls
50 lines (44 loc) · 1.27 KB
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
module(
name = "other_module",
)
# This module is using the same version of rules_python
# that the parent module uses.
bazel_dep(name = "rules_python", version = "")
local_path_override(
module_name = "rules_python",
path = "../../..",
)
PYTHON_NAME_39 = "python_3_9"
PYTHON_NAME_311 = "python_3_11"
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.defaults(
# In a submodule this is ignored
python_version = "3.11",
)
python.toolchain(
configure_coverage_tool = True,
python_version = "3.9",
)
python.toolchain(
configure_coverage_tool = True,
python_version = "3.11",
)
# created by the above python.toolchain calls.
use_repo(
python,
"python_versions",
PYTHON_NAME_39,
PYTHON_NAME_311,
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "other_module_pip",
# NOTE: This version must be different than the root module's
# default python version.
# This is testing that a sub-module can use pip.parse() and only specify
# Python versions that DON'T include whatever the root-module's default
# Python version is.
python_version = "3.11",
requirements_lock = ":requirements_lock_3_11.txt",
)
use_repo(pip, "other_module_pip")