grpc_tools
frequenz.repo.config.setuptools.grpc_tools ¤
Setuptool hooks to build protobuf files.
This module contains a setuptools command that can be used to compile protocol buffer files in a project.
It also runs the command as the first sub-command for the build command, so protocol buffer files are compiled automatically before the project is built.
Classes¤
frequenz.repo.config.setuptools.grpc_tools.CompileProto ¤
Bases: Command
Build the Python protobuf files.
Source code in frequenz/repo/config/setuptools/grpc_tools.py
Attributes¤
description
class-attribute
instance-attribute
¤
description: str = 'compile protobuf files'
Description of the command.
include_paths
instance-attribute
¤
include_paths: str
Comma-separated list of paths to include when compiling the protobuf files.
proto_path
instance-attribute
¤
proto_path: str
The path of the root directory containing the protobuf files.
py_path
instance-attribute
¤
py_path: str
The path of the root directory where the Python files will be generated.
user_options
class-attribute
instance-attribute
¤
user_options: list[tuple[str, str | None, str]] = [
(
"proto-path=",
None,
"path of the root directory containing the protobuf files",
),
(
"proto-glob=",
None,
"glob pattern to use to find the protobuf files",
),
(
"include-paths=",
None,
"comma-separated list of paths to include when compiling the protobuf files",
),
(
"py-path=",
None,
"path of the root directory where the Python files will be generated",
),
]
Options of the command.
Functions¤
finalize_options ¤
initialize_options ¤
Initialize options.
Source code in frequenz/repo/config/setuptools/grpc_tools.py
run ¤
Compile the Python protobuf files.