Skip to content

Commit

Permalink
[build] Specify the location of python3 binary
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed May 2, 2022
1 parent b2d5f09 commit 210bcf5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ filegroup(
visibility = ["//visibility:public"],
)

load("@rules_python//python:defs.bzl", "py_runtime_pair")

py_runtime(
name = "py3_runtime",
interpreter_path = "/usr/bin/python3",
python_version = "PY3",
stub_shebang = "#!/usr/bin/python3",
)

py_runtime_pair(
name = "py_runtime_pair",
py2_runtime = None,
py3_runtime = ":py3_runtime",
)

toolchain(
name = "py_toolchain",
toolchain = ":py_runtime_pair",
toolchain_type = "@rules_python//python:toolchain_type",
)

alias(
name = "grid",
actual = "//java/src/org/openqa/selenium/grid:executable-grid",
Expand Down
2 changes: 2 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ workspace(
},
)

register_toolchains(":py_toolchain")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
Expand Down

0 comments on commit 210bcf5

Please sign in to comment.