Add 0.41.0 features

pull/3486/head
Salamandar 7 years ago
parent fa6550b277
commit d5207e1c4f
  1. 1
      mesonbuild/build.py
  2. 3
      mesonbuild/interpreter.py
  3. 5
      mesonbuild/modules/pkgconfig.py

@ -331,6 +331,7 @@ a hard error in the future.''' % name)
myid = subdir_part + '@@' + myid
return myid
@FeatureNewKwargs('build target', '0.41.0', ['rust_args'])
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
def process_kwargs(self, kwargs):
if 'build_by_default' in kwargs:

@ -2861,6 +2861,8 @@ root and issuing %s.
def func_vcs_tag(self, node, args, kwargs):
if 'input' not in kwargs or 'output' not in kwargs:
raise InterpreterException('Keyword arguments input and output must exist')
if 'fallback' not in kwargs:
FeatureNew('Optional fallback in vcs_tag', '0.41.0').use()
fallback = kwargs.pop('fallback', self.project_version)
if not isinstance(fallback, str):
raise InterpreterException('Keyword argument fallback must be a string.')
@ -3174,6 +3176,7 @@ root and issuing %s.
self.build.install_dirs.append(idir)
return idir
@FeatureNewKwargs('configure_file', '0.41.0', ['capture'])
@permittedKwargs(permitted_kwargs['configure_file'])
def func_configure_file(self, node, args, kwargs):
if len(args) > 0:

@ -21,7 +21,7 @@ from .. import mesonlib
from .. import mlog
from . import ModuleReturnValue
from . import ExtensionModule
from ..interpreterbase import permittedKwargs
from ..interpreterbase import permittedKwargs, FeatureNewKwargs, FeatureNew
class DependenciesHelper:
def __init__(self, name):
@ -304,10 +304,13 @@ class PkgConfigModule(ExtensionModule):
ofile.write(self._escape(f))
ofile.write('\n')
@FeatureNewKwargs('pkgconfig.generate', '0.41.0', ['variables'])
@permittedKwargs({'libraries', 'version', 'name', 'description', 'filebase',
'subdirs', 'requires', 'requires_private', 'libraries_private',
'install_dir', 'extra_cflags', 'variables', 'url', 'd_module_versions'})
def generate(self, state, args, kwargs):
if 'variables' in kwargs:
FeatureNew('custom pkgconfig variables', '0.41.0').use()
default_version = state.project_version['version']
default_install_dir = None
default_description = None

Loading…
Cancel
Save