def _classify_file(path, package_data, package_prefixes, py_modules, new_py_modules, scripts, new_scripts, data_files):
    found_package = False
    found_module = False
    found_script = False
    path = to_unix_path(path)
    for (prefix, package) in package_prefixes:
        if path.startswith((prefix + '/')):
            path = to_unix_path(os.path.relpath(path, prefix))
            package_file_list = package_data.get(package, [])
            package_file_list.append(path)
            package_data[package] = package_file_list
            found_package = True
            break
    if found_package:
        return
    for module in py_modules:
        if (path.replace('/', '.') == '.'.join((module, 'py'))):
            new_py_modules[module] = True
            found_module = True
            break
    if found_module:
        return
    for script in scripts:
        if (path == script):
            new_scripts[script] = True
            found_script = True
            break
    if found_script:
        return
    parent_dir = os.path.dirname(path)
    file_set = data_files.get(parent_dir)
    if (file_set is None):
        file_set = set()
        data_files[parent_dir] = file_set
    file_set.add(os.path.join(CMAKE_INSTALL_DIR(), path))
def _classify_file(path, package_data, package_prefixes, py_modules, new_py_modules, scripts, new_scripts, data_files):
    found_package = False
    found_module = False
    found_script = False
    path = to_unix_path(path)
    for (prefix, package) in package_prefixes:
        if path.startswith((prefix + '/')):
            path = to_unix_path(os.path.relpath(path, prefix))
            package_file_list = package_data.get(package, [])
            package_file_list.append(path)
            package_data[package] = package_file_list
            found_package = True
            break
    if found_package:
        return
    for module in py_modules:
        if (path.replace('/', '.') == '.'.join((module, 'py'))):
            new_py_modules[module] = True
            found_module = True
            break
    if found_module:
        return
    for script in scripts:
        if (path == script):
            new_scripts[script] = True
            found_script = True
            break
    if found_script:
        return
    parent_dir = os.path.dirname(path)
    file_set = data_files.get(parent_dir)
    if (file_set is None):
        file_set = set()
        data_files[parent_dir] = file_set
    file_set.add(os.path.join(CMAKE_INSTALL_DIR(), path))