deprecated get_configtool_variable and get_pkgconfig_variable

The get_variable method is able to do everything they do and more,
making it generally more useful. Let's tell people to stop using the old
ones.
pull/7730/head
Dylan Baker 5 years ago
parent 1d04caff29
commit 20663564bd
  1. 4
      docs/markdown/Reference-manual.md
  2. 4
      docs/markdown/snippets/deprecate_old_variable_methods.md
  3. 4
      mesonbuild/interpreter.py

@ -2422,10 +2422,14 @@ an external dependency with the following methods:
*(since 0.45.0)* A warning is issued if the variable is not defined,
unless a `default` parameter is specified.
*(Deprecated since 0.56.0*) use `get_variable(pkgconfig : ...)` instead
- `get_configtool_variable(varname)` *(since 0.44.0)*: gets the
command line argument from the config tool (with `--` prepended), or,
if invoked on a non config-tool dependency, error out.
*(Deprecated since 0.56.0*) use `get_variable(configtool : ...)` instead
- `type_name()`: returns a string describing the type of the
dependency, the most common values are `internal` for deps created
with `declare_dependency()` and `pkgconfig` for system dependencies

@ -0,0 +1,4 @@
## Deprecate Dependency.get_pkgconfig_variable and Dependency.get_configtool_variable
These have been replaced with the more versatile `get_variable()` method
already, and shouldn't be used anymore.

@ -459,6 +459,8 @@ class DependencyHolder(InterpreterObject, ObjectHolder):
def name_method(self, args, kwargs):
return self.held_object.get_name()
@FeatureDeprecated('Dependency.get_pkgconfig_variable', '0.56.0',
'use Dependency.get_variable(pkgconfig : ...) instead')
@permittedKwargs({'define_variable', 'default'})
def pkgconfig_method(self, args, kwargs):
args = listify(args)
@ -470,6 +472,8 @@ class DependencyHolder(InterpreterObject, ObjectHolder):
return self.held_object.get_pkgconfig_variable(varname, kwargs)
@FeatureNew('dep.get_configtool_variable', '0.44.0')
@FeatureDeprecated('Dependency.get_configtool_variable', '0.56.0',
'use Dependency.get_variable(configtool : ...) instead')
@permittedKwargs({})
def configtool_method(self, args, kwargs):
args = listify(args)

Loading…
Cancel
Save