summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2023-01-13 15:53:54 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2023-01-13 15:53:54 +0100
commitc4d1b05fc4bc3e4fddc6b890e3ad1498edf22e55 (patch)
tree32b7bb69734124acb6397609af63a8d6641df226
parente192ac99ebf261b5d5a8b199bc658ed3146996ae (diff)
downloadglibmm-c4d1b05fc4bc3e4fddc6b890e3ad1498edf22e55.tar.gz
meson.build: Simplify if-file-exists test
-rw-r--r--meson.build12
1 files changed, 2 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 974ae2ae..838d42d8 100644
--- a/meson.build
+++ b/meson.build
@@ -165,16 +165,8 @@ if maintainer_mode
project_source_root / 'untracked' / 'docs',
check: true,
)
-else
- cmd_py = '''
-import os
-import sys
-sys.exit(os.path.isfile("@0@"))
-'''.format(generate_binding_py)
- file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
- if not file_exists
- error('Missing files in untracked/. You must enable maintainer-mode.')
- endif
+elif not import('fs').is_file(generate_binding_py)
+ error('Missing files in untracked/. You must enable maintainer-mode.')
endif
# Check if perl is required and available.