-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request grpc#17081 from nathanielmanistaatgoogle/restore-p…
…ython-bazel Restore reverted Python Bazel work
- Loading branch information
Showing
8 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ wheel>=0.29 | |
futures>=2.2.0 | ||
google-auth>=1.0.0 | ||
oauth2client==4.1.0 | ||
requests>=2.14.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
load("@grpc_python_dependencies//:requirements.bzl", "requirement") | ||
load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
py_proto_library( | ||
name = "empty2_proto", | ||
protos = [ | ||
"empty2.proto", | ||
], | ||
with_grpc = True, | ||
deps = [ | ||
requirement('protobuf'), | ||
], | ||
) | ||
|
||
py_proto_library( | ||
name = "empty2_extensions_proto", | ||
protos = [ | ||
"empty2_extensions.proto", | ||
], | ||
proto_deps = [ | ||
":empty2_proto", | ||
], | ||
with_grpc = True, | ||
deps = [ | ||
requirement('protobuf'), | ||
], | ||
) | ||
|
34 changes: 34 additions & 0 deletions
34
src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
load("@grpc_python_dependencies//:requirements.bzl", "requirement") | ||
load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
genrule( | ||
name = "mv_reflection_proto", | ||
srcs = [ | ||
"//src/proto/grpc/reflection/v1alpha:reflection_proto_file", | ||
], | ||
outs = ["reflection.proto",], | ||
cmd = "cp $< $@", | ||
) | ||
|
||
py_proto_library( | ||
name = "py_reflection_proto", | ||
protos = [":mv_reflection_proto",], | ||
with_grpc = True, | ||
deps = [ | ||
requirement('protobuf'), | ||
], | ||
) | ||
|
||
py_library( | ||
name = "grpc_reflection", | ||
srcs = ["reflection.py",], | ||
deps = [ | ||
":py_reflection_proto", | ||
"//src/python/grpcio/grpc:grpcio", | ||
requirement('protobuf'), | ||
], | ||
imports=["../../",], | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
load("@grpc_python_dependencies//:requirements.bzl", "requirement") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
py_library( | ||
name = "_intraop_test_case", | ||
srcs = ["_intraop_test_case.py"], | ||
deps = [ | ||
":methods", | ||
], | ||
imports=["../../",], | ||
) | ||
|
||
py_library( | ||
name = "client", | ||
srcs = ["client.py"], | ||
deps = [ | ||
"//src/python/grpcio/grpc:grpcio", | ||
":methods", | ||
":resources", | ||
"//src/proto/grpc/testing:py_test_proto", | ||
requirement('google-auth'), | ||
], | ||
imports=["../../",], | ||
) | ||
|
||
py_library( | ||
name = "methods", | ||
srcs = ["methods.py"], | ||
deps = [ | ||
"//src/python/grpcio/grpc:grpcio", | ||
"//src/proto/grpc/testing:py_empty_proto", | ||
"//src/proto/grpc/testing:py_messages_proto", | ||
"//src/proto/grpc/testing:py_test_proto", | ||
requirement('google-auth'), | ||
requirement('requests'), | ||
requirement('enum34'), | ||
], | ||
imports=["../../",], | ||
) | ||
|
||
py_library( | ||
name = "resources", | ||
srcs = ["resources.py"], | ||
data = [ | ||
"//src/python/grpcio_tests/tests/interop/credentials", | ||
], | ||
) | ||
|
||
py_library( | ||
name = "server", | ||
srcs = ["server.py"], | ||
deps = [ | ||
"//src/python/grpcio/grpc:grpcio", | ||
":methods", | ||
":resources", | ||
"//src/python/grpcio_tests/tests/unit:test_common", | ||
"//src/proto/grpc/testing:py_test_proto", | ||
], | ||
imports=["../../",], | ||
) | ||
|
||
py_test( | ||
name="_insecure_intraop_test", | ||
size="small", | ||
srcs=["_insecure_intraop_test.py",], | ||
main="_insecure_intraop_test.py", | ||
deps=[ | ||
"//src/python/grpcio/grpc:grpcio", | ||
":_intraop_test_case", | ||
":methods", | ||
":server", | ||
"//src/python/grpcio_tests/tests/unit:test_common", | ||
"//src/proto/grpc/testing:py_test_proto", | ||
], | ||
imports=["../../",], | ||
data=[ | ||
"//src/python/grpcio_tests/tests/unit/credentials", | ||
], | ||
) | ||
|
||
py_test( | ||
name="_secure_intraop_test", | ||
size="small", | ||
srcs=["_secure_intraop_test.py",], | ||
main="_secure_intraop_test.py", | ||
deps=[ | ||
"//src/python/grpcio/grpc:grpcio", | ||
":_intraop_test_case", | ||
":methods", | ||
":server", | ||
"//src/python/grpcio_tests/tests/unit:test_common", | ||
"//src/proto/grpc/testing:py_test_proto", | ||
], | ||
imports=["../../",], | ||
) | ||
|
9 changes: 9 additions & 0 deletions
9
src/python/grpcio_tests/tests/interop/credentials/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name="credentials", | ||
srcs=glob([ | ||
"**", | ||
]), | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
load("@grpc_python_dependencies//:requirements.bzl", "requirement") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
py_test( | ||
name="_reflection_servicer_test", | ||
size="small", | ||
timeout="moderate", | ||
srcs=["_reflection_servicer_test.py",], | ||
main="_reflection_servicer_test.py", | ||
deps=[ | ||
"//src/python/grpcio/grpc:grpcio", | ||
"//src/python/grpcio_reflection/grpc_reflection/v1alpha:grpc_reflection", | ||
"//src/python/grpcio_tests/tests/unit:test_common", | ||
"//src/proto/grpc/testing:py_empty_proto", | ||
"//src/proto/grpc/testing/proto2:empty2_extensions_proto", | ||
requirement('protobuf'), | ||
], | ||
imports=["../../",], | ||
) | ||
|