scikit-build-core is a modern, PEP 517/660 compliant build backend for Python projects that use CMake to build native extensions. It streamlines the integration of C, C++, or Fortran code with Python packaging, handling everything from project configuration to wheel and sdist generation. The current version is 0.12.2, with a fairly active release cadence, typically releasing minor bugfix or feature updates every few weeks.
pip install scikit-build-coreNo compatibility data collected yet for this library.
To use scikit-build-core, you primarily configure your project via `pyproject.toml`. This minimal example demonstrates how to set up `pyproject.toml` to declare `scikit-build-core` as the build backend, alongside a basic `CMakeLists.txt` and a dummy C++ source file. The Python `__init__.py` shows where the native library would typically be loaded. After running `python -m build`, `scikit-build-core` invokes CMake to build your native extension and then packages it into a wheel. You'll need CMake and a C++ compiler installed on your system to run this.
Upgrade your project's Python version to 3.8 or newer, or pin `scikit-build-core` to a version prior to 0.11.0.
Review your sdist content after upgrading. If you rely on files in ignored directories being included, you might need to adjust your `sdist.include` configuration or explicitly set `sdist.inclusion-mode = "classic"` in `pyproject.toml`.
Ensure your `pyproject.toml` has `[tool.scikit-build]` and `minimum-version` is set to `0.12` or higher to explicitly opt into modern behavior and avoid potential future PyPI upload rejections.
Avoid using Python 3.13.4 on Windows for building projects with `scikit-build-core`. Use a different Python 3.13.x version or an earlier/later stable release.
Install CMake and a suitable C/C++ compiler (e.g., GCC, Clang, MSVC) on your system. For `build-system.requires` in `pyproject.toml`, it's recommended to include `cmake>=X.Y` (where X.Y is your minimum required CMake version) to ensure the build environment explicitly checks for CMake.
Install CMake from cmake.org or your system's package manager (e.g., `apt install cmake`, `brew install cmake`) and ensure it's in your PATH.
Ensure `pyproject.toml` correctly specifies `build-system.build-backend = "scikit_build_core.build"` and `pip install scikit-build-core`.
Examine the detailed output preceding this error to identify the specific CMake or compiler error, then debug your `CMakeLists.txt` or C/C++/Fortran source files.
Install `scikit-build-core` in your build environment using `pip install scikit-build-core` (or `pip install build scikit-build-core` if using the `build` package).
No dependency data recorded yet.