Commit Graph

7 Commits

Author SHA1 Message Date
Matt Wilson 594e1f6a64 py_proto_library uses workspace and pkg paths
All python imports currently are added to the runfiles under __main__
which is only the default when no workspace name is provided. This
change supports both empty workspace names, and specified workspace
names.

This also supports python libs not anchored at root
2020-04-27 09:04:37 -10:00
Danjie Wenren 93e8830070 Address comments.
- Fix sanit test check_bazel_workspace.py.
- Use the new `grpc_extra_deps` in the Bazel workspace test.
2019-10-14 22:51:10 -07:00
Rafi Kamal 7c85e29076 Add protobuf_deps to python_test_repo WORKSPACE 2019-09-13 14:03:05 -07:00
Richard Belleville 3638167e40 Call grpc_python_deps() from grpc_deps(). 2019-08-05 12:57:50 -07:00
Richard Belleville e89096cdf2 AAAAAAAHHHHHH 2019-08-02 16:04:59 -07:00
Richard Belleville f054bd73f4 Compensate for missing upb dependencies 2019-08-02 14:47:18 -07:00
Richard Belleville 7b2c8c27b0 Separate py_grpc_library and py_proto_library.
By popular demand, we'll now be offering separate py_grpc_library and
py_proto_library targets sharing the same interface as within google3.
This change necessitated some modifications to how we pull in our own
Python-level dependencies and how we make those available to those
pulling in our project via Bazel.

There is now a grpc_python_deps() Bazel workspace rule that pulls in the
appropriate dependencies, which should be called from the client
project's WORKSPACE file. A test has been added to the bazel/test/
directory to verify that this behavior works as intended.

It's worth noting that the protobuf repository's usage of Starlark
bind() caused a great deal of trouble in ensuring that we could also
pull in six.

This change also required a change in the way generated proto code is
imported in the channelz and health-check modules, as well as in their
associated tests. We were importing them two different ways, each
relative. This resulted in two different module objects being imported
into the process, which were incompatible. I am not sure exactly what
caused this behavior to begin, as this should have been possible before
this PR. As a workaround, I am simply trying two different absolute
imports and using the one that works. This should function both inside
and outside of Bazel environments.
2019-08-01 15:16:22 -07:00