-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
50 lines (38 loc) · 1.47 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
46
47
48
49
50
workspace(
name = "two_snakes",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd",
strip_prefix = "rules_python-0.8.1",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
# Install the default 3.10.2 python toolchain
python_register_toolchains(
name = "python3_10",
# Available versions are listed in @rules_python//python:versions.bzl.
python_version = "3.10.2",
# This _must_ be set to False to work with the autogen in python/BUILD
register_toolchains = False,
)
load("@python3_10//:defs.bzl", python_interpreter = "interpreter")
python_register_toolchains(
name = "python3_9",
python_version = "3.9",
# This _must_ be set to False to work with the autogen in python/BUILD
register_toolchains = False,
)
load("@python3_9//:defs.bzl", python_interpreter_3_9 = "interpreter")
load("@rules_python//python:pip.bzl", "pip_install", "pip_parse")
# this picks up the autogenerated toolchains
register_toolchains("//python:all")
register_execution_platforms("//python:all")
pip_parse(
name = "beam_deps",
python_interpreter_target = python_interpreter_3_9,
requirements_lock = "//beam:requirements.txt",
)
load("@beam_deps//:requirements.bzl", _beam_deps = "install_deps")
_beam_deps()