MCPcopy
hub / github.com/Blizzard/s2client-proto / compile_proto

Function compile_proto

setup.py:36–49  ·  view source on GitHub ↗

Invoke Protocol Compiler to generate python from given source .proto.

(source, python_out, proto_path)

Source from the content-addressed store, hash-verified

34
35
36def compile_proto(source, python_out, proto_path):
37 """Invoke Protocol Compiler to generate python from given source .proto."""
38 if not protoc:
39 sys.exit('protoc not found. Is the protobuf-compiler installed?\n')
40
41 protoc_command = [
42 protoc,
43 '--proto_path', proto_path,
44 '--python_out', python_out,
45 source,
46 ]
47 if subprocess.call(protoc_command) != 0:
48 sys.exit('Make sure your protoc version >= 2.6. You can use a custom '
49 'protoc by setting the PROTOC environment variable.')
50
51
52class BuildPy(build_py):

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected