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 a setuptools extension for generating Python protobufs #7783

Merged
merged 9 commits into from Aug 31, 2020

Conversation

dlj-NaN
Copy link
Contributor

@dlj-NaN dlj-NaN commented Aug 7, 2020

This setuptools extension generates Python protobuf code from .proto files, so they
can be created as part of a normal Python build. The extension uses an installed
protoc binary, which can be explicitly specified if needed.

…ode.

This extension allows Python code to be generated from setup.py files, so they
are created as part of a normal Python build. The extension uses an already-existing
protoc binary, which can be explicitly specified if needed.
- Added classifiers, including Python versions to match the protobuf package.
- Excluded the distutils plugin from the larger protobuf package.
name='example_project',

# Require this package, but only for setup (not installation):
setup_requires=['protobuf_distutils'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package installs as protobuf-disutils, with a hyphen not an underbar.

After running build and install:

python -m pip freeze|grep protobuf
protobuf-distutils==1.0

@dlj-NaN dlj-NaN merged commit ff06e23 into protocolbuffers:master Aug 31, 2020
@dlj-NaN dlj-NaN deleted the pybuild-ext branch August 31, 2020 17:41
vesavlad pushed a commit to vesavlad/protobuf that referenced this pull request Sep 22, 2020
…uffers#7783)

This extension allows Python code to be generated from setup.py files, so they
are created as part of a normal Python build. The extension uses an already-existing
protoc binary, which can be explicitly specified if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants