aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/f2c.py
diff options
context:
space:
mode:
authorDmitry Kopylov <kopylovd@gmail.com>2022-02-10 16:48:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:18 +0300
commit7230275728d34873cba1ba78bb68669b0c5faa31 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /build/scripts/f2c.py
parentb2f5101486cc0de2e979c8ba9ada2109785bf5fd (diff)
downloadydb-7230275728d34873cba1ba78bb68669b0c5faa31.tar.gz
Restoring authorship annotation for Dmitry Kopylov <kopylovd@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/f2c.py')
-rw-r--r--build/scripts/f2c.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/build/scripts/f2c.py b/build/scripts/f2c.py
index 2668bd1a37..7021e1391f 100644
--- a/build/scripts/f2c.py
+++ b/build/scripts/f2c.py
@@ -28,31 +28,31 @@ def mkdir_p(directory):
os.makedirs(directory)
-if __name__ == '__main__':
- parser = argparse.ArgumentParser()
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
- parser.add_argument('-t', '--tool')
- parser.add_argument('-c', '--input')
- parser.add_argument('-o', '--output')
+ parser.add_argument('-t', '--tool')
+ parser.add_argument('-c', '--input')
+ parser.add_argument('-o', '--output')
- args = parser.parse_args()
+ args = parser.parse_args()
tmpdir = args.output + '.f2c'
mkdir_p(tmpdir)
- # should parse includes, really
+ # should parse includes, really
p = subprocess.Popen(
[args.tool, '-w', '-R', '-a', '-I' + os.path.dirname(args.input), '-T' + tmpdir],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
- stdout, stderr = p.communicate(input=open(args.input).read())
- ret = p.wait()
+ stdout, stderr = p.communicate(input=open(args.input).read())
+ ret = p.wait()
- if ret:
- print >>sys.stderr, 'f2c failed: %s, %s' % (stderr, ret)
- sys.exit(ret)
+ if ret:
+ print >>sys.stderr, 'f2c failed: %s, %s' % (stderr, ret)
+ sys.exit(ret)
- if 'Error' in stderr:
+ if 'Error' in stderr:
print >>sys.stderr, stderr
- with open(args.output, 'w') as f:
+ with open(args.output, 'w') as f:
f.write(header)
- f.write(stdout)
+ f.write(stdout)
f.write(footer)