forked from vitessio/vitess
-
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.
bootstrap: Install protobuf gRPC Python plugin via PyPi and do not co…
…mpile it from a Git checkout. Tested: - I've rebuilt bootstrap docker images locally and all tests passed on them. - I ran `bootstrap.sh` and `make proto` manually on my Linux workstation and my MacOS laptop. History of changes for references: - vitessio#3220 - I got rid of compiling gRPC from source. Because of that, the gRPC Python plugin was no longer installed and "make proto" stopped working. - vitessio#3461 - This PR reverted my changes and changed back to compile gRPC from source again. However, that would not have been necessary in the first place. The "grpcio-tools" package has the protobuf compiler and the protobuf gRPC Python plugin. See: https://grpc.io/docs/quickstart/python.html#install-grpc-tools - vitessio#3516 - This PR removed the gRPC compilation, but still compiled the protobuf gRPC Python plugin. Note: As part of the now removed Python plugin compilation, we also had a compiled "protoc" binary. Since we will no longer have this binary, we're using the recommended procedure from the "grpcio-tools" package instead. See: https://grpc.io/docs/quickstart/python.html#generate-grpc-code They provide a Python wrapper script around a shared library of the "protoc" compiler, but not a binary anymore. Therefore, we have to call "python -m grpc_tools.protoc" to invoke the protobuf compiler. Other changes: - This protobuf compiler knows the Python plugin by default and does not require the --plugin flag for generating the Python services. - In contrast, --plugin is now required to pass the gRPC Go plugin. - The Python plugin changed its flag from --grpc_out to --grpc_python_out. - The Python plugin emits different files since gRPC 1.7.0. I'll regenerate the files in a separate commit. See: https://github.com/grpc/grpc/releases/tag/v1.7.0 - Removed unlinking and linking back of Homebrew "protobuf" package. It looks to me like an existing package should not interfere with our virtualenv environment. - Removed cleanup call where we deleted the obsolete $VTROOT/dist/protobuf directory. If users still have that directory on disk, they can delete it manually themselves. Existing directories should not interfere with the new approach. Signed-off-by: Michael Berlin <[email protected]>
- Loading branch information
1 parent
54a5237
commit 622df68
Showing
5 changed files
with
45 additions
and
111 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
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
This file was deleted.
Oops, something went wrong.