@FeatureNewKwargs('install_subdir', '0.42.0', ['exclude_files', 'exclude_directories'])
@FeatureNewKwargs('install_subdir', '0.38.0', ['install_mode'])
@permittedKwargs(permitted_kwargs['install_subdir'])
@stringArgs
def func_install_subdir(self, node, args, kwargs):
    if (len(args) != 1):
        raise InvalidArguments('Install_subdir requires exactly one argument.')
    subdir = args[0]
    if ('install_dir' not in kwargs):
        raise InvalidArguments('Missing keyword argument install_dir')
    install_dir = kwargs['install_dir']
    if (not isinstance(install_dir, str)):
        raise InvalidArguments('Keyword argument install_dir not a string.')
    if ('strip_directory' in kwargs):
        if (not isinstance(kwargs['strip_directory'], bool)):
            raise InterpreterException('"strip_directory" keyword must be a boolean.')
        strip_directory = kwargs['strip_directory']
    else:
        strip_directory = False
    if ('exclude_files' in kwargs):
        exclude = extract_as_list(kwargs, 'exclude_files')
        for f in exclude:
            if (not isinstance(f, str)):
                raise InvalidArguments('Exclude argument not a string.')
            elif os.path.isabs(f):
                raise InvalidArguments('Exclude argument cannot be absolute.')
        exclude_files = set(exclude)
    else:
        exclude_files = set()
    if ('exclude_directories' in kwargs):
        exclude = extract_as_list(kwargs, 'exclude_directories')
        for d in exclude:
            if (not isinstance(d, str)):
                raise InvalidArguments('Exclude argument not a string.')
            elif os.path.isabs(d):
                raise InvalidArguments('Exclude argument cannot be absolute.')
        exclude_directories = set(exclude)
    else:
        exclude_directories = set()
    exclude = (exclude_files, exclude_directories)
    install_mode = self._get_kwarg_install_mode(kwargs)
    idir = InstallDir(self.subdir, subdir, install_dir, install_mode, exclude, strip_directory)
    self.build.install_dirs.append(idir)
    return idir
@FeatureNewKwargs('install_subdir', '0.42.0', ['exclude_files', 'exclude_directories'])
@FeatureNewKwargs('install_subdir', '0.38.0', ['install_mode'])
@permittedKwargs(permitted_kwargs['install_subdir'])
@stringArgs
def func_install_subdir(self, node, args, kwargs):
    if (len(args) != 1):
        raise InvalidArguments('Install_subdir requires exactly one argument.')
    subdir = args[0]
    if ('install_dir' not in kwargs):
        raise InvalidArguments('Missing keyword argument install_dir')
    install_dir = kwargs['install_dir']
    if (not isinstance(install_dir, str)):
        raise InvalidArguments('Keyword argument install_dir not a string.')
    if ('strip_directory' in kwargs):
        if (not isinstance(kwargs['strip_directory'], bool)):
            raise InterpreterException('"strip_directory" keyword must be a boolean.')
        strip_directory = kwargs['strip_directory']
    else:
        strip_directory = False
    if ('exclude_files' in kwargs):
        exclude = extract_as_list(kwargs, 'exclude_files')
        for f in exclude:
            if (not isinstance(f, str)):
                raise InvalidArguments('Exclude argument not a string.')
            elif os.path.isabs(f):
                raise InvalidArguments('Exclude argument cannot be absolute.')
        exclude_files = set(exclude)
    else:
        exclude_files = set()
    if ('exclude_directories' in kwargs):
        exclude = extract_as_list(kwargs, 'exclude_directories')
        for d in exclude:
            if (not isinstance(d, str)):
                raise InvalidArguments('Exclude argument not a string.')
            elif os.path.isabs(d):
                raise InvalidArguments('Exclude argument cannot be absolute.')
        exclude_directories = set(exclude)
    else:
        exclude_directories = set()
    exclude = (exclude_files, exclude_directories)
    install_mode = self._get_kwarg_install_mode(kwargs)
    idir = InstallDir(self.subdir, subdir, install_dir, install_mode, exclude, strip_directory)
    self.build.install_dirs.append(idir)
    return idir