diff options
author | Nicolas Schneider <nioncode+git@gmail.com> | 2016-03-02 21:32:50 +0100 |
---|---|---|
committer | Nicolas Schneider <nioncode+git@gmail.com> | 2016-03-02 21:32:50 +0100 |
commit | 5e1fdb8b971cf963958b1be2baac10b0edb0eaa2 (patch) | |
tree | fc0068b6637b1c49ce71aa03b85dbf63a6100825 | |
parent | 9f9f73fa5208bdabed5fae59af0b0b0e7d177dec (diff) | |
download | meson-5e1fdb8b971cf963958b1be2baac10b0edb0eaa2.zip meson-5e1fdb8b971cf963958b1be2baac10b0edb0eaa2.tar.gz meson-5e1fdb8b971cf963958b1be2baac10b0edb0eaa2.tar.bz2 |
use positional instead of keyword args for add_postconf_script
-rw-r--r-- | mesonbuild/interpreter.py | 8 | ||||
-rw-r--r-- | test cases/common/108 postconf with args/meson.build | 2 |
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')) |