Skip to content

Add a setuptools extension for generating Python protobufs - #7783

Merged
dlj-NaN merged 9 commits into
protocolbuffers:masterfrom
dlj-NaN:pybuild-ext
Aug 31, 2020
Merged

dlj-NaN merged 9 commits into
protocolbuffers:masterfrom
dlj-NaN:pybuild-ext

Conversation

@dlj-NaN

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

Copy link
Copy Markdown
Contributor

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.
dlj-NaN added 3 commits August 6, 2020 20:26
- Added classifiers, including Python versions to match the protobuf package.
- Excluded the distutils plugin from the larger protobuf package.
Comment thread python/protobuf_distutils/setup.py
name='example_project',

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

@bobhancock bobhancock Aug 11, 2020 •

Copy link
Copy Markdown

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

Comment thread python/protobuf_distutils/README.md
@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.

5 participants