aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/python.py4
-rw-r--r--mesonbuild/modules/unstable_icestorm.py3
2 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 0e569a0..a705109 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -25,6 +25,7 @@ from ..interpreterbase import (
InterpreterObject, InvalidArguments
)
from ..interpreter import ExternalProgramHolder
+from ..interpreterbase import flatten
from ..build import known_shmod_kwargs
from .. import mlog
from ..environment import detect_cpu_family
@@ -415,6 +416,9 @@ class PythonInstallation(ExternalProgramHolder, InterpreterObject):
except AttributeError:
raise InvalidArguments('Python object does not have method %s.' % method_name)
+ if not getattr(fn, 'no-args-flattening', False):
+ args = flatten(args)
+
if method_name in ['extension_module', 'dependency', 'install_sources']:
value = fn(self.interpreter, None, args, kwargs)
return self.interpreter.holderify(value)
diff --git a/mesonbuild/modules/unstable_icestorm.py b/mesonbuild/modules/unstable_icestorm.py
index 55c647f..bf06314 100644
--- a/mesonbuild/modules/unstable_icestorm.py
+++ b/mesonbuild/modules/unstable_icestorm.py
@@ -13,6 +13,7 @@
# limitations under the License.
from .. import mesonlib
+from ..interpreterbase import flatten
from . import ExtensionModule
@@ -42,7 +43,7 @@ class IceStormModule(ExtensionModule):
kwarg_sources = kwargs.get('sources', [])
if not isinstance(kwarg_sources, list):
kwarg_sources = [kwarg_sources]
- all_sources = interpreter.source_strings_to_files(interpreter.flatten(arg_sources + kwarg_sources))
+ all_sources = interpreter.source_strings_to_files(flatten(arg_sources + kwarg_sources))
if 'constraint_file' not in kwargs:
raise mesonlib.MesonException('Constraint file not specified.')