Mark hash_corrupted() as pg_attribute_noreturn.
[pgsql.git] / src / tools / find_meson
blob50e501a801142e1ee66f99c2743412baf3557f49
1 #!/usr/bin/env python3
3 # Returns the path to the meson binary, for cases where we need to call it as
4 # part of the build, e.g. to install into tmp_install/ for the tests.
6 import os
7 import shlex
8 import sys
10 to_print = []
12 if 'MUON_PATH' in os.environ:
13     to_print += ['muon', os.environ['MUON_PATH']]
14 else:
15     mesonintrospect = os.environ['MESONINTROSPECT']
16     components = shlex.split(mesonintrospect)
18     if len(components) < 2:
19         print('expected more than two components, got: %s' % components)
20         sys.exit(1)
22     if components[-1] != 'introspect':
23         print('expected introspection at the end')
24         sys.exit(1)
26     to_print += ['meson'] + components[:-1]
28 print('\n'.join(to_print), end='')
30 sys.exit(0)