-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathWORKSPACE
41 lines (32 loc) · 1.35 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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "29a801171f7ca190c543406f9894abf2d483c206e14d6acbd695623662320097",
strip_prefix = "rules_python-0.18.1",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.18.1/rules_python-0.18.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
python_register_toolchains(
name = "python3_10",
# Available versions are listed in @rules_python//python:versions.bzl.
# We recommend using the same version your team is already standardized on.
python_version = "3.10.9",
)
load("@python3_10//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")
# Create a central repo that knows about the dependencies needed from
# requirements_lock.txt.
pip_parse(
name = "pip_deps",
requirements_lock = "//3rdparty/python:requirements.txt.lock",
python_interpreter_target = interpreter,
)
# Load the starlark macro which will define your dependencies.
load("@pip_deps//:requirements.bzl", "install_deps")
# Call it to define repos for your requirements.
install_deps()
# Load in 3rdparty C++ dependencies
load("//3rdparty/cpp:get.bzl", "get_cpp_externals")
get_cpp_externals()