Chromium Code Reviews| Index: tools/protoc_wrapper/protoc_wrapper.py |
| diff --git a/tools/protoc_wrapper/protoc_wrapper.py b/tools/protoc_wrapper/protoc_wrapper.py |
| index 8eac88409c676381924f822e3d2fe924e696663a..7dffbb0ba9c633559386a730ae14e59e88b05684 100755 |
| --- a/tools/protoc_wrapper/protoc_wrapper.py |
| +++ b/tools/protoc_wrapper/protoc_wrapper.py |
| @@ -89,7 +89,8 @@ def main(argv): |
| help="Standard C++ generator options.") |
| parser.add_argument("--include", |
| help="Name of include to insert into generated headers.") |
| - |
| + parser.add_argument("--import-dir", nargs='*', default=[], |
|
scottmg
2017/01/23 16:53:11
I have no idea why this script uses " everywhere,
Ramin Halavati
2017/01/24 08:38:33
Done.
|
| + help="Name of extra import directories for protos.") |
|
scottmg
2017/01/23 16:53:11
nit; "Extra import directories for protos." would
xyzzyz
2017/01/23 17:53:56
Just like my comment in the other file, please ren
Ramin Halavati
2017/01/24 08:38:33
Done. Help corrected, name did not change as it no
|
| parser.add_argument("protos", nargs="+", |
| help="Input protobuf definition file(s).") |
| @@ -122,6 +123,10 @@ def main(argv): |
| protoc_cmd += ["--proto_path", proto_dir] |
| protoc_cmd += [os.path.join(proto_dir, name) for name in protos] |
| + |
| + for path in options.import_dir: |
|
xyzzyz
2017/01/23 17:53:56
This loop should probably be between lines 124 and
Ramin Halavati
2017/01/24 08:38:33
Done.
|
| + protoc_cmd += ["--proto_path", path] |
| + |
| ret = subprocess.call(protoc_cmd) |
| if ret != 0: |
| raise RuntimeError("Protoc has returned non-zero status: " |