diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-28 22:25:04 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-28 22:25:04 +0300 |
commit | b8a17f9b1c166d2e9a26b99348a4c29d972caf55 (patch) | |
tree | 1a2d881f1a9452b9c6103dbf69d73da7624e98e5 /build/scripts/cpp_flatc_wrapper.py | |
parent | 25659221f18577ea38430a8ec3349836f5626b6a (diff) | |
download | ydb-b8a17f9b1c166d2e9a26b99348a4c29d972caf55.tar.gz |
Revert ymake build from ydb oss export
Diffstat (limited to 'build/scripts/cpp_flatc_wrapper.py')
-rw-r--r-- | build/scripts/cpp_flatc_wrapper.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/build/scripts/cpp_flatc_wrapper.py b/build/scripts/cpp_flatc_wrapper.py deleted file mode 100644 index 9f74b65570..0000000000 --- a/build/scripts/cpp_flatc_wrapper.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import subprocess -import sys - - -def main(): - cmd = sys.argv[1:] - h_file = None - try: - index = cmd.index('-o') - h_file = cmd[index+1] - cmd[index+1] = os.path.dirname(h_file) - except (ValueError, IndexError): - pass - p = subprocess.run(cmd, capture_output=True, text=True) - if p.returncode: - if p.stdout: - sys.stderr.write('stdout:\n{}\n'.format(p.stdout)) - if p.stderr: - sys.stderr.write('stderr:\n{}\n'.format(p.stderr)) - sys.exit(p.returncode) - if h_file and h_file.endswith(('.fbs.h', '.fbs64.h')): - cpp_file = '{}.cpp'.format(h_file[:-2]) - with open(cpp_file, 'w') as f: - f.write('#include "{}"\n'.format(os.path.basename(h_file))) - sys.exit(0) - - -if __name__ == '__main__': - main() |