forked from bazel-contrib/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWORKSPACE
More file actions
51 lines (40 loc) · 1.29 KB
/
WORKSPACE
File metadata and controls
51 lines (40 loc) · 1.29 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
51
workspace(name = "rules_python_multi_python_versions")
local_repository(
name = "rules_python",
path = "../..",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_multi_toolchains")
py_repositories()
load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")
pip_install_dependencies()
default_python_version = "3.9"
python_register_multi_toolchains(
name = "python",
default_version = default_python_version,
python_versions = [
"3.8",
"3.9",
"3.10",
"3.11",
],
register_coverage_tool = True,
)
load("@python//:pip.bzl", "multi_pip_parse")
multi_pip_parse(
name = "pypi",
default_version = default_python_version,
python_interpreter_target = {
"3.10": "@python_3_10_host//:python",
"3.11": "@python_3_11_host//:python",
"3.8": "@python_3_8_host//:python",
"3.9": "@python_3_9_host//:python",
},
requirements_lock = {
"3.10": "//requirements:requirements_lock_3_10.txt",
"3.11": "//requirements:requirements_lock_3_11.txt",
"3.8": "//requirements:requirements_lock_3_8.txt",
"3.9": "//requirements:requirements_lock_3_9.txt",
},
)
load("@pypi//:requirements.bzl", "install_deps")
install_deps()