Skip to content

Fix proto files installation#62

Draft
cscarpitta wants to merge 3 commits into
masterfrom
bugfix/fix-proto-setup
Draft

Fix proto files installation#62
cscarpitta wants to merge 3 commits into
masterfrom
bugfix/fix-proto-setup

Conversation

@cscarpitta
Copy link
Copy Markdown
Contributor

This PR will fix an issue of protos not installed correctly in systems where several python interpreters are installed.

This project depends on some python classes generated from proto files. Building the proto files requires the grpcio-tools python library to be installed in your system.
We automated all these steps in the control_plane/protos/setup.py: in the current release of the project, the setup scripts first installs the grpcio-tools library by using pip and then it builds the proto files.

By running a pip install from inside a Python script, we are not able to specify the interpreter for which the package is installed.

For example, if you have both Python3.6 and Python2.7 in your system and you run python3.6 setup.py, it is possible that the grpcio-tools library is installed for Python2.7, and this causes a failure in the build process of the proto files.

This PR will fix this issue: the setup.py of the protos has been re-implemented following the design proposed in the official grpcio-tools doc: https://github.com/grpc/grpc/tree/master/tools/distrib/python/grpcio_tools

Basically, the pip installation has been replaced by the a setup_requires directive and the proto compilation has been implemented as described in the doc.

@cscarpitta cscarpitta added the bug Something isn't working label Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working build protos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant