Skip to content

Commit

Permalink
Add support for passing data attr to Python library rules, closes #257
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliddell committed Jun 4, 2023
1 parent 8c6b08f commit f17c845
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/python_grpc_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions python/python_grpclib_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions python/python_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tools/rulegen/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
)
Expand All @@ -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 }}
)
Expand Down Expand Up @@ -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 }}
)
Expand Down

0 comments on commit f17c845

Please sign in to comment.