@stringArgs
@permittedKwargs(permitted_kwargs['project'])
def func_project(self, node, args, kwargs):
    if (len(args) < 1):
        raise InvalidArguments('Not enough arguments to project(). Needs at least the project name.')
    (proj_name, *proj_langs) = args
    if (':' in proj_name):
        raise InvalidArguments("Project name {!r} must not contain ':'".format(proj_name))
    if ('meson_version' in kwargs):
        cv = coredata.version
        pv = kwargs['meson_version']
        if (not mesonlib.version_compare(cv, pv)):
            raise InterpreterException(('Meson version is %s but project requires %s' % (cv, pv)))
    if os.path.exists(self.option_file):
        oi = optinterpreter.OptionInterpreter(self.subproject)
        oi.process(self.option_file)
        self.coredata.merge_user_options(oi.options)
        self.add_build_def_file(self.option_file)
    self.project_default_options = mesonlib.stringlistify(kwargs.get('default_options', []))
    self.project_default_options = coredata.create_options_dict(self.project_default_options)
    if self.environment.first_invocation:
        default_options = self.project_default_options
        default_options.update(self.default_project_options)
        self.coredata.init_builtins(self.subproject)
    else:
        default_options = {}
    self.coredata.set_default_options(default_options, self.subproject, self.environment)
    if (not self.is_subproject()):
        self.build.project_name = proj_name
    self.active_projectname = proj_name
    self.project_version = kwargs.get('version', 'undefined')
    if (self.build.project_version is None):
        self.build.project_version = self.project_version
    proj_license = mesonlib.stringlistify(kwargs.get('license', 'unknown'))
    self.build.dep_manifest[proj_name] = {'version': self.project_version, 'license': proj_license}
    if (self.subproject in self.build.projects):
        raise InvalidCode('Second call to project().')
    if ((not self.is_subproject()) and ('subproject_dir' in kwargs)):
        spdirname = kwargs['subproject_dir']
        if (not isinstance(spdirname, str)):
            raise InterpreterException('Subproject_dir must be a string')
        if os.path.isabs(spdirname):
            raise InterpreterException('Subproject_dir must not be an absolute path.')
        if spdirname.startswith('.'):
            raise InterpreterException('Subproject_dir must not begin with a period.')
        if ('..' in spdirname):
            raise InterpreterException('Subproject_dir must not contain a ".." segment.')
        self.subproject_dir = spdirname
    self.build.subproject_dir = self.subproject_dir
    mesonlib.project_meson_versions[self.subproject] = ''
    if ('meson_version' in kwargs):
        mesonlib.project_meson_versions[self.subproject] = kwargs['meson_version']
    self.build.projects[self.subproject] = proj_name
    mlog.log('Project name:', mlog.bold(proj_name))
    mlog.log('Project version:', mlog.bold(self.project_version))
    self.add_languages(proj_langs, True, MachineChoice.BUILD)
    self.add_languages(proj_langs, True, MachineChoice.HOST)
    self.set_backend()
    if (not self.is_subproject()):
        self.check_stdlibs()
@stringArgs
@permittedKwargs(permitted_kwargs['project'])
def func_project(self, node, args, kwargs):
    if (len(args) < 1):
        raise InvalidArguments('Not enough arguments to project(). Needs at least the project name.')
    (proj_name, *proj_langs) = args
    if (':' in proj_name):
        raise InvalidArguments("Project name {!r} must not contain ':'".format(proj_name))
    if ('meson_version' in kwargs):
        cv = coredata.version
        pv = kwargs['meson_version']
        if (not mesonlib.version_compare(cv, pv)):
            raise InterpreterException(('Meson version is %s but project requires %s' % (cv, pv)))
    if os.path.exists(self.option_file):
        oi = optinterpreter.OptionInterpreter(self.subproject)
        oi.process(self.option_file)
        self.coredata.merge_user_options(oi.options)
        self.add_build_def_file(self.option_file)
    self.project_default_options = mesonlib.stringlistify(kwargs.get('default_options', []))
    self.project_default_options = coredata.create_options_dict(self.project_default_options)
    if self.environment.first_invocation:
        default_options = self.project_default_options
        default_options.update(self.default_project_options)
        self.coredata.init_builtins(self.subproject)
    else:
        default_options = {}
    self.coredata.set_default_options(default_options, self.subproject, self.environment)
    if (not self.is_subproject()):
        self.build.project_name = proj_name
    self.active_projectname = proj_name
    self.project_version = kwargs.get('version', 'undefined')
    if (self.build.project_version is None):
        self.build.project_version = self.project_version
    proj_license = mesonlib.stringlistify(kwargs.get('license', 'unknown'))
    self.build.dep_manifest[proj_name] = {'version': self.project_version, 'license': proj_license}
    if (self.subproject in self.build.projects):
        raise InvalidCode('Second call to project().')
    if ((not self.is_subproject()) and ('subproject_dir' in kwargs)):
        spdirname = kwargs['subproject_dir']
        if (not isinstance(spdirname, str)):
            raise InterpreterException('Subproject_dir must be a string')
        if os.path.isabs(spdirname):
            raise InterpreterException('Subproject_dir must not be an absolute path.')
        if spdirname.startswith('.'):
            raise InterpreterException('Subproject_dir must not begin with a period.')
        if ('..' in spdirname):
            raise InterpreterException('Subproject_dir must not contain a ".." segment.')
        self.subproject_dir = spdirname
    self.build.subproject_dir = self.subproject_dir
    mesonlib.project_meson_versions[self.subproject] = 
    if ('meson_version' in kwargs):
        mesonlib.project_meson_versions[self.subproject] = kwargs['meson_version']
    self.build.projects[self.subproject] = proj_name
    mlog.log('Project name:', mlog.bold(proj_name))
    mlog.log('Project version:', mlog.bold(self.project_version))
    self.add_languages(proj_langs, True, MachineChoice.BUILD)
    self.add_languages(proj_langs, True, MachineChoice.HOST)
    self.set_backend()
    if (not self.is_subproject()):
        self.check_stdlibs()