Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python interface to Protobuf #66

Open
hjmallon opened this issue Nov 13, 2019 · 3 comments
Open

Add python interface to Protobuf #66

hjmallon opened this issue Nov 13, 2019 · 3 comments

Comments

@hjmallon
Copy link

I am in a position where I could do with the Python (as well as the C++) interface included in the hunter version of Protobuf. brew install protobuf includes the python bindings too for example, see here.

I am not an expert in Python so I am not clear on the exact stages to this but I think we have a few options:

  • Bind the url_sha1_cmake and url_sha1_pip generators together somehow to make a nasty Protobuf specific one
  • Patch the protobuf cmake to optionally build and install the python bindings
  • Have a separate pip_protobuf project (I tried this but the pip install needs to have a working directory in the SOURCE/python dir so changes would need to be made to url_sha1_pip.cmake).

I posted this on Gitter too (thought an issue might be better).

@bkotzz
Copy link
Member

bkotzz commented Nov 22, 2019

I feel like the second option is the way to go - and we could have a certain version of protobuf that includes the python bindings.

When you say the bindings, I assume you mean the runtime library and not the compiler? Is there something here that you can’t get by installing the equivalent version from https://pypi.org/project/protobuf/?

@hjmallon
Copy link
Author

When you say the bindings, I assume you mean the runtime library and not the compiler? Is there something here that you can’t get by installing the equivalent version from https://pypi.org/project/protobuf/?

Yep, I want the python bindings (as in the pypi package) at the same protobuf version as hunter is providing.

@bkotzz
Copy link
Member

bkotzz commented Nov 25, 2019

Got it. I’m just mentioning that every protobuf release is generally in pypi so you can probably find the same version there.

But if you’re interested in doing this, it will probably be easiest to make a new branch in the fork, make the required changes there, and then publish it as a separate release (ex. 3.10.0-with-py).

Also, if it’s easy to add the language runtime for all languages at once it may be worth doing that, instead of just python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants