Skip to content

Commit

Permalink
Load py_library and py_binary rules from @rules_python
Browse files Browse the repository at this point in the history
This is to prepare for the Bazel incompatible flag
'load_python_rules_from_bzl'
(bazelbuild/bazel#9006).

Change-Id: If824c080a2c5b1e02a2eaeb6873aafd7afaf949f
GitOrigin-RevId: 767e391778adc345df482cccadc1875fab80021b
  • Loading branch information
gertvdijk committed Feb 10, 2020
1 parent 9e725b7 commit cb4c149
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions bazel/rules_flake8/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_binary")
load("@flake8_deps//:requirements.bzl", "requirement")

exports_files(
Expand Down
2 changes: 2 additions & 0 deletions bazel/rules_protodoc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")

py_binary(
name = "protodoc",
srcs = ["protodoc.py"],
Expand Down
3 changes: 2 additions & 1 deletion bazel/rules_sphinx/def.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_binary")
load("@docs_deps//:requirements.bzl", "requirement")

# Borrowed from Rules Go, licensed under Apache 2.
Expand Down Expand Up @@ -118,7 +119,7 @@ _sphinx_docs = rule(

def sphinx_docs(name, extensions, **kwargs):
sphinx_main_name = name + "_sphinx_main"
native.py_binary(
py_binary(
name = sphinx_main_name,
srcs = ["//bazel/rules_sphinx:sphinx_main.py"],
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions docs/sphinx_extensions/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

py_library(
name = "sphinx_extensions",
srcs = glob(["**/*.py"]),
Expand Down
1 change: 1 addition & 0 deletions examples/python/docs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_binary")
load("@grpc_python_dependencies//:requirements.bzl", "requirement")

filegroup(
Expand Down
1 change: 1 addition & 0 deletions examples/python/hello_exchange/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_binary")
load("@grpc_python_dependencies//:requirements.bzl", "requirement")

filegroup(
Expand Down
2 changes: 2 additions & 0 deletions python/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

exports_files(
["requirements.txt"],
visibility = ["//visibility:public"],
Expand Down

0 comments on commit cb4c149

Please sign in to comment.