Commit Graph

67 Commits

Author SHA1 Message Date
Richard Belleville 3638167e40 Call grpc_python_deps() from grpc_deps(). 2019-08-05 12:57:50 -07:00
Richard Belleville e1980a7a5a Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-02 15:02:31 -07:00
Richard Belleville 9ac75a6d16 Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-01 15:25:16 -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
Tony Lu 44868ae12a Starting a new branch with same changes from https://github.com/grpc/grpc/pull/19621 2019-07-30 16:30:51 -07:00
Nicolas "Pixel" Noble 5495a7f7b1 Merge branch 'master' of https://github.com/grpc/grpc into moiz-upb 2019-07-16 19:07:24 +02:00
Nicolas "Pixel" Noble 3de02bc8cd Merge branch 'master' of https://github.com/grpc/grpc into moiz-upb 2019-07-03 19:54:22 +02:00
Marcel Hlopko 49f0fb9035 Migrate from dep.proto to dep[ProtoInfo] 2019-06-20 18:55:56 +02:00
Nicolas "Pixel" Noble 8de64087a3 Clean bazel 0.26 upgrade. 2019-06-14 00:20:29 +02:00
Moiz Haidry 49e7f4b2e4 Added more rules to resolve deps 2019-05-24 16:04:43 -07:00
Moiz Haidry 4995670257 Add support to import envoy protos 2019-05-24 14:31:52 -07:00
Moiz Haidry 6c3e3aeb77 Removed git repo from WORKSPACE as that was the incorrect location. Added the code to grpc_deps.bzl instead 2019-05-22 16:35:29 -07:00
Moiz Haidry e8a18969bb Added upb repo to grpc workspace 2019-05-22 15:30:21 -07:00
Richard Belleville 930cec4e27 Revert "Merge pull request #18912 from grpc/revert-bazel-changes"
This reverts commit c9a259aa3a, reversing
changes made to 9c882bc725.
2019-04-30 11:17:11 -07:00
Richard Belleville 50b5240d0a Revert "Merge pull request #18859 from grpc/internal_py_proto_library"
This reverts commit 5b720f19c1, reversing
changes made to a64ae3c0d5.
2019-04-29 17:47:56 -07:00
Richard Belleville afdc59712d Merge branch 'master' into internal_py_proto_library 2019-04-25 10:01:41 -07:00
Richard Belleville 05f37c8143 Remove dependency on pubref/rules_proto.
This commit resolves #18331.
This commit resolves #18256.
This commit resolves... another TODO that apparently didn't have an
associated github issue.

We swap out pubref's implementation of py_proto_library with our own,
which more closely mirrors the interface of the internal
py_proto_library, taking the descriptor file output of a proto_library
rule as input.

One minor change in behavior was introduced for simplicity. When a
py_proto_library depends on a proto_library with a source proto file in
a subdirectory of the bazel package, the import module of the resultant
python library will reflect the package, *not* the full directory of the
proto file, including both the bazel package and the subdirectories, as
pubref did previously. This behavior also more closely mirrors google
internal behavior.

This commit also introduces a slightly more stringent bazel format
script. Buildifier on its own will not take care of long lines, but by
running yapf first, we end up with a more legible file. At the moment,
there is no sanity check associated with this formatter.
2019-04-24 17:36:08 -07:00
Nicolas Lopez a32b1eb765
Merge branch 'master' into master 2019-04-11 15:00:34 -04:00
Bill Feng 5158c3db27 naming update, documentation fix 2019-04-08 14:39:09 -07:00
Bill Feng df89d8e157 bazel RBE Windows build 2019-04-05 11:40:11 -07:00
Richard Belleville 615c95ed5c Mitigate #18256 2019-04-03 18:13:52 -07:00
Nicolas Lopez bdbe0483b0 update docs 2019-03-28 09:56:50 -04:00
Nicolas Lopez a9ffc03d1b remove ubsan rbe_autoconfig target 2019-03-28 09:56:50 -04:00
Nicolas Lopez ad4926d5c6 avoid local runs from accessing remote platforms
This should fix Bazel Basic Tests for Python (Local) and other
local CI runs that are now failing.
I also have a plan to fix Bazel RBE Opt C/C++.
Bazel RBE UBSAN C/C++ might need to wait for gRPC to upgrade to
using 0.23.0
2019-03-28 09:56:50 -04:00
Nicolas Lopez d6dbaeee74 doc fixes 2019-03-28 09:56:50 -04:00
Nicolas Lopez d1640057f2 use rbe_autoconfig 2019-03-28 09:56:50 -04:00
Lidi Zheng 8bed44b2c4 Make WORKSPACE compatible with Bazel 0.20.0 for Python 2018-12-04 19:43:04 -08:00
Nicolas Noble dc930c7868
Workarounding bazelbuild/bazel#6831
This will take care of the bazel crash until we have a proper fix upstream.
2018-12-03 19:16:21 -08:00
Nicolas "Pixel" Noble dc4b538c4d Merge branch 'master' of https://github.com/grpc/grpc into fix-bazel-0.20 2018-11-30 23:27:24 +01:00
Nicolas "Pixel" Noble f0fbee5932 Bazel 0.20.0 workspace fixes. 2018-11-30 23:24:59 +01:00
Bill Feng 1e53e3c17f added back platform registration to WORKSPACE 2018-11-26 10:26:07 -08:00
Bill Feng 70f9992d77 modified execution platform registration, added host platform 2018-11-26 10:10:53 -08:00
Bill Feng a548f1cc64 fixed typo on WORKSPACE file 2018-11-20 15:43:24 -08:00
Bill Feng c04583f647 registered toolchain and platform 2018-11-20 15:23:08 -08:00
Naresh 873e0757cb
Bazel rules for Python grpcio_health_checking
Add Bazel rules for building and testing grpcio_health_checking.

An unofficial fork for rules_protobuf is used for now as it incorporates
a change (#196 by duduko on the upstream repo pubref/rules_protobuf)
which allows the protoc compiler to compile generated protos too. This
was not merged because the change was failing for golang, but works as
expected for Python.

This is needed because grpcio_health_checking fetches it's proto file
from a different directory (previously achived through setup.py) and
thus needs to be moved to the required location within bazel-genfiles
using a genrule.
2018-10-09 17:04:11 +00:00
Naresh 11f199e34d
Workspace changes to build gRPC Python with Bazel
- 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.
2018-07-27 14:44:09 +00:00
Alex Polcyn aa56034b58 Add python bazel deps needed to run resolver component tests 2018-02-14 14:06:00 -08:00
Ning Ren 174e02ae3e Packs contents of WORKSPACE into a bzl function, so that it can be resued by other projects, and simplifies cares build. 2017-12-14 17:37:55 -08:00
Adele Zhou 0384127aa8 Copy key data 2017-11-30 17:10:27 -08:00
Adele Zhou b9cb3379d5 Add bazel_toolchains 2017-11-30 17:10:27 -08:00
Mehrdad Afshari 28661ea6e1 Bump third_party/protobuf submodule to v3.5.0 2017-11-24 17:56:04 -08:00
josh 30321c96d3 Update the git hash of the Google Benchmark dependency in the Bazel WORKSPACE 2017-11-13 22:02:38 -07:00
josh d692b76864 Pulling upstream changes and resolving merge conflicts with third_party/cares/cares.BUILD 2017-11-13 21:51:27 -07:00
Vijay Pai dc7c50e6a4 Switch PB dependence to PB headers dependence 2017-11-03 22:18:29 +00:00
josh 5d710a5dfe Update Bazel WORKSPACE file and third_party/cares BUILD files to that Bazel can build gRPC as a dependency.
The WORKSPACE file now pulls third_party dependencies directly instead of requiring a git submodule init and update.
The git hashes pulled by Bazel are exactly the same as the git submodules checked into third_party.

A tiny bit of complexity comes from the c-ares project's use of ares_config.h.cmake and ares_build.c.cmake.
The current solution to this problem is to check in a valid ares_config.h and a few valid ares_config.h files.
This is the same general approach used still, but ares_config.h and ares_build.h are supplied to cares.BUILD
from the only remaining local_repository, which serves only to export these two header files.
2017-10-19 18:47:58 -06:00
Craig Tiller b7a8cace34 Add abseil to core, use it for InlinedVector 2017-10-05 09:50:18 -07:00
Nicolas "Pixel" Noble fc49d6edab Splitting gmock out of gtest. 2017-09-01 23:53:34 +02:00
Nicolas "Pixel" Noble 736907c23e Reverted submodule changes... 2017-05-12 20:27:21 +02:00
Vijay Pai a935ae1505 Fix build rules for grpc++_unsecure, test that it builds properly 2017-04-20 22:21:01 +00:00
Makarand Dharmapurikar 8f37606f60 disable mongoose 2017-04-19 10:30:07 -07:00