aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/interpreter.py8
-rw-r--r--test cases/common/108 postconf with args/meson.build2
2 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 6f65790..62b7fc0 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -812,14 +812,14 @@ class MesonMain(InterpreterObject):
self.build.install_scripts.append(build.InstallScript([scriptfile]))
def add_postconf_script_method(self, args, kwargs):
- if len(args) != 1:
- raise InterpreterException('Set_postconf_script takes exactly one argument.')
- check_stringlist(args)
+ if len(args) < 1:
+ raise InterpreterException('Not enough arguments')
+ check_stringlist(args, 'add_postconf_script arguments must be strings.')
scriptbase = args[0]
search_dir = os.path.join(self.interpreter.environment.source_dir,
self.interpreter.subdir)
exe = dependencies.ExternalProgram(scriptbase, search_dir=search_dir)
- extras = mesonlib.stringlistify(kwargs.get('args', []))
+ extras = args[1:]
self.build.postconf_scripts.append({'exe': exe, 'args': extras})
def current_source_dir_method(self, args, kwargs):
diff --git a/test cases/common/108 postconf with args/meson.build b/test cases/common/108 postconf with args/meson.build
index 74006f4..8510c5b 100644
--- a/test cases/common/108 postconf with args/meson.build
+++ b/test cases/common/108 postconf with args/meson.build
@@ -1,5 +1,5 @@
project('postconf script', 'c')
-meson.add_postconf_script('postconf.py', args: ['5', '33'])
+meson.add_postconf_script('postconf.py', '5', '33')
test('post', executable('prog', 'prog.c'))