aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-01-31 13:23:44 +0530
committerXavier Claessens <xclaesse@gmail.com>2019-01-31 13:48:59 -0500
commit1575bd988a0592c9ba9ce8bd706a2fcd7a6b8d56 (patch)
tree7931cd424eb3abbdd217d7d524231f54759834d1 /mesonbuild/interpreter.py
parent042f5638bf3841f71abb7a05807bb055c3aa6439 (diff)
downloadmeson-1575bd988a0592c9ba9ce8bd706a2fcd7a6b8d56.zip
meson-1575bd988a0592c9ba9ce8bd706a2fcd7a6b8d56.tar.gz
meson-1575bd988a0592c9ba9ce8bd706a2fcd7a6b8d56.tar.bz2
configure_file: Allow setting install_dir: false with deprecation
Also add location node for two more deprecations See: https://github.com/mesonbuild/meson/pull/4489#issuecomment-459246879
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index c940f40..0b9ce71 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -276,7 +276,8 @@ class ConfigurationDataHolder(MutableInterpreterObject, ObjectHolder):
if len(args) == 1 and isinstance(args[0], list) and len(args[0]) == 2:
mlog.deprecation('Passing a list as the single argument to '
'configuration_data.set is deprecated. This will '
- 'become a hard error in the future.')
+ 'become a hard error in the future.',
+ location=self.current_node)
args = args[0]
if len(args) != 2:
@@ -289,7 +290,7 @@ class ConfigurationDataHolder(MutableInterpreterObject, ObjectHolder):
msg = 'Setting a configuration data value to {!r} is invalid, ' \
'and will fail at configure_file(). If you are using it ' \
'just to store some values, please use a dict instead.'
- mlog.deprecation(msg.format(val))
+ mlog.deprecation(msg.format(val), location=self.current_node)
desc = kwargs.get('description', None)
if not isinstance(name, str):
raise InterpreterException("First argument to set must be a string.")
@@ -3594,6 +3595,10 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
# for backwards compatibility. That was the behaviour before
# 0.45.0 so preserve it.
idir = kwargs.get('install_dir', '')
+ if idir is False:
+ idir = ''
+ mlog.deprecation('Please use the new `install:` kwarg instead of passing '
+ '`false` to `install_dir:`', location=node)
if not isinstance(idir, str):
raise InterpreterException('"install_dir" must be a string')
install = kwargs.get('install', idir != '')