scikit-build: remove the pain from building C / C++ scientific Python extensions

scikit-build is an improved build system generator for CPython C extensions. It provides better support for additional compilers, build systems, cross compilation, and locating dependencies and their associated build requirements.

The project started during the 2014 SciPy Conference Sprints by Jean-Christophe Fillion-Robin, Michael Sarahan, Matthew McCormick, and Anthony Scopatz out of frustration with how difficult it was to build cross-platform scientific Python C / C++ extensions. The project, originally named PyCMake, was renamed to scikit-build to reflect its goal: to improve the build process for scientific Python packages. The scikit-build package is fundamentally just glue between the setuptools Python module and CMake. In 2016, significant progress was made with an award from the National Library of Medicine (NLM).

While other tools, like conda, help the scientific Python ecosystem by improving package management, this tool makes it possible for a research software engineer to build packages that require a compiler for Linux, macOS, Windows, and other operating systems. For example, the tool guides a novice user on steps to install the compiler required for their version of Python, and nitty-gritty build details, such as weak linking, are handled transparently. Since builds are generated by CMake, system introspection is effective and reliable, and building on top of third party C / C++ libraries is a breeze. A foundation in CMake also greatly enhances flexibility to use other compilers and build tools.

Support is explicitly available for Cython, a popular language in the scientific community that improves performance for Python extensions and can be used to wrap or interface with native third party libraries.

Two related projects, scikit-ci and scikit-ci-addons, expedite configuration to build packages for Linux, macOS, and Windows on freely available GitHub continuous integration services.

scikit-build is used in production to build packages for ITK, SimpleITK, CMake, and Ninja.


For a more thorough introduction, see the presentation from PyData Carolinas 2016:

This post is part of a series on scikit-build. For additional information, see


Leave a Reply