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_pycommand 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
developcommand 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
.pyitype stubs from the.protofiles in thetarget_package. Proto files from all installed packages defining theansys.tools.protoc_helper.proto_providerentry point are included as possible dependencies.- Parameters:
- target_package
Path of the package whose
.protofiles should be compiled.