A setuptools extension for automatically compiling protobuf files (.proto) during the build process. It integrates with setuptools' build system to generate Python protobuf modules without manual protoc invocation. Currently version 0.1.16, stable, with occasional updates.
pip install setuptools-protobufNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup.py using setuptools-protobuf. Place .proto files under 'protos/' (or specify via proto_path). The extension compiles them to Python modules during the build.
Ensure proto_package in setup.py equals the 'package' directive in your .proto files (e.g., package my.proto; -> proto_package='my.proto').
Install protobuf separately or ensure your build environment (e.g., Docker, CI) has protobuf pre-installed. Use pyproject.toml's build-system.requires for better isolation.
Migrate to pyproject.toml: [build-system] requires = ["setuptools", "wheel", "setuptools-protobuf", "protobuf"] build-backend = "setuptools.build_meta"
Use Python 3.9+ or pin to an older version like setuptools-protobuf==0.1.13 if you need Python 3.8.
Run 'pip install protobuf' before 'python setup.py install' or add 'protobuf' to build-system.requires in pyproject.toml.
Ensure the version of protobuf used at build time matches the runtime version. Pin protobuf version in setup.py or pyproject.toml.
Verify setuptools-protobuf is listed in setup_requires or build-system.requires. Use pip install -e . for development.
No resource links recorded.