Skip to main content

Compile protobuffers with setuptools

Project description

protobufferize

A simple setuptools plugin to compile proto files at build time.

Installation

Install from PyPI: pip3 install protobufferize

Configuration

Available configuration parameters:

  • clearOutputDirectory [default: false]
  • grpcOutputDirectory [default: None]
  • outputDirectory [default: ./output]
  • protoSourceRoot [default: ./protos]
  • protoVersion [default: 3.10.1]

XML configuration example:

<ProtobufferizeConfiguration>
	<clearOutputDirectory>false</clearOutputDirectory>
	<grpcOutputDirectory>test_data/grpc_output</grpcOutputDirectory>
	<outputDirectory>test_data/output</outputDirectory>
	<protoSourceRoot>test_data/protos</protoSourceRoot>
	<protoVersion>3.10.1</protoVersion>
</ProtobufferizeConfiguration>

A xml configuration file named protobufferize.xml should be put in the python's project root folder. In alternative, the configuration file's path can be specified in the environment variable protobufferize_conf.

Usage

Compile every .proto file in protoSourceRoot subdirectories and output in the specified outputDirectory (outputDirectory gets emptied beforewards if clearOutputDirectory set to true).

python3 setup.py protobufferize

Internal details

By default, the specified version of protoc binary is downloaded and executed to compile the profo files.

If grpcOutputDirectory is set - instead - the latest grpc-tools pypi package is used (and the protoc version is ignored for compatibility problems).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

protobufferize-2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

protobufferize-2.0-py2.py3-none-any.whl (15.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file protobufferize-2.0.tar.gz.

File metadata

  • Download URL: protobufferize-2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for protobufferize-2.0.tar.gz
Algorithm Hash digest
SHA256 2b7bdd912913d62bc3efa42f53ed78765464e52102ba741958c0a3a3fe506dca
MD5 42c6c272d537fde8a6f230407e010130
BLAKE2b-256 f45bd3cfe980046a7b9827ca708b59a4a89cce8aee6a631ccb3c1368cc383f20

See more details on using hashes here.

File details

Details for the file protobufferize-2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: protobufferize-2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for protobufferize-2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b52ad5697023c6145d7407c4ad4141f678e0be70747ad0eb21a4e178789bff84
MD5 276258b6264f742551f5b92ba54cac67
BLAKE2b-256 6a04281f1d0b80ba4d7651ae9a7f03a13c80a2b474ac25192b6954d5f7e211d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page