def find_files(bases, pattern):
    """Return list of files matching pattern in base folders and subfolders."""
    if isinstance(bases, (str, pathlib.Path)):
        bases = [bases]

    result = []
    for base in bases:
        for root, dirs, files in os.walk(base):
            for name in files:
                if fnmatch.fnmatch(name, pattern):
                    result.append(os.path.join(root, name))
    return result
Return list of files matching pattern in base folders and subfolders.
setup.py