@FeatureNewKwargs('install_data', '0.46.0', ['rename'])
@FeatureNewKwargs('install_data', '0.38.0', ['install_mode'])
@permittedKwargs(permitted_kwargs['install_data'])
def func_install_data(self, node, args, kwargs):
    kwsource = mesonlib.stringlistify(kwargs.get('sources', []))
    raw_sources = (args + kwsource)
    sources = []
    source_strings = []
    for s in raw_sources:
        if isinstance(s, mesonlib.File):
            sources.append(s)
        elif isinstance(s, str):
            source_strings.append(s)
        else:
            raise InvalidArguments('Argument must be string or file.')
    sources += self.source_strings_to_files(source_strings)
    install_dir = kwargs.get('install_dir', None)
    if (not isinstance(install_dir, (str, type(None)))):
        raise InvalidArguments('Keyword argument install_dir not a string.')
    install_mode = self._get_kwarg_install_mode(kwargs)
    rename = kwargs.get('rename', None)
    data = DataHolder(build.Data(sources, install_dir, install_mode, rename))
    self.build.data.append(data.held_object)
    return data
@FeatureNewKwargs('install_data', '0.46.0', ['rename'])
@FeatureNewKwargs('install_data', '0.38.0', ['install_mode'])
@permittedKwargs(permitted_kwargs['install_data'])
def func_install_data(self, node, args, kwargs):
    kwsource = mesonlib.stringlistify(kwargs.get('sources', []))
    raw_sources = (args + kwsource)
    sources = []
    source_strings = []
    for s in raw_sources:
        if isinstance(s, mesonlib.File):
            sources.append(s)
        elif isinstance(s, str):
            source_strings.append(s)
        else:
            raise InvalidArguments('Argument must be string or file.')
    sources += self.source_strings_to_files(source_strings)
    install_dir = kwargs.get('install_dir', None)
    if (not isinstance(install_dir, (str, type(None)))):
        raise InvalidArguments('Keyword argument install_dir not a string.')
    install_mode = self._get_kwarg_install_mode(kwargs)
    rename = kwargs.get('rename', None)
    data = DataHolder(build.Data(sources, install_dir, install_mode, rename))
    self.build.data.append(data.held_object)
    return data