Skip to content

Commit 25e7d16

Browse files
authored
Merge pull request #912 from YifeiZhuang/fix-build-python
fix bazel build with python dependency
2 parents 433973a + e2e73c8 commit 25e7d16

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

WORKSPACE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ workspace(name = "io_k8s_cloud_provider_gcp")
33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
55

6+
http_archive(
7+
name = "rules_python",
8+
sha256 = "c03246c11efd49266e8e41e12931090b613e12a59e6f55ba2efd29a7cb8b4258",
9+
strip_prefix = "rules_python-0.11.0",
10+
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.11.0.tar.gz",
11+
)
12+
13+
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
14+
15+
python_register_toolchains(
16+
name = "python_3_9",
17+
# Available versions are listed in @rules_python//python:versions.bzl.
18+
ignore_root_user_error = True,
19+
python_version = "3.9",
20+
)
21+
622
http_archive(
723
name = "io_bazel_rules_go",
824
sha256 = "b2038e2de2cace18f032249cb4bb0048abf583a36369fa98f687af1b3f880b26",

0 commit comments

Comments
 (0)