[gobject-introspection/ebassi/glib-update] build: Add run_command() argument
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/ebassi/glib-update] build: Add run_command() argument
- Date: Wed, 13 Jul 2022 14:03:41 +0000 (UTC)
commit 3b5db10205023bfa43a9675a6ade826653a1c41c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Jul 13 14:49:29 2022 +0100
build: Add run_command() argument
The `check` argument to `run_command()` is now mandatory.
gir/meson.build | 14 +++++++-------
meson.build | 4 ++--
tests/scanner/meson.build | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gir/meson.build b/gir/meson.build
index 2c658c03..dc39b475 100644
--- a/gir/meson.build
+++ b/gir/meson.build
@@ -113,7 +113,7 @@ if dep_type == 'pkgconfig'
glib_files += join_paths(glib_incdir, 'glib-unix.h')
endif
# Parse glob to get installed header list
- ret = run_command(python, '-c', globber.format(join_paths(glib_incdir, 'glib', '*.h')))
+ ret = run_command(python, '-c', globber.format(join_paths(glib_incdir, 'glib', '*.h')), check: true)
if ret.returncode() != 0
error('Failed to get glib header list')
endif
@@ -121,7 +121,7 @@ if dep_type == 'pkgconfig'
# Get a list of all source files
glib_srcdir = get_option('glib_src_dir')
if glib_srcdir != ''
- ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'glib', '*.c')))
+ ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'glib', '*.c')), check: true)
if ret.returncode() != 0
error('Failed to get glib source list')
endif
@@ -263,13 +263,13 @@ gobject_command = scanner_command + [
if dep_type == 'pkgconfig'
gobject_command += ['--external-library', '--pkg=gobject-2.0']
# Get the installed header list
- ret = run_command(python, '-c', globber.format(join_paths(glib_incdir, 'gobject', '*.h')))
+ ret = run_command(python, '-c', globber.format(join_paths(glib_incdir, 'gobject', '*.h')), check: true)
if ret.returncode() != 0
error('Failed to get gobject header list')
endif
gobject_headers = ret.stdout().strip().split('\n')
if glib_srcdir != ''
- ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'gobject', '*.c')))
+ ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'gobject', '*.c')), check: true)
if ret.returncode() != 0
error('Failed to get gobject source list')
endif
@@ -379,7 +379,7 @@ gio_command = scanner_command + [
if dep_type == 'pkgconfig'
gio_command += ['--external-library', '--pkg=gio-2.0']
# Get the installed header list
- ret = run_command(python, '-c', globber.format(join_paths(glib_incdir, 'gio', '*.h')))
+ ret = run_command(python, '-c', globber.format(join_paths(glib_incdir, 'gio', '*.h')), check: true)
if ret.returncode() != 0
error('Failed to get gio header list')
endif
@@ -388,7 +388,7 @@ if dep_type == 'pkgconfig'
# probably fine since it matches what Autotools does. We are more exact in
# the subproject case.
if glib_srcdir != ''
- ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'gio', '*.c')))
+ ret = run_command(python, '-c', globber.format(join_paths(glib_srcdir, 'gio', '*.c')), check: true)
if ret.returncode() != 0
error('Failed to get gio source list')
endif
@@ -420,7 +420,7 @@ if giounix_dep.found()
gio_command += ['--pkg=gio-unix-2.0']
giounix_includedir = get_option('gi_cross_pkgconfig_sysroot_path') +
join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')
# Get the installed gio-unix header list
- ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h')))
+ ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h')), check:
true)
if ret.returncode() != 0
error('Failed to get gio-unix header list')
endif
diff --git a/meson.build b/meson.build
index 1f132694..c30261e9 100644
--- a/meson.build
+++ b/meson.build
@@ -198,8 +198,8 @@ with_doctool = true
if doctool_option.disabled()
with_doctool = false
else
- has_mako = run_command(python, ['-c', 'import mako']).returncode() == 0
- has_markdown = run_command(python, ['-c', 'import markdown']).returncode() == 0
+ has_mako = run_command(python, ['-c', 'import mako'], check: false).returncode() == 0
+ has_markdown = run_command(python, ['-c', 'import markdown'], check: false).returncode() == 0
if not has_mako or not has_markdown
if doctool_option.enabled()
error('doctool requires markdown and mako')
diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build
index b81b3fd5..e77c2de0 100644
--- a/tests/scanner/meson.build
+++ b/tests/scanner/meson.build
@@ -102,7 +102,7 @@ regress_lib = shared_library('regress-1.0',
dependencies: [gobject_dep, gio_dep] + regress_deps,
)
-python_path = run_command(python, ['-c', 'import sys; sys.stdout.write(sys.executable)']).stdout()
+python_path = run_command(python, ['-c', 'import sys; sys.stdout.write(sys.executable)'], check:
true).stdout()
gircompiler_command = [
test_gircompiler, '-o', '@OUTPUT@', '@INPUT@',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]