Skip to main content

Plugin for setuptools and grpc / protobuf python module build

Reason this release was yanked:

Typo in build_grpc command causes gprc_files option to be overriden by proto_files option

Project description

Plugin for setuptools to compile protobuf and gRPC service files to python modules.

Usage

This package provides build_grpc command.

Run python setup.py build_grpc for available options.

Options

Command build_grpc provides following options:

  • proto_files: Newline separated list of glob patterns matching protobuf files to be compiled. Paths are relative to the current directory. ** can be used to match any files and zero or more directories. Default value is empty list.

  • grpc_files: Newline separated list of glob patterns matching grpc service files to be compiled. Paths are relative to the current directory. ** can be used to match any files and zero or more directories. Default value is empty list.

  • proto_path: Path to root directory with protobuf files. This path is passed through -I option to grpc_tools.protoc. Default is . (current directory).

  • output_path: Path to root directory for generated python modules. This path is passed through --python_out or --grpc_python_out option to grpc_tools.protoc. Default is . (current directory).

Example

# pyproject.toml
[build-system]
requires = ["setuptools", "setuptools-grpc"]
build-backend = "setuptools.build_meta"
# setup.py
from distutils.command.build import build
from setuptools import setup

class custom_build(build):
    sub_commands = [
        ('build_grpc', None),
    ] + build.sub_commands

setup(cmdclass={'build': custom_build})
# setup.cfg
[build_grpc]
proto_files = src/**/*.proto
grpc_files = src/**/*_grpc.proto
proto_path = ./src
output_path = ./out

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

setuptools-grpc-0.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

setuptools_grpc-0.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file setuptools-grpc-0.1.tar.gz.

File metadata

  • Download URL: setuptools-grpc-0.1.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for setuptools-grpc-0.1.tar.gz
Algorithm Hash digest
SHA256 e090cc9ed4543076d244b374651d05b7e46cda7666fb46709d5aa2036591b69a
MD5 4e5d843dea36bbbe30919e14b624d31b
BLAKE2b-256 d3e4203a6e0ab5f4727af0ff2f320836ac7585278f04189df77bbd04473e0ad9

See more details on using hashes here.

File details

Details for the file setuptools_grpc-0.1-py3-none-any.whl.

File metadata

  • Download URL: setuptools_grpc-0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for setuptools_grpc-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f507bdb3fb640d3d6e768cd7b0c6f2ff999fe8b4924ec7e299d83f63b4f910ae
MD5 e8382bc79028fff6adb66ee8365b9ac1
BLAKE2b-256 cf1782a047e63e14fe71fec04161923b4558cdf726fe668ec5bd9ce68c288495

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