-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
31 lines (23 loc) · 893 Bytes
/
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
workspace(name = "Python-Core")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "9c6e26911a79fbf510a8f06d8eedb40f412023cf7fa6d1461def27116bff022c",
strip_prefix = "rules_python-1.1.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0/rules_python-1.1.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(
name = "python_3_12",
python_version = "3.12",
)
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "my_pip",
python_interpreter_target = "@python_3_12_host//:python",
requirements_lock = "//build:requirements.txt",
)
load("@my_pip//:requirements.bzl", "install_deps")
# Call it to define repos for your requirements.
install_deps()