API Reference#
ansys.tools.protoc_helper#
A utility for compiling ‘.proto’ files to Python source.
- class ansys.tools.protoc_helper.BuildPyCommand(dist, **kw)#
Command to compile .proto files while building the package wheel.
Override for the
build_py
command which adds compilation of .proto files to Python source.
- class ansys.tools.protoc_helper.DevelopCommand(dist, **kw)#
Command to compile .proto files during editable installs.
Override for the
develop
command which adds compilation of .proto files to Python source.
- ansys.tools.protoc_helper.compile_proto_files(target_package: str) None #
Compile .proto files in a package to Python source.
Creates Python files and
.pyi
type stubs from the.proto
files in thetarget_package
. Proto files from all installed packages defining theansys.tools.protoc_helper.proto_provider
entry point are included as possible dependencies.- Parameters:
- target_package
Path of the package whose
.proto
files should be compiled.