Skip to content

Commit

Permalink
Use py rules from rules_python
Browse files Browse the repository at this point in the history
The native ones will be removed in the future.

Generated with the following command:

buildozer 'new_load @rules_python//python:defs.bzl py_library' 'new_load @rules_python//python:defs.bzl py_binary' 'new_load @rules_python//python:defs.bzl py_test' 'fix unusedLoads' //...:__pkg__
  • Loading branch information
mering committed Oct 24, 2024
1 parent 7e6b18c commit 2789a29
Show file tree
Hide file tree
Showing 67 changed files with 363 additions and 236 deletions.
2 changes: 1 addition & 1 deletion examples/objective-c/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@com_github_grpc_grpc//bazel:objc_grpc_library.bzl", "objc_grpc_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application")
load("@com_github_grpc_grpc//bazel:objc_grpc_library.bzl", "objc_grpc_library")

licenses(["notice"])

Expand Down
2 changes: 2 additions & 0 deletions examples/python/auth/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")

filegroup(
name = "_credentials_files",
testonly = 1,
Expand Down
1 change: 1 addition & 0 deletions examples/python/cancellation/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")

package(default_testonly = 1)
Expand Down
2 changes: 2 additions & 0 deletions examples/python/compression/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

py_binary(
name = "server",
srcs = ["server.py"],
Expand Down
2 changes: 2 additions & 0 deletions examples/python/data_transmission/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

licenses(["notice"])

py_binary(
Expand Down
2 changes: 2 additions & 0 deletions examples/python/debug/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_testonly = 1)

py_binary(
Expand Down
1 change: 1 addition & 0 deletions examples/python/errors/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library", "py_test")

py_library(
name = "client",
Expand Down
1 change: 1 addition & 0 deletions examples/python/multiprocessing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library")

proto_library(
Expand Down
1 change: 1 addition & 0 deletions examples/python/observability/csm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_binary")

# TODO(xuanwn): Instead of using Bazel build, we should pip install all dependencies
# once we have a released version of grpcio-csm-observability.
Expand Down
2 changes: 2 additions & 0 deletions examples/python/wait_for_ready/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_testonly = 1)

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

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/experimental/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/framework/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/framework/common/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/framework/foundation/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/framework/interfaces/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/framework/interfaces/base/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio/grpc/framework/interfaces/face/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_admin/grpc_admin/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_visibility = ["//visibility:public"])

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

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_csds/grpc_csds/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_visibility = ["//visibility:public"])

py_library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")

package(default_visibility = ["//:__subpackages__"])

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

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")
load("//bazel:cython_library.bzl", "pyx_library")

package(default_visibility = ["//visibility:private"])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_status/grpc_status/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")

package(default_visibility = ["//visibility:public"])

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

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/admin/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

py_test(
name = "admin_test",
size = "small",
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/channelz/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_test")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/csds/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

py_test(
name = "csds_test",
size = "small",
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/fork/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_test")

# Copyright 2023 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/health_check/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_test")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests/interop/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")

package(default_visibility = ["//visibility:public"])

Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests/observability/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library", "py_test")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/qps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(
default_testonly = 1,
default_visibility = ["//visibility:public"],
Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests/reflection/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_test")

package(default_visibility = ["//visibility:public"])

Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests/status/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_test")

package(default_visibility = ["//visibility:public"])

Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests/stress/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_grpc_library", "py_pro
# See the License for the specific language governing permissions and
# limitations under the License.
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:defs.bzl", "py_binary")

proto_library(
name = "unary_stream_benchmark_proto",
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/testing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
4 changes: 3 additions & 1 deletion src/python/grpcio_tests/tests/unit/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//bazel:internal_python_rules.bzl", "internal_py_grpc_test")
load("@grpc_python_dependencies//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_visibility = ["//visibility:public"])

GRPCIO_TESTS_UNIT_CYTHON = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library", "py_test")

# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests_aio/benchmark/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(
default_testonly = 1,
default_visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests_aio/channelz/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_visibility = ["//visibility:public"])

py_test(
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests_aio/health_check/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_testonly = 1)

py_test(
Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests_aio/interop/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")

package(default_testonly = 1)

Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests_aio/reflection/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(default_testonly = 1)

py_test(
Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests_aio/status/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_test")

py_test(
name = "grpc_status_test",
Expand Down
2 changes: 2 additions & 0 deletions src/python/grpcio_tests/tests_aio/unit/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

package(
default_testonly = 1,
default_visibility = ["//visibility:public"],
Expand Down
1 change: 1 addition & 0 deletions src/python/grpcio_tests/tests_py3_only/interop/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_binary", "py_test")

py_binary(
name = "xds_interop_client",
Expand Down
Loading

0 comments on commit 2789a29

Please sign in to comment.