Calls the proto compiler to generate validator_pb2.py. Args: out_dir: directory name of the output directory. Must not have slashes, dots, etc.
(out_dir)
| 134 | |
| 135 | |
| 136 | def GenValidatorPb2Py(out_dir): |
| 137 | """Calls the proto compiler to generate validator_pb2.py. |
| 138 | |
| 139 | Args: |
| 140 | out_dir: directory name of the output directory. Must not have slashes, |
| 141 | dots, etc. |
| 142 | """ |
| 143 | logging.info('entering ...') |
| 144 | assert re.match(r'^[a-zA-Z_\-0-9]+$', out_dir), 'bad out_dir: %s' % out_dir |
| 145 | |
| 146 | subprocess.check_call( |
| 147 | ['protoc', 'validator.proto', '--python_out=%s' % out_dir]) |
| 148 | open('%s/__init__.py' % out_dir, 'w').close() |
| 149 | logging.info('... done') |
| 150 | |
| 151 | |
| 152 | def GenValidatorProtoascii(out_dir): |