def __init__(self, _build: build.Build, backend: T.Optional[Backend]=None, subproject: str='', subdir: str='', subproject_dir: str='subprojects', default_project_options: T.Optional[T.Dict[(OptionKey, str)]]=None, mock: bool=False, ast: T.Optional[mparser.CodeBlockNode]=None, is_translated: bool=False, user_defined_options: T.Optional['argparse.Namespace']=None) -> None:
    super().__init__(_build.environment.get_source_dir(), subdir, subproject)
    self.active_projectname = ''
    self.build = _build
    self.environment = self.build.environment
    self.coredata = self.environment.get_coredata()
    self.backend = backend
    self.summary: T.Dict[(str, 'Summary')] = {}
    self.modules: T.Dict[(str, NewExtensionModule)] = {}
    self.subproject_directory_name = subdir.split(os.path.sep)[(- 1)]
    self.subproject_dir = subproject_dir
    self.option_file = os.path.join(self.source_root, self.subdir, 'meson_options.txt')
    if ((not mock) and (ast is None)):
        self.load_root_meson_file()
        self.sanity_check_ast()
    elif (ast is not None):
        self.ast = ast
        self.sanity_check_ast()
    self.builtin.update({'meson': MesonMain(self.build, self)})
    self.generators: T.List[build.Generator] = []
    self.processed_buildfiles = set()
    self.project_args_frozen = False
    self.global_args_frozen = False
    self.subprojects: T.Dict[(str, SubprojectHolder)] = {}
    self.subproject_stack: T.List[str] = []
    self.configure_file_outputs: T.Dict[(str, int)] = {}
    if default_project_options:
        self.default_project_options = default_project_options.copy()
    else:
        self.default_project_options = {}
    self.project_default_options: T.Dict[(OptionKey, str)] = {}
    self.build_func_dict()
    self.build_holder_map()
    self.user_defined_options = user_defined_options
    self.build_def_files: mesonlib.OrderedSet[str] = mesonlib.OrderedSet()
    build_filename = os.path.join(self.subdir, environment.build_filename)
    if (not is_translated):
        self.build_def_files.add(build_filename)
    if (not mock):
        self.parse_project()
    self._redetect_machines()
def __init__(self, _build: build.Build, backend: T.Optional[Backend]=None, subproject: str=, subdir: str=, subproject_dir: str='subprojects', default_project_options: T.Optional[T.Dict[(OptionKey, str)]]=None, mock: bool=False, ast: T.Optional[mparser.CodeBlockNode]=None, is_translated: bool=False, user_defined_options: T.Optional['argparse.Namespace']=None) -> None:
    super().__init__(_build.environment.get_source_dir(), subdir, subproject)
    self.active_projectname = 
    self.build = _build
    self.environment = self.build.environment
    self.coredata = self.environment.get_coredata()
    self.backend = backend
    self.summary: T.Dict[(str, 'Summary')] = {}
    self.modules: T.Dict[(str, NewExtensionModule)] = {}
    self.subproject_directory_name = subdir.split(os.path.sep)[(- 1)]
    self.subproject_dir = subproject_dir
    self.option_file = os.path.join(self.source_root, self.subdir, 'meson_options.txt')
    if ((not mock) and (ast is None)):
        self.load_root_meson_file()
        self.sanity_check_ast()
    elif (ast is not None):
        self.ast = ast
        self.sanity_check_ast()
    self.builtin.update({'meson': MesonMain(self.build, self)})
    self.generators: T.List[build.Generator] = []
    self.processed_buildfiles = set()
    self.project_args_frozen = False
    self.global_args_frozen = False
    self.subprojects: T.Dict[(str, SubprojectHolder)] = {}
    self.subproject_stack: T.List[str] = []
    self.configure_file_outputs: T.Dict[(str, int)] = {}
    if default_project_options:
        self.default_project_options = default_project_options.copy()
    else:
        self.default_project_options = {}
    self.project_default_options: T.Dict[(OptionKey, str)] = {}
    self.build_func_dict()
    self.build_holder_map()
    self.user_defined_options = user_defined_options
    self.build_def_files: mesonlib.OrderedSet[str] = mesonlib.OrderedSet()
    build_filename = os.path.join(self.subdir, environment.build_filename)
    if (not is_translated):
        self.build_def_files.add(build_filename)
    if (not mock):
        self.parse_project()
    self._redetect_machines()