@typed_pos_args('install_data', varargs=(str, mesonlib.File))
@typed_kwargs('install_data', KwargInfo('install_dir', (str, NoneType)), KwargInfo('sources', ContainerTypeInfo(list, (str, mesonlib.File)), listify=True, default=[]), KwargInfo('rename', ContainerTypeInfo(list, str), default=[], listify=True, since='0.46.0'), INSTALL_MODE_KW.evolve(since='0.38.0'), INSTALL_TAG_KW.evolve(since='0.60.0'))
def func_install_data(self, node: mparser.BaseNode, args: T.Tuple[T.List['mesonlib.FileOrString']], kwargs: 'kwargs.FuncInstallData') -> build.Data:
    sources = self.source_strings_to_files((args[0] + kwargs['sources']))
    rename = (kwargs['rename'] or None)
    if rename:
        if (len(rename) != len(sources)):
            raise InvalidArguments(f'"rename" and "sources" argument lists must be the same length if "rename" is given. Rename has {len(rename)} elements and sources has {len(sources)}.')
    install_dir_name = kwargs['install_dir']
    if install_dir_name:
        if (not os.path.isabs(install_dir_name)):
            install_dir_name = os.path.join('{datadir}', install_dir_name)
    else:
        install_dir_name = '{datadir}'
    return self.install_data_impl(sources, kwargs['install_dir'], kwargs['install_mode'], rename, kwargs['install_tag'], install_dir_name)
@typed_pos_args('install_data', varargs=(str, mesonlib.File))
@typed_kwargs('install_data', KwargInfo('install_dir', (str, NoneType)), KwargInfo('sources', ContainerTypeInfo(list, (str, mesonlib.File)), listify=True, default=[]), KwargInfo('rename', ContainerTypeInfo(list, str), default=[], listify=True, since='0.46.0'), INSTALL_MODE_KW.evolve(since='0.38.0'), INSTALL_TAG_KW.evolve(since='0.60.0'))
def func_install_data(self, node: mparser.BaseNode, args: T.Tuple[T.List['mesonlib.FileOrString']], kwargs: 'kwargs.FuncInstallData') -> build.Data:
    sources = self.source_strings_to_files((args[0] + kwargs['sources']))
    rename = (kwargs['rename'] or None)
    if rename:
        if (len(rename) != len(sources)):
            raise InvalidArguments(f'"rename" and "sources" argument lists must be the same length if "rename" is given. Rename has {len(rename)} elements and sources has {len(sources)}.')
    install_dir_name = kwargs['install_dir']
    if install_dir_name:
        if (not os.path.isabs(install_dir_name)):
            install_dir_name = os.path.join('{datadir}', install_dir_name)
    else:
        install_dir_name = '{datadir}'
    return self.install_data_impl(sources, kwargs['install_dir'], kwargs['install_mode'], rename, kwargs['install_tag'], install_dir_name)