Commit Graph

87 Commits

Author SHA1 Message Date
Alexander Polcyn 1197454f5a Regenerate projects 2020-01-17 15:36:25 -08:00
Esun Kim 7be821ac47 Yapf all target python sources 2020-01-03 09:25:10 -08:00
Richard Belleville 6feae07504 Regenerate projects 2019-12-03 15:08:50 -08:00
Lidi Zheng c34bef4ca4 Format all Bazel files with buildifier 2019-11-05 14:03:52 -08:00
Yash Tibrewal 07ef24344c Regenerate projects 2019-10-24 11:54:20 -07:00
Lidi Zheng 8ab1672c88 Release 3.8 wheels 2019-10-15 15:59:06 -07:00
Esun Kim cf444b9cab Regenerate projects 2019-09-10 14:08:50 -07:00
Richard Belleville d649880044 Add strip_prefix to python protoc plugin and py_grpc_library 2019-08-30 16:47:22 -07:00
Richard Belleville 8ce740cfe0 Switch py_proto_library from using src to deps to conform with google3 2019-08-21 14:24:06 -07:00
Richard Belleville 3db8828876 Add TODOs for prefix stripping 2019-08-06 15:24:09 -07:00
Richard Belleville e1980a7a5a Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-02 15:02:31 -07:00
Karthik Ravi Shankar fcb43f9dee Regenerate projects 2019-08-01 17:34:02 -07:00
Richard Belleville e64961d658 Shorten long lines. 2019-08-01 16:22:02 -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
Esun Kim cd27a36924 Regenerate projects 2019-06-18 15:40:50 -07:00
Richard Belleville 5d95bf037d Actually include README.rst in all packages 2019-05-20 14:21:25 -07:00
Richard Belleville cb9e2188ab Add python deprecation notices. 2019-05-20 13:05:37 -07:00
Srini Polavarapu 6bc2ff1b5f Regenerate projects 2019-05-10 10:38:59 -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 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
Lidi Zheng 0231bf3b01 Regenerate projects 2019-03-29 16:24:50 -07:00
Srini Polavarapu b0efc103e3 Regenerate projects 2019-02-12 21:07:42 -08:00
Richard Belleville dbad0522c3 Revert "Merge pull request #17752 from grpc/license-symlinks"
This reverts commit 3f8e15e2a4, reversing
changes made to a8662121c7.
2019-01-24 10:10:22 -08:00
Richard Belleville 8609f42e15 Stop copying LICENSE files 2019-01-17 15:16:37 -08:00
Sanjay Pujare 94d5587643 Regenerate projects 2019-01-03 15:35:20 -08:00
Lidi Zheng 5584d58e6c Add LICENSE to grpcio-* packages
* Using the proprocess command to copy the LICENSE
2018-12-05 15:25:48 -08:00
Muxi Yan f3e4ae633e Regenerate projects 2018-11-19 15:24:53 -08:00
Naresh e4382abc9c Bazel rules for Python grpcio_reflection 2018-11-01 12:01:02 +00:00
Mehrdad Afshari 45e8ada064 Revert "Bazel rules for Python grpcio_reflection"
This reverts commit 2e78e516ad.
2018-10-12 12:12:29 -07:00
Naresh 2e78e516ad
Bazel rules for Python grpcio_reflection 2018-10-11 09:14:58 +00:00
Stanley Cheung e5ce1e36e6 Regenerate projects 2018-10-08 15:50:50 -07:00
Juanli Shen 8ceb27a324 Regenerate projects 2018-08-27 14:27:55 -07:00
Jan Tattermusch bc8495da7a upgrade python to protobuf 3.6.0 2018-08-07 14:28:40 +02:00
Mehrdad Afshari b12f0aaf07 Add SERVICE_NAME to reflection/health 2018-07-26 11:45:59 -07:00
Srini Polavarapu 8c9af7464c Regenerate projects 2018-07-19 09:52:56 -07:00
Srini Polavarapu c79c156307 Regenrate projects 2018-06-08 17:01:18 -07:00
Mehrdad Afshari 2d43a45ad1 Regenerate projects 2018-05-02 22:49:52 -07:00
Mehrdad Afshari 8e9baf35bd Bump protobuf runtime dependency versions 2018-04-19 02:07:59 -04:00
Mehrdad Afshari 90cfc8ed57 Regenerate projects 2018-04-04 14:04:11 -07:00
Naresh c6e4372f8a Create README for gRPC Python reflection package
Currently, `warning: sdist: standard file not found` warning is always
printed when creating source distribution for gRPC python reflection
package. This should stop that.
2018-03-13 19:43:43 +00:00
Mehrdad Afshari 9073ea03ef Regenerate projects 2018-02-22 22:21:33 -08:00
Mehrdad Afshari 43884047c9 Regenerate projects 2018-01-19 14:25:15 -08:00
Mehrdad Afshari 87cd994b04 Upgrade yapf to 0.20.0
Upgrade yapf version to 0.20.0 and reformat Python files.
2018-01-02 14:40:00 -08:00
ncteisen 0f6c518e3c yapf-ize grpcio_reflection 2017-12-11 16:22:30 -08:00
Mehrdad Afshari 14e96f9ae8 Bump 1.8.0-dev to 1.9.0-dev 2017-11-27 17:14:15 -08:00
Mehrdad Afshari 0df9c8acdc Update Python dependency to protobuf v3.5.0.post1 2017-11-27 12:52:41 -08:00
Mehrdad Afshari 90dbd2b670 Alter health/reflection packages' build criterion
Using the presence of the `*_pb2_grpc` module, as opposed to the absence
of the build script (`*_commands` module) is a problematic choice,
because even if a generated file is present, the test infrastructure may
want to regenerate it under a different environment (e.g. different
Python/proto package version).  This will ensure the protos always get
recompiled if we have a `*_commands` module present, signaling we are in
a build environment, thereby making the process hermetic.
2017-11-20 18:37:34 -08:00
Mehrdad Afshari 9d1ba2efd9 Fix grpcio_{health_checking,reflection} packaging
The previous packaging structure exhibited strange behavior of
slowness when trying to use pip to install grpcio-reflection
or grpcio-health-checking in a single line with grpcio-tools.

The root cause seems to be the complicated interaction between
pip and setuptools and the fact that we ship a single .tar.gz
"source" archive for `grpcio_reflection` and
`grpcio_health_checking` packages.  `pip` tries to build this
"source" package, and our build process wants to generate
code for the `.proto` files in the package.  However, we have
already processed the `.proto` files into `_pb2.py` files in
our artifact build process, and installing `grpcio_tools`
to get `grpcio_{reflection,health_checking}` seems excessive.
The behavior gets worse since `setuptools`, while building
the package from source, tries to fetch `grpcio_tools` from
source and build that too.  This takes a while, since it
involves compiling a bunch of native code from `protobuf` and
`grpc` and requires a C compiler to boot.

This commit modifies the Python artifact for the two packages
so that they will not include the raw `.proto` files in the
distribution uploaded to PyPI, nor would they contain the
Python module that does the preprocessing code generation
from the respective .proto files.  Instead, a specific code
path is taken when the generated `_pb2_grpc` Python module is
not present in the package to provide such functionality
when built from the gRPC git repository (and hence when built
from our CI infrastructure.)
2017-11-15 16:36:25 -08:00
Mehrdad Afshari d7a03c8197 Correct HEALTH_PROTO to REFLECTION_PROTO 2017-11-13 13:55:49 -08:00