aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-09-26 12:47:19 +0400
committerXavier Claessens <xclaesse@gmail.com>2019-09-29 08:42:53 -0400
commit6c72119cfdd4b33c48ea5e248581feda65491d36 (patch)
treedac8c04421b9fd02859d5757601657487c2cc6d7 /mesonbuild/interpreter.py
parentef5fa846e03c10e2a3ec966d3e5a3b0c4dfb2e94 (diff)
downloadmeson-6c72119cfdd4b33c48ea5e248581feda65491d36.zip
meson-6c72119cfdd4b33c48ea5e248581feda65491d36.tar.gz
meson-6c72119cfdd4b33c48ea5e248581feda65491d36.tar.bz2
configure_file: add feature version checks for taking dict
Since commit 38a658214 ("configure_file: Support taking values from a dict" #4236), configuration_data() and configure_file()'s configuration kwarg can take a dict. Add missing version checks.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index e0b17db..a5274c6 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2610,6 +2610,7 @@ external dependencies (including libraries) must go to "dependencies".''')
if len(args) > 1:
raise InterpreterException('configuration_data takes only one optional positional arguments')
elif len(args) == 1:
+ FeatureNew('configuration_data dictionary', '0.49.0').use(self.subproject)
initial_values = args[0]
if not isinstance(initial_values, dict):
raise InterpreterException('configuration_data first argument must be a dictionary')
@@ -3668,6 +3669,7 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
if 'configuration' in kwargs:
conf = kwargs['configuration']
if isinstance(conf, dict):
+ FeatureNew('configure_file.configuration dictionary', '0.49.0').use(self.subproject)
cdata = ConfigurationDataHolder(self.subproject)
for k, v in conf.items():
cdata.set_method([k, v], {})