| single |
# scikit-build-core
[![Documentation Status][rtd-badge]][rtd-link]
[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
[![Discord][discord-badge]][discord-link]
[![Actions Status][actions-badge]][actions-link]
[![codecov][codecov-badge]][codecov-link]
[![PyPI version][pypi-version]][pypi-link]
[![Conda-Forge][conda-badge]][conda-link]
[![PyPI platforms][pypi-platforms]][pypi-link]
[![Downloads][download-badge]][download-link]
> [!NOTE]
>
> We have a public Scikit-build community meeting every month!
> [Join us on Google Meet] on the third
> Friday of every month at [12:00 PM ET][]. Some of our past meeting
minutes are
> [available here].
[12:00 PM ET]: https://howlonghowmany.com/my-time/eastern-time/12-pm
Scikit-build-core is a build backend for Python that uses CMake to build
extension modules. It has a simple yet powerful static configuration system
in
pyproject.toml, and supports almost unlimited flexibility via CMake. It was
initially developed to support the demanding needs of scientific users, but
can
build any sort of package that uses CMake.
Scikit-build-core is a ground-up rewrite of the classic Scikit-build. The
key
features of scikit-build classic (which is setuptools based) are also
present
here:
- Great support for or by most OSs, compilers, IDEs, and libraries
- Support for C++ features and other languages like Fortran
- Support for multithreaded builds
- Simple CMakeLists.txt files instead of up to thousands of lines of
fragile
setuptools/distutils code
- Cross-compile support for Apple Silicon and Windows ARM
Scikit-build-core was built using Python packaging standards developed
after
scikit-build (classic) was written. Using it directly provides the
following
features over classic Scikit-build:
- Better warnings, errors, and logging
- No warning about unused variables
- Automatically adds Ninja and/or CMake only as required
- No dependency on setuptools, distutils, or wheel
- Powerful config system, including config options support
- Automatic inclusion of site-packages in `CMAKE_PREFIX_PATH`
- FindPython is backported if running on CMake < 3.26.1 (configurable),
supports
PyPy SOABI & Limited API / Stable ABI
- Limited API / Stable ABI and pythonless tags supported via config option
- No slow generator search, ninja/make or MSVC used by default, respects
`CMAKE_GENERATOR`
- SDists are reproducible by default (UNIX, Python 3.9+, uncompressed
comparison
recommended), and wheels can be made reproducible too (opt-in)
- Support for caching between builds (opt-in by setting `build-dir`)
- Support for writing out to extra wheel folders (scripts, headers, data)
- Support for selecting install components and build targets
- Dedicated entrypoints for module and prefix directories
- Several integrated dynamic metadata plugins, supporting the cross-backend
`[[tool.dynamic-metadata]]` standard
- Editable mode support, with optional experimental auto rebuilds on import
and
optional in-place mode
- Supports WebAssembly (Emscripten/[Pyodide]).
- Supports [free-threaded Python 3.13+],
including the free-threaded stable ABI (PEP 803).
- A `scikit-build` CLI, including `scikit-build init` to scaffold a new
project.
Current requirements:
- The minimum supported CMake is 3.15
- The minimum supported Python is 3.8 (3.7+ for 0.10.x and older)
The recommended interface is the native pyproject builder. Other backends
are
also available:
- Setuptools integration (use the `[setuptools]` extra)
- Hatchling plugin (use the `[hatchling]` extra)
> [!WARNING]
>
|