Add interop tests for gRPC Python. py_proto_library rules are added to
src/proto/grpc/testing/BUILD since grpc_proto_library is not compatible
with py_* rules.
'requests' python module is added to requirements.bazel.txt as it is a
dependency for google-auth. Previously, this was installed through
tools/run_tests/helper_scripts/build_python.sh before running tests.
- Include new rules from bazelbuild/rules_python, which allow for
importing pip dependencies with Bazel.
- Make Cython BUILD file visible to WORKSPACE.
- Use a custom requirements file for Bazel python. This is added to
allow for requirements previously added only during build steps.
This reorganizes the Python code, scraps the current testing
infrastructure, and implements a simple test discovery and run script
based on the standard Python unittest library so we can trust that our
tests are running.
(1) Move dependency on protobuf from grpcio to grpcio_test. While the
most-commonly-foreseen use case of grpcio makes use of protobuf,
technically protobuf is not strictly needed and there's no actual
in-code relationship between grpcio and protobuf.
(2) Loosen the dependency on protobuf from ==3.0.0a3 to >=3.0.0a3.
(3) Update all references to 0.10.0* to 0.11.0.
(4) Alphabetize the grpcio_test dependencies.
Also set up environment-related details needed for a smooth Cython
experience: have the test script avoid rebuilding all dependencies if the
virtualenv directory already exists, have the PyPI distribution script
distribute the Cython generated C code rather than the .pyx files.