def get_meson():
meson = os.path.join(ROOTDIR, 'meson', 'meson.py')
if os.path.exists(meson):
- mesonconf = os.path.join(ROOTDIR, 'meson', 'mesonconf.py')
- mesonintrospect = os.path.join(ROOTDIR, 'meson', 'mesonintrospect.py')
- return meson, mesonconf, mesonintrospect
-
- mesonintrospect = os.environ.get('MESONINTROSPECT', None)
- if mesonintrospect and os.path.exists(mesonintrospect):
- mesondir = os.path.dirname(mesonintrospect)
- if mesonintrospect.endswith('.py'):
- meson = os.path.join(mesondir, 'meson.py')
- mesonconf = os.path.join(mesondir, 'mesonconf.py')
- else:
- meson = os.path.join(mesondir, 'meson')
- mesonconf = os.path.join(mesondir, 'mesonconf')
- else:
- meson = accept_command(["meson.py", "meson"])
- mesonconf = accept_command(["mesonconf.py", "mesonconf"])
- mesonintrospect = accept_command(["mesonintrospect.py", "mesonintrospect"])
-
- return meson, mesonconf, mesonintrospect
+ return meson
+
+ meson = accept_command(["meson.py", "meson"])
+
+ return meson
prepend_env_var(env, "GI_TYPELIB_PATH", os.path.join(PREFIX_DIR, 'lib',
'lib', 'girepository-1.0'))
- meson, mesonconf, mesonintrospect = get_meson()
- targets_s = subprocess.check_output([sys.executable, mesonintrospect, options.builddir, '--targets'])
+ meson = get_meson()
+ targets_s = subprocess.check_output([sys.executable, meson, 'introspect', options.builddir, '--targets'])
targets = json.loads(targets_s.decode())
paths = set()
mono_paths = set()
presets = set()
encoding_targets = set()
pkg_dirs = set()
- if '--installed' in subprocess.check_output([sys.executable, mesonintrospect, '-h']).decode():
- installed_s = subprocess.check_output([sys.executable, mesonintrospect,
+ if '--installed' in subprocess.check_output([sys.executable, meson, 'introspect', '-h']).decode():
+ installed_s = subprocess.check_output([sys.executable, meson, 'introspect',
options.builddir, '--installed'])
for path, installpath in json.loads(installed_s.decode()).items():
if path.endswith('.prs'):
print("Not reconfiguring")
return True
- meson, mesonconf, mesonintrospect = get_meson()
+ meson = get_meson()
if not meson:
print("Install mesonbuild to build %s: http://mesonbuild.com/\n"
"You can simply install it with:\n"