Create the initial repository shell for housing Python tooling for Bazel.
8 files changed
tree: 3997d0bf2b5c3f41b395eb62fcc89b5042222907
  1. python/
  2. AUTHORS
  3. BUILD
  4. CONTRIBUTING.md
  5. CONTRIBUTORS
  6. LICENSE
  7. README.md
README.md

Bazel Python Rules

Build Status

Rules

Overview

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.

Setup

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",
  ...
)

py_library

See Bazel core documentation.

py_binary

See Bazel core documentation.