-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathrepositories_extra.bzl
31 lines (25 loc) · 1.26 KB
/
repositories_extra.bzl
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
load("@emsdk//:deps.bzl", emsdk_deps = "deps")
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime:crates.bzl", "wasmtime_fetch_remote_crates")
load("//bazel/external/cargo:crates.bzl", "raze_fetch_remote_crates")
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
def _python_minor_version(python_version):
return "_".join(python_version.split(".")[:-1])
# Python version for `rules_python`
PYTHON_VERSION = "3.10.2"
PYTHON_MINOR_VERSION = _python_minor_version(PYTHON_VERSION)
# Envoy deps that rely on a first stage of dependency loading in envoy_dependencies().
def envoy_dependencies_extra(python_version = PYTHON_VERSION):
emsdk_deps()
raze_fetch_remote_crates()
# This function defines the `@rules_jvm_external` repository, which is needed.
protobuf_deps()
wasmtime_fetch_remote_crates()
# Registers underscored Python minor version - eg `python3_10`
python_register_toolchains(
name = "python%s" % ("_".join(python_version.split(".")[:-1])),
python_version = python_version,
ignore_root_user_error = True,
)
aspect_bazel_lib_dependencies()