skbuild package¶
scikit-build is an improved build system generator for CPython C extensions.
This module provides the glue between the setuptools Python module and CMake. The build backend is provided by scikit-build-core’s setuptools plugin.
- skbuild.setup(*, cmake_args: Sequence[str] = (), cmake_install_dir: str = '', cmake_source_dir: str = '', cmake_with_sdist: bool = False, cmake_languages: Sequence[str] | None = None, cmake_minimum_required_version: str | None = None, cmake_process_manifest_hook: Callable[[list[str]], list[str]] | None = None, cmake_install_target: str = 'install', distclass: type[_DistributionT] = <class 'setuptools.dist.Distribution'>, **kw: Any) _DistributionT[source]¶
Submodules¶
skbuild.exceptions module¶
This module defines exceptions commonly used in scikit-build.
SKBuildError is now an alias of the setuptools SetupError raised by
the scikit-build-core setuptools plugin, kept so that existing
except SKBuildError clauses continue to work.
- skbuild.exceptions.SKBuildError¶
alias of
DistutilsSetupError
Deprecated shims¶
These modules exist only for compatibility with scikit-build <1.0 and warn
with DeprecationWarning on import.
skbuild.cmaker module¶
Compatibility shim for skbuild.cmaker.
scikit-build 1.0 builds on scikit-build-core and no longer ships the CMaker
class. Only get_cmake_version() is kept, since downstream setup.py
files use it to gate on the installed CMake version.
- skbuild.cmaker.get_cmake_version(cmake_executable: str = '') str[source]¶
Return the version of the given (or first found) CMake, e.g.
"3.14.4".With no argument, searches the way scikit-build-core does: the
cmakePyPI package if installed, thencmake3andcmakeon PATH. Pre-release suffixes are dropped (3.30.0-rc1reports as3.30.0).Raises
skbuild.exceptions.SKBuildErrorif CMake cannot be run.
skbuild.constants module¶
Compatibility shim for skbuild.constants.
scikit-build 1.0 builds on scikit-build-core and no longer implements this
module. Two helpers downstream setup.py files use are kept:
skbuild_plat_name() (derives a wheel platform tag) and
CMAKE_INSTALL_DIR() (points at the CMake install staging directory, so a
plain setuptools.Extension can compile against CMake-installed headers and
libraries). The other classic path helpers (CMAKE_BUILD_DIR,
SKBUILD_DIR, and friends) described the old _skbuild/ layout and are
not provided.
- skbuild.constants.CMAKE_INSTALL_DIR() str[source]¶
Directory where CMake installs files before setuptools merges them into the wheel.
scikit-build-core’s setuptools backend stages the CMake install under setuptools’
build_tempand runs CMake before compiling plainsetuptools.Extensionmodules, as classic scikit-build did. Limits: command-line overrides such as--build-tempare not visible here, and editable installs do not populate this directory.
skbuild.setuptools_wrap module¶
Compatibility shim for skbuild.setuptools_wrap.
scikit-build 1.0 builds on scikit-build-core, which does not implement the
classic install-classification pipeline this module drove. Nothing is exported.
The module exists only so a bare import skbuild.setuptools_wrap (some
projects keep one for historical reasons) still succeeds; any attribute access
raises AttributeError, since scikit-build-core has no equivalent hook
to monkeypatch. Port to scikit-build-core APIs.
skbuild.utils module¶
Compatibility shim for skbuild.utils.
scikit-build 1.0 builds on scikit-build-core and no longer ships these path and
directory helpers. Nothing is exported. The module exists only so a bare
import skbuild.utils still succeeds; any attribute access raises
AttributeError. Use scikit-build-core APIs, or pathlib/os for
the path helpers.