aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/gen_java_codenav_protobuf.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
committeralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
commitbf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch)
tree1d1df72c0541a59a81439842f46d95396d3e7189 /build/scripts/gen_java_codenav_protobuf.py
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/scripts/gen_java_codenav_protobuf.py')
-rw-r--r--build/scripts/gen_java_codenav_protobuf.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/scripts/gen_java_codenav_protobuf.py b/build/scripts/gen_java_codenav_protobuf.py
new file mode 100644
index 0000000000..aee8cfe6c3
--- /dev/null
+++ b/build/scripts/gen_java_codenav_protobuf.py
@@ -0,0 +1,22 @@
+import argparse
+import os
+
+
+def just_do_it(kythe_to_proto, entries, out_name, build_file, source_root):
+ with open(build_file) as f:
+ classpath = os.pathsep.join([line.strip() for line in f])
+ os.execv(
+ kythe_to_proto,
+ [kythe_to_proto, '--sources-rel-root', 'fake_arcadia_root', '--entries', entries, '--out', out_name, '--classpath', classpath, '--arcadia-root', source_root]
+ )
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--kythe-to-proto", help="kythe_to_proto tool path")
+ parser.add_argument("--entries", help="entries json path")
+ parser.add_argument("--out-name", help="protbuf out name")
+ parser.add_argument("--build-file", help="build file( containing classpath )")
+ parser.add_argument("--source-root", help="source root")
+ args = parser.parse_args()
+ just_do_it(args.kythe_to_proto, args.entries, args.out_name, args.build_file, args.source_root)