Add 0.45.0 features
This commit is contained in:
parent
c90885de6d
commit
364b8a37b9
|
@ -451,6 +451,7 @@ class GeneratorHolder(InterpreterObject, ObjectHolder):
|
|||
ObjectHolder.__init__(self, build.Generator(args, kwargs))
|
||||
self.methods.update({'process': self.process_method})
|
||||
|
||||
@FeatureNewKwargs('generator.process', '0.45.0', ['preserve_path_from'])
|
||||
@permittedKwargs({'extra_args', 'preserve_path_from'})
|
||||
def process_method(self, args, kwargs):
|
||||
extras = mesonlib.stringlistify(kwargs.get('extra_args', []))
|
||||
|
@ -1652,6 +1653,7 @@ class MesonMain(InterpreterObject):
|
|||
def project_version_method(self, args, kwargs):
|
||||
return self.build.dep_manifest[self.interpreter.active_projectname]['version']
|
||||
|
||||
@FeatureNew('meson.project_license()', '0.45.0')
|
||||
@noPosargs
|
||||
@permittedKwargs({})
|
||||
def project_license_method(self, args, kwargs):
|
||||
|
|
|
@ -14,11 +14,13 @@
|
|||
|
||||
from .. import mesonlib
|
||||
from ..interpreterbase import flatten
|
||||
from ..interpreterbase import FeatureNew
|
||||
|
||||
from . import ExtensionModule
|
||||
|
||||
class IceStormModule(ExtensionModule):
|
||||
|
||||
@FeatureNew('FPGA/Icestorm Module', '0.45.0')
|
||||
def __init__(self, interpreter):
|
||||
super().__init__(interpreter)
|
||||
self.snippets.add('project')
|
||||
|
|
|
@ -231,6 +231,10 @@ class OptionInterpreter:
|
|||
if func_name != 'option':
|
||||
raise OptionException('Only calls to option() are allowed in option files.')
|
||||
(posargs, kwargs) = self.reduce_arguments(node.args)
|
||||
|
||||
if 'yield' in kwargs:
|
||||
FeatureNew('option yield', '0.45.0').use()
|
||||
|
||||
if 'type' not in kwargs:
|
||||
raise OptionException('Option call missing mandatory "type" keyword argument')
|
||||
opt_type = kwargs.pop('type')
|
||||
|
|
Loading…
Reference in New Issue