experimental/cpu/: scikit-build-core-0.9.4 metadata and description

Simple index

Build backend for CMake based projects

author_email Henry Schreiner <henryfs@princeton.edu>
  • Development Status :: 4 - Beta
  • Intended Audience :: Developers
  • Intended Audience :: Science/Research
  • License :: OSI Approved :: Apache Software License
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3 :: Only
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
  • Topic :: Scientific/Engineering
  • Topic :: Software Development :: Build Tools
  • Typing :: Typed
description_content_type text/markdown
  • Changelog, https://scikit-build-core.readthedocs.io/en/latest/changelog.html
  • Discussions, https://github.com/orgs/scikit-build/discussions
  • Documentation, https://scikit-build-core.readthedocs.io
  • Homepage, https://github.com/scikit-build/scikit-build-core
  • Issues, https://github.com/scikit-build/scikit-build-core/issues
provides_extras wheels
  • exceptiongroup>=1.0; python_version < '3.11'
  • importlib-metadata>=4.13; python_version < '3.8'
  • importlib-resources>=1.3; python_version < '3.9'
  • packaging>=21.3
  • pathspec>=0.10.1
  • tomli>=1.2.2; python_version < '3.11'
  • typing-extensions>=3.10.0; python_version < '3.9'
  • pytest-cov[toml]; extra == 'cov'
  • rich; extra == 'dev'
  • furo; extra == 'docs'
  • hatchling; extra == 'docs'
  • myst-parser>=0.13; extra == 'docs'
  • setuptools; extra == 'docs'
  • sphinx-autodoc-typehints; extra == 'docs'
  • sphinx-copybutton; extra == 'docs'
  • sphinx-inline-tabs; extra == 'docs'
  • sphinx-jsonschema; extra == 'docs'
  • sphinx>=7.0; extra == 'docs'
  • build>=0.8; extra == 'test'
  • cattrs>=22.2.0; extra == 'test'
  • pip>=22; (python_version < '3.13') and extra == 'test'
  • pip>=24.1b1; (python_version >= '3.13') and extra == 'test'
  • pybind11>=2.11; extra == 'test'
  • pytest-subprocess>=1.5; extra == 'test'
  • pytest>=7.0; extra == 'test'
  • setuptools>=43; (python_version < '3.9') and extra == 'test'
  • setuptools>=45; (python_version == '3.9') and extra == 'test'
  • setuptools>=49; (python_version >= '3.10' and python_version < '3.12') and extra == 'test'
  • setuptools>=66.1; (python_version >= '3.12') and extra == 'test'
  • virtualenv>=20.0.28; extra == 'test'
  • wheel>=0.40; extra == 'test'
  • hatchling>=1.24.0; extra == 'test-hatchling'
  • hatch-fancy-pypi-readme>=22.3; extra == 'test-meta'
  • setuptools-scm; extra == 'test-meta'
  • numpy; (python_version < '3.12' and platform_python_implementation != 'PyPy') and extra == 'test-numpy'
  • numpy~=1.21.0; (python_version == '3.7' and platform_python_implementation == 'PyPy' and sys_platform == 'linux') and extra == 'test-numpy'
  • numpy~=1.24.0; (python_version == '3.8' and platform_python_implementation == 'PyPy') and extra == 'test-numpy'
  • numpy~=1.25.0; (python_version == '3.9' and platform_python_implementation == 'PyPy') and extra == 'test-numpy'
  • fastjsonschema; extra == 'test-schema'
  • validate-pyproject; extra == 'test-schema'
  • cmake; extra == 'wheels'
  • ninja; (sys_platform != 'win32') and extra == 'wheels'
requires_python >=3.7
File Tox results History
148 KB
Python Wheel


Documentation Status GitHub Discussion Discord

Actions Status codecov

PyPI version Conda-Forge PyPI platforms


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 EST. We also have a developer's meeting on the first Friday of every month at the same time. Our past meeting minutes are available here.

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:

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:

The following limitations are present compared to classic scikit-build:

Some known missing features that will be developed soon:

Other backends are also planned:

The recommended interface is the native pyproject builder. There is also a WIP setuptools-based interface that is being developed to provide a transition path for classic scikit-build, and a WIP Hatchling plugin. Both might be moved to standalone packages in the future.


Only the pyproject-based builder should be used; the setuptools backend is experimental and likely to move to a separate package before being declared stable, and internal API is still being solidified. A future version of this package will support creating new build extensions.


To use scikit-build-core, add it to your build-system.requires, and specify the scikit_build_core.build builder as your build-system.build-backend. You do not need to specify cmake or ninja; scikit-build-core will require them automatically if the system versions are not sufficient.

requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"

name = "scikit_build_simplest"
version = "0.0.1"

You can (and should) specify the rest of the entries in project, but these are the minimum to get started.

An example CMakeLists.txt:

cmake_minimum_required(VERSION 3.15...3.27)

find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)

Python_add_library(_module MODULE src/module.c WITH_SOABI)

Scikit-build-core will backport FindPython from CMake 3.26.1 to older versions of Python, and will handle PyPy for you if you are building from PyPy. You will need to install everything you want into the full final path inside site-modules (so you will usually prefix everything by the package name).

More examples are in the tests/packages.


All configuration options can be placed in pyproject.toml, passed via -C/--config-setting in build or -C/--config-settings in pip , or set as environment variables. tool.scikit-build is used in toml, skbuild. for -C options, or SKBUILD_* for environment variables. The defaults are listed below:

# DEPRECATED in 0.8; use version instead.
cmake.minimum-version = ""

# The versions of CMake to allow. If CMake is not present on the system or does
# not pass this specifier, it will be downloaded via PyPI if possible. An empty
# string will disable this check.
cmake.version = ">=3.15"

# A list of args to pass to CMake when configuring the project. Setting this in
# config or envvar will override toml. See also ``cmake.define``.
cmake.args = []

# A table of defines to pass to CMake when configuring the project. Additive.
cmake.define = {}

# Verbose printout when building.
cmake.verbose = false

# The build type to use when building the project. Valid options are: "Debug",
# "Release", "RelWithDebInfo", "MinSizeRel", "", etc.
cmake.build-type = "Release"

# The source directory to use when building the project. Currently only affects
# the native builder (not the setuptools plugin).
cmake.source-dir = "."

# The build targets to use when building the project. Empty builds the default
# target.
cmake.targets = []

# DEPRECATED in 0.8; use version instead.
ninja.minimum-version = ""

# The versions of Ninja to allow. If Ninja is not present on the system or does
# not pass this specifier, it will be downloaded via PyPI if possible. An empty
# string will disable this check.
ninja.version = ">=1.5"

# If Ninja is not present on the system or is older than required, it will be
# downloaded via PyPI if this is false.
ninja.make-fallback = true

# The logging level to display, "DEBUG", "INFO", "WARNING", and "ERROR" are
# possible options.
logging.level = "WARNING"

# Files to include in the SDist even if they are skipped by default. Supports
# gitignore syntax.
sdist.include = []

# Files to exclude from the SDist even if they are included by default. Supports
# gitignore syntax.
sdist.exclude = []

# If set to True, try to build a reproducible distribution (Unix and Python 3.9+
# recommended).  ``SOURCE_DATE_EPOCH`` will be used for timestamps, or a fixed
# value if not set.
sdist.reproducible = true

# If set to True, CMake will be run before building the SDist.
sdist.cmake = false

# A list of packages to auto-copy into the wheel. If this is not set, it will
# default to the first of ``src/<package>``, ``python/<package>``, or
# ``<package>`` if they exist.  The prefix(s) will be stripped from the package
# name inside the wheel.
wheel.packages = ["src/<package>", "python/<package>", "<package>"]

# The Python tags. The default (empty string) will use the default Python
# version. You can also set this to "cp37" to enable the CPython 3.7+ Stable ABI
# / Limited API (only on CPython and if the version is sufficient, otherwise
# this has no effect). Or you can set it to "py3" or "py2.py3" to ignore Python
# ABI compatibility. The ABI tag is inferred from this tag.
wheel.py-api = ""

# Fill out extra tags that are not required. This adds "x86_64" and "arm64" to
# the list of platforms when "universal2" is used, which helps older Pip's
# (before 21.0.1) find the correct wheel.
wheel.expand-macos-universal-tags = false

# The install directory for the wheel. This is relative to the platlib root. You
# might set this to the package name. The original dir is still at
# An absolute path will be one level higher than the platlib root, giving access
# to "/platlib", "/data", "/headers", and "/scripts".
wheel.install-dir = ""

# A list of license files to include in the wheel. Supports glob patterns.
wheel.license-files = ["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"]

# If set to True (the default), CMake will be run before building the wheel.
wheel.cmake = true

# Target the platlib or the purelib. If not set, the default is to target the
# platlib if wheel.cmake is true, and the purelib otherwise.
wheel.platlib = ""

# A set of patterns to exclude from the wheel. This is additive to the SDist
# exclude patterns. This applies to the final paths in the wheel, and can
# exclude files from CMake output as well.  Editable installs may not respect
# this exclusion.
wheel.exclude = []

# The build tag to use for the wheel. If empty, no build tag is used.
wheel.build-tag = ""

# If CMake is less than this value, backport a copy of FindPython. Set to 0
# disable this, or the empty string.
backport.find-python = "3.26.1"

# Select the editable mode to use. Can be "redirect" (default) or "inplace".
editable.mode = "redirect"

# Turn on verbose output for the editable mode rebuilds.
editable.verbose = true

# Rebuild the project when the package is imported. The build-directory must be
# set.
editable.rebuild = false

# Extra args to pass directly to the builder in the build step.
build.tool-args = []

# The components to install. If empty, all default components are installed.
install.components = []

# Whether to strip the binaries. True for scikit-build-core 0.5+.
install.strip = true

# The path (relative to platlib) for the file to generate.
generate[].path = ""

# The template to use for the file. This includes string.Template style
# placeholders for all the metadata. If empty, a template-path must be set.
generate[].template = ""

# The path to the template file. If empty, a template must be set.
generate[].template-path = ""

# The place to put the generated file. The "build" directory is useful for CMake
# files, and the "install" directory is useful for Python files, usually. You
# can also write directly to the "source" directory, will overwrite existing
# files & remember to gitignore the file.
generate[].location = "install"

# List dynamic metadata fields and hook locations in this table.
metadata = {}

# Strictly check all config options. If False, warnings will be printed for
# unknown options. If True, an error will be raised.
strict-config = true

# Enable early previews of features not finalized yet.
experimental = false

# If set, this will provide a method for backward compatibility.
minimum-version = "0.9"  # current version

# The build directory. Defaults to a temporary directory, but can be set.
build-dir = ""

Most CMake environment variables should be supported, and CMAKE_ARGS can be used to set extra CMake args. ARCHFLAGS is used to specify macOS universal2 or cross-compiles, just like setuptools.

You can also specify [[tool.scikit-build.overrides]] to customize values for different systems. See the docs for details.

Other projects for building

Scikit-build-core is a binary build backend. There are also other binary build backends:

If you don't need a binary build, you don't need to use a binary build backend! There are some very good Python build backends; we recommend hatchling as a good balance between good defaults for beginners and good support for advanced use cases. This is the tool scikit-build-core itself uses.


Support for this work was provided by NSF grant OAC-2209877.