run_codegen.py 758 Bytes
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
"""Runs protoc with the gRPC plugin to generate messages and gRPC stubs."""

from grpc_tools import protoc

protoc.main((
    '',
    '-I./',
    '--python_out=.',
    '--grpc_python_out=.',
Wei Shoulin's avatar
Wei Shoulin committed
10
    './facility/observation/observation.proto',
Wei Shoulin's avatar
Wei Shoulin committed
11
))
Wei Shoulin's avatar
Wei Shoulin committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

protoc.main((
    '',
    '-I./',
    '--python_out=.',
    '--grpc_python_out=.',
    './facility/calmerge/calmerge.proto',
))

protoc.main((
    '',
    '-I./',
    '--python_out=.',
    '--grpc_python_out=.',
    './facility/level0/level0.proto',
))

protoc.main((
    '',
    '-I./',
    '--python_out=.',
    '--grpc_python_out=.',
    './facility/detector/detector.proto',
))


protoc.main((
    '',
    '-I./',
    '--python_out=.',
    '--grpc_python_out=.',
    './facility/level0prc/level0prc.proto',
))