def setup(*args, **kw):
    'This function wraps setup() so that we can run cmake, make,\n    CMake build, then proceed as usual with setuptools, appending the\n    CMake-generated output as necessary.\n\n    The CMake project is re-configured only if needed. This is achieved by (1) retrieving the environment mapping\n    associated with the generator set in the ``CMakeCache.txt`` file, (2) saving the CMake configure arguments and\n    version in :func:`skbuild.constants.CMAKE_SPEC_FILE()`: and (3) re-configuring only if either the generator or\n    the CMake specs change.\n    '
    if ('package_dir' in kw):
        for (package, prefix) in kw['package_dir'].items():
            if prefix.endswith('/'):
                msg = 'package_dir={{{!r}: {!r}}} ends with a trailing slash, which is not supported by setuptools.'.format(package, prefix)
                warnings.warn(msg, FutureWarning, stacklevel=2)
                kw['package_dir'][package] = prefix[:(- 1)]
    (sys.argv, cmake_executable, skip_generator_test, cmake_args, make_args) = parse_args()
    cmdclass = kw.get('cmdclass', {})
    cmdclass['build'] = cmdclass.get('build', build.build)
    cmdclass['build_py'] = cmdclass.get('build_py', build_py.build_py)
    cmdclass['build_ext'] = cmdclass.get('build_ext', build_ext.build_ext)
    cmdclass['install'] = cmdclass.get('install', install.install)
    cmdclass['install_lib'] = cmdclass.get('install_lib', install_lib.install_lib)
    cmdclass['install_scripts'] = cmdclass.get('install_scripts', install_scripts.install_scripts)
    cmdclass['clean'] = cmdclass.get('clean', clean.clean)
    cmdclass['sdist'] = cmdclass.get('sdist', sdist.sdist)
    cmdclass['bdist'] = cmdclass.get('bdist', bdist.bdist)
    cmdclass['bdist_wheel'] = cmdclass.get('bdist_wheel', bdist_wheel.bdist_wheel)
    cmdclass['egg_info'] = cmdclass.get('egg_info', egg_info.egg_info)
    cmdclass['generate_source_manifest'] = cmdclass.get('generate_source_manifest', generate_source_manifest.generate_source_manifest)
    cmdclass['test'] = cmdclass.get('test', test.test)
    kw['cmdclass'] = cmdclass
    parameters = {'cmake_args': [], 'cmake_install_dir': '', 'cmake_source_dir': '', 'cmake_with_sdist': False, 'cmake_languages': ('C', 'CXX'), 'cmake_minimum_required_version': None, 'cmake_process_manifest_hook': None, 'cmake_install_target': 'install'}
    skbuild_kw = {param: kw.pop(param, value) for (param, value) in parameters.items()}
    try:
        _check_skbuild_parameters(skbuild_kw)
    except SKBuildError as ex:
        import traceback
        print('Traceback (most recent call last):')
        traceback.print_tb(sys.exc_info()[2])
        print('')
        sys.exit(ex)
    cmake_source_dir = skbuild_kw['cmake_source_dir']
    if (cmake_source_dir == '.'):
        cmake_source_dir = ''
    if os.path.isabs(cmake_source_dir):
        cmake_source_dir = os.path.relpath(cmake_source_dir)
    display_only = has_invalid_arguments = help_commands = False
    force_cmake = skip_cmake = False
    commands = []
    try:
        (display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name, build_ext_inplace) = _parse_setuptools_arguments(kw)
    except (DistutilsArgError, DistutilsGetoptError):
        has_invalid_arguments = True
    has_cmakelists = os.path.exists(os.path.join(cmake_source_dir, 'CMakeLists.txt'))
    if (not has_cmakelists):
        print('skipping skbuild (no CMakeLists.txt found)')
    skip_skbuild = (display_only or has_invalid_arguments or (not _should_run_cmake(commands, skbuild_kw['cmake_with_sdist'])) or (not has_cmakelists))
    if (skip_skbuild and (not force_cmake)):
        if help_commands:
            skbuild_parser = create_skbuild_argparser()
            arg_descriptions = [line for line in skbuild_parser.format_help().split('\n') if line.startswith('  ')]
            print('scikit-build options:')
            print('\n'.join(arg_descriptions))
            print('')
            print('Arguments following a "--" are passed directly to CMake (e.g. -DMY_VAR:BOOL=TRUE).')
            print('Arguments following a second "--" are passed directly to  the build tool.')
            print('')
        return setuptools.setup(*args, **kw)
    developer_mode = (('develop' in commands) or ('test' in commands) or build_ext_inplace)
    packages = kw.get('packages', [])
    package_dir = kw.get('package_dir', {})
    package_data = copy.deepcopy(kw.get('package_data', {}))
    py_modules = kw.get('py_modules', [])
    new_py_modules = {py_module: False for py_module in py_modules}
    scripts = kw.get('scripts', [])
    new_scripts = {script: False for script in scripts}
    data_files = {(parent_dir or '.'): set(file_list) for (parent_dir, file_list) in kw.get('data_files', [])}
    cmake_args = (skbuild_kw['cmake_args'] + cmake_args)
    cmake_install_target_from_command = next((make_args[(index + 1)] for (index, item) in enumerate(make_args) if (item == '--install-target')), '')
    cmake_install_target_from_setup = skbuild_kw['cmake_install_target']
    if cmake_install_target_from_command:
        cmake_install_target = cmake_install_target_from_command
    else:
        cmake_install_target = cmake_install_target_from_setup
    env_cmake_args = (os.environ['CMAKE_ARGS'].split() if ('CMAKE_ARGS' in os.environ) else [])
    env_cmake_args = [s for s in env_cmake_args if ('CMAKE_INSTALL_PREFIX' not in s)]
    cmake_args = (env_cmake_args + cmake_args)
    if (sys.platform == 'darwin'):
        if (plat_name is None):
            plat_name = skbuild_plat_name()
        (_, version, machine) = plat_name.split('-')
        for cmake_arg in cmake_args:
            if ('CMAKE_OSX_DEPLOYMENT_TARGET' in cmake_arg):
                version = cmake_arg.split('=')[1]
            if ('CMAKE_OSX_ARCHITECTURES' in cmake_arg):
                machine = cmake_arg.split('=')[1]
                if (set(machine.split(';')) == {'x86_64', 'arm64'}):
                    machine = 'universal2'
        set_skbuild_plat_name('macosx-{}-{}'.format(version, machine))
        os.environ.setdefault('_PYTHON_HOST_PLATFORM', skbuild_plat_name())
        (_, version, machine) = skbuild_plat_name().split('-')
        if (not cmaker.has_cmake_cache_arg(cmake_args, 'CMAKE_OSX_DEPLOYMENT_TARGET')):
            cmake_args.append(('-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=%s' % version))
        if (not cmaker.has_cmake_cache_arg(cmake_args, 'CMAKE_OSX_ARCHITECTURES')):
            machine_archs = ('x86_64;arm64' if (machine == 'universal2') else machine)
            cmake_args.append(('-DCMAKE_OSX_ARCHITECTURES:STRING=%s' % machine_archs))
    for package in kw.get('setup_requires', []):
        if (Requirement(package).name == 'cmake'):
            setup_requires = [package]
            dist = upstream_Distribution({'setup_requires': setup_requires})
            dist.fetch_build_eggs(setup_requires)
            import cmake
            for executable in ['cmake', 'cpack', 'ctest']:
                executable = os.path.join(cmake.CMAKE_BIN_DIR, executable)
                if (platform.system().lower() == 'windows'):
                    executable += '.exe'
                st = os.stat(executable)
                permissions = (((st.st_mode | stat.S_IXUSR) | stat.S_IXGRP) | stat.S_IXOTH)
                os.chmod(executable, permissions)
            cmake_executable = os.path.join(cmake.CMAKE_BIN_DIR, 'cmake')
            break
    cmake_languages = skbuild_kw['cmake_languages']
    try:
        if (cmake_executable is None):
            cmake_executable = CMAKE_DEFAULT_EXECUTABLE
        cmkr = cmaker.CMaker(cmake_executable)
        if (not skip_cmake):
            cmake_minimum_required_version = skbuild_kw['cmake_minimum_required_version']
            if (cmake_minimum_required_version is not None):
                if (parse_version(cmkr.cmake_version) < parse_version(cmake_minimum_required_version)):
                    raise SKBuildError('CMake version {} or higher is required. CMake version {} is being used'.format(cmake_minimum_required_version, cmkr.cmake_version))
            cmake_spec = {'args': ([which(CMAKE_DEFAULT_EXECUTABLE)] + cmake_args), 'version': cmkr.cmake_version, 'environment': {'PYTHONNOUSERSITE': os.environ.get('PYTHONNOUSERSITE'), 'PYTHONPATH': os.environ.get('PYTHONPATH')}}
            env = cmkr.get_cached_generator_env()
            if ((env is None) or (cmake_spec != _load_cmake_spec())):
                env = cmkr.configure(cmake_args, skip_generator_test=skip_generator_test, cmake_source_dir=cmake_source_dir, cmake_install_dir=skbuild_kw['cmake_install_dir'], languages=cmake_languages)
                _save_cmake_spec(cmake_spec)
            cmkr.make(make_args, install_target=cmake_install_target, env=env)
    except SKBuildGeneratorNotFoundError as ex:
        sys.exit(ex)
    except SKBuildError as ex:
        import traceback
        print('Traceback (most recent call last):')
        traceback.print_tb(sys.exc_info()[2])
        print('')
        sys.exit(ex)
    for package in packages:
        if (package not in package_dir):
            package_dir[package] = package.replace('.', '/')
            if ('' in package_dir):
                package_dir[package] = to_unix_path(os.path.join(package_dir[''], package_dir[package]))
    kw['package_dir'] = package_dir
    package_prefixes = _collect_package_prefixes(package_dir, packages)
    cmake_manifest = cmkr.install()
    process_manifest = skbuild_kw.get('cmake_process_manifest_hook')
    if (process_manifest is not None):
        if callable(process_manifest):
            cmake_manifest = process_manifest(cmake_manifest)
        else:
            raise SKBuildError('The cmake_process_manifest_hook argument should be callable.')
    _classify_installed_files(cmake_manifest, package_data, package_prefixes, py_modules, new_py_modules, scripts, new_scripts, data_files, cmake_source_dir, skbuild_kw['cmake_install_dir'])
    original_manifestin_data_files = []
    if kw.get('include_package_data', False):
        original_manifestin_data_files = parse_manifestin(os.path.join(os.getcwd(), 'MANIFEST.in'))
        for path in original_manifestin_data_files:
            _classify_file(path, package_data, package_prefixes, py_modules, new_py_modules, scripts, new_scripts, data_files)
    if developer_mode:
        for (package, package_file_list) in package_data.items():
            for package_file in package_file_list:
                package_file = os.path.join(package_dir[package], package_file)
                cmake_file = os.path.join(CMAKE_INSTALL_DIR(), package_file)
                if os.path.exists(cmake_file):
                    _copy_file(cmake_file, package_file, hide_listing)
        for py_module in py_modules:
            package_file = (py_module + '.py')
            cmake_file = os.path.join(CMAKE_INSTALL_DIR(), package_file)
            if os.path.exists(cmake_file):
                _copy_file(cmake_file, package_file, hide_listing)
    else:
        _consolidate_package_modules(cmake_source_dir, packages, package_dir, py_modules, package_data, hide_listing)
        original_package_data = kw.get('package_data', {}).copy()
        _consolidate_package_data_files(original_package_data, package_prefixes, hide_listing)
        for data_file in original_manifestin_data_files:
            dest_data_file = os.path.join(CMAKE_INSTALL_DIR(), data_file)
            _copy_file(data_file, dest_data_file, hide_listing)
    kw['package_data'] = package_data
    kw['package_dir'] = {package: (os.path.join(CMAKE_INSTALL_DIR(), prefix) if os.path.exists(os.path.join(CMAKE_INSTALL_DIR(), prefix)) else prefix) for (prefix, package) in package_prefixes}
    kw['scripts'] = [(os.path.join(CMAKE_INSTALL_DIR(), script) if mask else script) for (script, mask) in new_scripts.items()]
    kw['data_files'] = [(parent_dir, list(file_set)) for (parent_dir, file_set) in data_files.items()]
    if ('zip_safe' not in kw):
        kw['zip_safe'] = False

    class BinaryDistribution(upstream_Distribution):

        def has_ext_modules(self):
            return has_cmakelists
    kw['distclass'] = BinaryDistribution
    print('')
    return setuptools.setup(*args, **kw)
This function wraps setup() so that we can run cmake, make,
CMake build, then proceed as usual with setuptools, appending the
CMake-generated output as necessary.

The CMake project is re-configured only if needed. This is achieved by (1) retrieving the environment mapping
associated with the generator set in the ``CMakeCache.txt`` file, (2) saving the CMake configure arguments and
version in :func:`skbuild.constants.CMAKE_SPEC_FILE()`: and (3) re-configuring only if either the generator or
the CMake specs change.
def setup(*args, **kw):
    'This function wraps setup() so that we can run cmake, make,\n    CMake build, then proceed as usual with setuptools, appending the\n    CMake-generated output as necessary.\n\n    The CMake project is re-configured only if needed. This is achieved by (1) retrieving the environment mapping\n    associated with the generator set in the ``CMakeCache.txt`` file, (2) saving the CMake configure arguments and\n    version in :func:`skbuild.constants.CMAKE_SPEC_FILE()`: and (3) re-configuring only if either the generator or\n    the CMake specs change.\n    '
    if ('package_dir' in kw):
        for (package, prefix) in kw['package_dir'].items():
            if prefix.endswith('/'):
                msg = 'package_dir={{{!r}: {!r}}} ends with a trailing slash, which is not supported by setuptools.'.format(package, prefix)
                warnings.warn(msg, FutureWarning, stacklevel=2)
                kw['package_dir'][package] = prefix[:(- 1)]
    (sys.argv, cmake_executable, skip_generator_test, cmake_args, make_args) = parse_args()
    cmdclass = kw.get('cmdclass', {})
    cmdclass['build'] = cmdclass.get('build', build.build)
    cmdclass['build_py'] = cmdclass.get('build_py', build_py.build_py)
    cmdclass['build_ext'] = cmdclass.get('build_ext', build_ext.build_ext)
    cmdclass['install'] = cmdclass.get('install', install.install)
    cmdclass['install_lib'] = cmdclass.get('install_lib', install_lib.install_lib)
    cmdclass['install_scripts'] = cmdclass.get('install_scripts', install_scripts.install_scripts)
    cmdclass['clean'] = cmdclass.get('clean', clean.clean)
    cmdclass['sdist'] = cmdclass.get('sdist', sdist.sdist)
    cmdclass['bdist'] = cmdclass.get('bdist', bdist.bdist)
    cmdclass['bdist_wheel'] = cmdclass.get('bdist_wheel', bdist_wheel.bdist_wheel)
    cmdclass['egg_info'] = cmdclass.get('egg_info', egg_info.egg_info)
    cmdclass['generate_source_manifest'] = cmdclass.get('generate_source_manifest', generate_source_manifest.generate_source_manifest)
    cmdclass['test'] = cmdclass.get('test', test.test)
    kw['cmdclass'] = cmdclass
    parameters = {'cmake_args': [], 'cmake_install_dir': , 'cmake_source_dir': , 'cmake_with_sdist': False, 'cmake_languages': ('C', 'CXX'), 'cmake_minimum_required_version': None, 'cmake_process_manifest_hook': None, 'cmake_install_target': 'install'}
    skbuild_kw = {param: kw.pop(param, value) for (param, value) in parameters.items()}
    try:
        _check_skbuild_parameters(skbuild_kw)
    except SKBuildError as ex:
        import traceback
        print('Traceback (most recent call last):')
        traceback.print_tb(sys.exc_info()[2])
        print()
        sys.exit(ex)
    cmake_source_dir = skbuild_kw['cmake_source_dir']
    if (cmake_source_dir == '.'):
        cmake_source_dir = 
    if os.path.isabs(cmake_source_dir):
        cmake_source_dir = os.path.relpath(cmake_source_dir)
    display_only = has_invalid_arguments = help_commands = False
    force_cmake = skip_cmake = False
    commands = []
    try:
        (display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name, build_ext_inplace) = _parse_setuptools_arguments(kw)
    except (DistutilsArgError, DistutilsGetoptError):
        has_invalid_arguments = True
    has_cmakelists = os.path.exists(os.path.join(cmake_source_dir, 'CMakeLists.txt'))
    if (not has_cmakelists):
        print('skipping skbuild (no CMakeLists.txt found)')
    skip_skbuild = (display_only or has_invalid_arguments or (not _should_run_cmake(commands, skbuild_kw['cmake_with_sdist'])) or (not has_cmakelists))
    if (skip_skbuild and (not force_cmake)):
        if help_commands:
            skbuild_parser = create_skbuild_argparser()
            arg_descriptions = [line for line in skbuild_parser.format_help().split('\n') if line.startswith('  ')]
            print('scikit-build options:')
            print('\n'.join(arg_descriptions))
            print()
            print('Arguments following a "--" are passed directly to CMake (e.g. -DMY_VAR:BOOL=TRUE).')
            print('Arguments following a second "--" are passed directly to  the build tool.')
            print()
        return setuptools.setup(*args, **kw)
    developer_mode = (('develop' in commands) or ('test' in commands) or build_ext_inplace)
    packages = kw.get('packages', [])
    package_dir = kw.get('package_dir', {})
    package_data = copy.deepcopy(kw.get('package_data', {}))
    py_modules = kw.get('py_modules', [])
    new_py_modules = {py_module: False for py_module in py_modules}
    scripts = kw.get('scripts', [])
    new_scripts = {script: False for script in scripts}
    data_files = {(parent_dir or '.'): set(file_list) for (parent_dir, file_list) in kw.get('data_files', [])}
    cmake_args = (skbuild_kw['cmake_args'] + cmake_args)
    cmake_install_target_from_command = next((make_args[(index + 1)] for (index, item) in enumerate(make_args) if (item == '--install-target')), )
    cmake_install_target_from_setup = skbuild_kw['cmake_install_target']
    if cmake_install_target_from_command:
        cmake_install_target = cmake_install_target_from_command
    else:
        cmake_install_target = cmake_install_target_from_setup
    env_cmake_args = (os.environ['CMAKE_ARGS'].split() if ('CMAKE_ARGS' in os.environ) else [])
    env_cmake_args = [s for s in env_cmake_args if ('CMAKE_INSTALL_PREFIX' not in s)]
    cmake_args = (env_cmake_args + cmake_args)
    if (sys.platform == 'darwin'):
        if (plat_name is None):
            plat_name = skbuild_plat_name()
        (_, version, machine) = plat_name.split('-')
        for cmake_arg in cmake_args:
            if ('CMAKE_OSX_DEPLOYMENT_TARGET' in cmake_arg):
                version = cmake_arg.split('=')[1]
            if ('CMAKE_OSX_ARCHITECTURES' in cmake_arg):
                machine = cmake_arg.split('=')[1]
                if (set(machine.split(';')) == {'x86_64', 'arm64'}):
                    machine = 'universal2'
        set_skbuild_plat_name('macosx-{}-{}'.format(version, machine))
        os.environ.setdefault('_PYTHON_HOST_PLATFORM', skbuild_plat_name())
        (_, version, machine) = skbuild_plat_name().split('-')
        if (not cmaker.has_cmake_cache_arg(cmake_args, 'CMAKE_OSX_DEPLOYMENT_TARGET')):
            cmake_args.append(('-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=%s' % version))
        if (not cmaker.has_cmake_cache_arg(cmake_args, 'CMAKE_OSX_ARCHITECTURES')):
            machine_archs = ('x86_64;arm64' if (machine == 'universal2') else machine)
            cmake_args.append(('-DCMAKE_OSX_ARCHITECTURES:STRING=%s' % machine_archs))
    for package in kw.get('setup_requires', []):
        if (Requirement(package).name == 'cmake'):
            setup_requires = [package]
            dist = upstream_Distribution({'setup_requires': setup_requires})
            dist.fetch_build_eggs(setup_requires)
            import cmake
            for executable in ['cmake', 'cpack', 'ctest']:
                executable = os.path.join(cmake.CMAKE_BIN_DIR, executable)
                if (platform.system().lower() == 'windows'):
                    executable += '.exe'
                st = os.stat(executable)
                permissions = (((st.st_mode | stat.S_IXUSR) | stat.S_IXGRP) | stat.S_IXOTH)
                os.chmod(executable, permissions)
            cmake_executable = os.path.join(cmake.CMAKE_BIN_DIR, 'cmake')
            break
    cmake_languages = skbuild_kw['cmake_languages']
    try:
        if (cmake_executable is None):
            cmake_executable = CMAKE_DEFAULT_EXECUTABLE
        cmkr = cmaker.CMaker(cmake_executable)
        if (not skip_cmake):
            cmake_minimum_required_version = skbuild_kw['cmake_minimum_required_version']
            if (cmake_minimum_required_version is not None):
                if (parse_version(cmkr.cmake_version) < parse_version(cmake_minimum_required_version)):
                    raise SKBuildError('CMake version {} or higher is required. CMake version {} is being used'.format(cmake_minimum_required_version, cmkr.cmake_version))
            cmake_spec = {'args': ([which(CMAKE_DEFAULT_EXECUTABLE)] + cmake_args), 'version': cmkr.cmake_version, 'environment': {'PYTHONNOUSERSITE': os.environ.get('PYTHONNOUSERSITE'), 'PYTHONPATH': os.environ.get('PYTHONPATH')}}
            env = cmkr.get_cached_generator_env()
            if ((env is None) or (cmake_spec != _load_cmake_spec())):
                env = cmkr.configure(cmake_args, skip_generator_test=skip_generator_test, cmake_source_dir=cmake_source_dir, cmake_install_dir=skbuild_kw['cmake_install_dir'], languages=cmake_languages)
                _save_cmake_spec(cmake_spec)
            cmkr.make(make_args, install_target=cmake_install_target, env=env)
    except SKBuildGeneratorNotFoundError as ex:
        sys.exit(ex)
    except SKBuildError as ex:
        import traceback
        print('Traceback (most recent call last):')
        traceback.print_tb(sys.exc_info()[2])
        print()
        sys.exit(ex)
    for package in packages:
        if (package not in package_dir):
            package_dir[package] = package.replace('.', '/')
            if ( in package_dir):
                package_dir[package] = to_unix_path(os.path.join(package_dir[], package_dir[package]))
    kw['package_dir'] = package_dir
    package_prefixes = _collect_package_prefixes(package_dir, packages)
    cmake_manifest = cmkr.install()
    process_manifest = skbuild_kw.get('cmake_process_manifest_hook')
    if (process_manifest is not None):
        if callable(process_manifest):
            cmake_manifest = process_manifest(cmake_manifest)
        else:
            raise SKBuildError('The cmake_process_manifest_hook argument should be callable.')
    _classify_installed_files(cmake_manifest, package_data, package_prefixes, py_modules, new_py_modules, scripts, new_scripts, data_files, cmake_source_dir, skbuild_kw['cmake_install_dir'])
    original_manifestin_data_files = []
    if kw.get('include_package_data', False):
        original_manifestin_data_files = parse_manifestin(os.path.join(os.getcwd(), 'MANIFEST.in'))
        for path in original_manifestin_data_files:
            _classify_file(path, package_data, package_prefixes, py_modules, new_py_modules, scripts, new_scripts, data_files)
    if developer_mode:
        for (package, package_file_list) in package_data.items():
            for package_file in package_file_list:
                package_file = os.path.join(package_dir[package], package_file)
                cmake_file = os.path.join(CMAKE_INSTALL_DIR(), package_file)
                if os.path.exists(cmake_file):
                    _copy_file(cmake_file, package_file, hide_listing)
        for py_module in py_modules:
            package_file = (py_module + '.py')
            cmake_file = os.path.join(CMAKE_INSTALL_DIR(), package_file)
            if os.path.exists(cmake_file):
                _copy_file(cmake_file, package_file, hide_listing)
    else:
        _consolidate_package_modules(cmake_source_dir, packages, package_dir, py_modules, package_data, hide_listing)
        original_package_data = kw.get('package_data', {}).copy()
        _consolidate_package_data_files(original_package_data, package_prefixes, hide_listing)
        for data_file in original_manifestin_data_files:
            dest_data_file = os.path.join(CMAKE_INSTALL_DIR(), data_file)
            _copy_file(data_file, dest_data_file, hide_listing)
    kw['package_data'] = package_data
    kw['package_dir'] = {package: (os.path.join(CMAKE_INSTALL_DIR(), prefix) if os.path.exists(os.path.join(CMAKE_INSTALL_DIR(), prefix)) else prefix) for (prefix, package) in package_prefixes}
    kw['scripts'] = [(os.path.join(CMAKE_INSTALL_DIR(), script) if mask else script) for (script, mask) in new_scripts.items()]
    kw['data_files'] = [(parent_dir, list(file_set)) for (parent_dir, file_set) in data_files.items()]
    if ('zip_safe' not in kw):
        kw['zip_safe'] = False

    class BinaryDistribution(upstream_Distribution):

        def has_ext_modules(self):
            return has_cmakelists
    kw['distclass'] = BinaryDistribution
    print()
    return setuptools.setup(*args, **kw)