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: _setuptools.Command
Build the Python protobuf files.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/frequenz/repo/config/setuptools/grpc_tools.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
Attributes¤
description: str = 'compile protobuf files'
class-attribute
instance-attribute
¤
Description of the command.
include_paths: str
instance-attribute
¤
Comma-separated list of paths to include when compiling the protobuf files.
proto_glob: str
instance-attribute
¤
The glob pattern to use to find the protobuf files.
proto_path: str
instance-attribute
¤
The path of the root directory containing the protobuf files.
py_path: str
instance-attribute
¤
The path of the root directory where the Python files will be generated.
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')]
class-attribute
instance-attribute
¤
Options of the command.
Functions¤
finalize_options()
¤
Finalize options.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/frequenz/repo/config/setuptools/grpc_tools.py
71 72 |
|
initialize_options()
¤
Initialize options.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/frequenz/repo/config/setuptools/grpc_tools.py
62 63 64 65 66 67 68 69 |
|
run()
¤
Compile the Python protobuf files.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/frequenz/repo/config/setuptools/grpc_tools.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|