forked from tanan/bazel-python-coverage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
45 lines (36 loc) · 1.24 KB
/
WORKSPACE
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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "d71d2c67e0bce986e1c5a7731b4693226867c45bfe0b7c5e0067228a536fc580",
strip_prefix = "rules_python-0.29.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.29.0/rules_python-0.29.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_multi_toolchains")
py_repositories()
default_python_version = "3.11"
python_register_multi_toolchains(
name = "python",
default_version = default_python_version,
python_versions = [
"3.11",
"3.12",
],
register_coverage_tool = True,
)
load("@python//:pip.bzl", "multi_pip_parse")
load("@python//3.11:defs.bzl", interpreter_3_11 = "interpreter")
load("@python//3.12:defs.bzl", interpreter_3_12 = "interpreter")
multi_pip_parse(
name = "pip_deps",
default_version = default_python_version,
python_interpreter_target = {
"3.11": interpreter_3_11,
"3.12": interpreter_3_12,
},
requirements_lock = {
"3.11": "//py:requirements_lock.txt",
"3.12": "//py:requirements_lock.txt",
},
)
load("@pip_deps//:requirements.bzl", "install_deps")
install_deps()