Skip to content

Commit 210bcf5

Browse files
[build] Specify the location of python3 binary
1 parent b2d5f09 commit 210bcf5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

BUILD.bazel

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ filegroup(
1111
visibility = ["//visibility:public"],
1212
)
1313

14+
load("@rules_python//python:defs.bzl", "py_runtime_pair")
15+
16+
py_runtime(
17+
name = "py3_runtime",
18+
interpreter_path = "/usr/bin/python3",
19+
python_version = "PY3",
20+
stub_shebang = "#!/usr/bin/python3",
21+
)
22+
23+
py_runtime_pair(
24+
name = "py_runtime_pair",
25+
py2_runtime = None,
26+
py3_runtime = ":py3_runtime",
27+
)
28+
29+
toolchain(
30+
name = "py_toolchain",
31+
toolchain = ":py_runtime_pair",
32+
toolchain_type = "@rules_python//python:toolchain_type",
33+
)
34+
1435
alias(
1536
name = "grid",
1637
actual = "//java/src/org/openqa/selenium/grid:executable-grid",

WORKSPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ workspace(
66
},
77
)
88

9+
register_toolchains(":py_toolchain")
10+
911
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1012

1113
http_archive(

0 commit comments

Comments
 (0)