Stop using now deprecated mesonintrospect executable

This commit is contained in:
Mathieu Duponchelle 2017-12-18 16:55:11 +01:00
parent 834a66ec9a
commit c6c09b7317
3 changed files with 8 additions and 22 deletions

View file

@ -56,22 +56,8 @@ def accept_command(commands):
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
return meson
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"])
meson = accept_command(["meson.py", "meson"])
return meson, mesonconf, mesonintrospect
return meson

View file

@ -66,8 +66,8 @@ def get_subprocess_env(options):
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()
@ -102,8 +102,8 @@ def get_subprocess_env(options):
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'):

View file

@ -33,7 +33,7 @@ class GstBuildConfigurer:
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"