Add support for passing data attr to Python library rules, closes #257

This commit is contained in:
Adam Liddell 2023-06-04 23:21:51 +01:00
parent 8c6b08f55b
commit f17c8455e9
4 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,7 @@ def python_grpc_library(name, **kwargs):
name = name,
srcs = [name_pb],
deps = GRPC_DEPS + kwargs.get("deps", []),
data = kwargs.get("data", []), # See https://github.com/rules-proto-grpc/rules_proto_grpc/issues/257 for use case
imports = [name_pb],
**{
k: v

View File

@ -24,6 +24,7 @@ def python_grpclib_library(name, **kwargs):
deps = [
"@com_google_protobuf//:protobuf_python",
] + GRPC_DEPS + kwargs.get("deps", []),
data = kwargs.get("data", []), # See https://github.com/rules-proto-grpc/rules_proto_grpc/issues/257 for use case
imports = [name_pb],
**{
k: v

View File

@ -22,6 +22,7 @@ def python_proto_library(name, **kwargs):
name = name,
srcs = [name_pb],
deps = PROTO_DEPS + kwargs.get("deps", []),
data = kwargs.get("data", []), # See https://github.com/rules-proto-grpc/rules_proto_grpc/issues/257 for use case
imports = [name_pb],
**{
k: v

View File

@ -53,6 +53,7 @@ def {{ .Rule.Name }}(name, **kwargs):
name = name,
srcs = [name_pb],
deps = PROTO_DEPS + kwargs.get("deps", []),
data = kwargs.get("data", []), # See https://github.com/rules-proto-grpc/rules_proto_grpc/issues/257 for use case
imports = [name_pb],
{{ .Common.LibraryArgsForwardingSnippet }}
)
@ -78,6 +79,7 @@ def {{ .Rule.Name }}(name, **kwargs):
name = name,
srcs = [name_pb],
deps = GRPC_DEPS + kwargs.get("deps", []),
data = kwargs.get("data", []), # See https://github.com/rules-proto-grpc/rules_proto_grpc/issues/257 for use case
imports = [name_pb],
{{ .Common.LibraryArgsForwardingSnippet }}
)
@ -106,6 +108,7 @@ def {{ .Rule.Name }}(name, **kwargs):
deps = [
"@com_google_protobuf//:protobuf_python",
] + GRPC_DEPS + kwargs.get("deps", []),
data = kwargs.get("data", []), # See https://github.com/rules-proto-grpc/rules_proto_grpc/issues/257 for use case
imports = [name_pb],
{{ .Common.LibraryArgsForwardingSnippet }}
)