This is a placeholder repository that provides aliases for the native Bazel
python rules. In the future, this will also become the home for rules that
download pip packages, and other non-Core Python functionality.
Add the following to your WORKSPACE file to add the external repositories:
git_repository(
name = "io_bazel_rules_python",
remote = "https://github.com/bazelbuild/rules_python.git",
commit = "{HEAD}",
)Then in your BUILD files load the python rules with:
load(
"@io_bazel_rules_python//python:python.bzl",
"py_binary", "py_library"
)
py_binary(
name = "main",
...
)See Bazel core documentation.
See Bazel core documentation.