SciPy 2024

Scikit-build-core: A modern build-backend for CPython C/C++/Fortran/Cython extensions.
07-12, 11:25–11:55 (US/Pacific), Room 315

Discover how scikit-build-core revolutionizes Python extension building with its seamless integration of CMake and Python packaging standards. Learn about its enhanced features for cross-compilation, multi-platform support, and simplified configuration, which enable writing binary extensions with pybind11, Nanobind, Fortran, Cython, C++, and more. Dive into the transition from the classic scikit-build to the robust scikit-build-core and explore its potential to streamline package distribution across various environments.


In this talk, we will delve into the evolution of Python extension building with scikit-build-core, the next-generation successor to the classic scikit-build. Designed as a ground-up rewrite, scikit-build-core reimagines the process of creating Python modules with CMake, offering a bridge between CMake and Python's packaging ecosystem.

We'll explore the key features that distinguish scikit-build-core, including its static configuration system based on pyproject.toml, which provides a simple yet powerful means of defining build settings. Unlike its predecessor, scikit-build-core adopts modern Python packaging standards, eliminating dependencies on setuptools, distutils, or wheel, and providing better error handling and logging for a smoother development experience.

One of the notable enhancements in scikit-build-core is its comprehensive support for cross-compilation, enabling developers to build extensions for diverse platforms, including standard amd64 desktop platforms, Apple, Windows or LinuxARM architectures, Pyodide (emscripten), and more exotic platforms found in mobile, Raspberry Pi, and HPC environments. With scikit-build-core, developers can harness the full power of CMake to handle complex build scenarios, customize build targets, and leverage advanced features like multithreading and caching.

We'll discuss scikit-build-core's seamless integration with existing Python workflows and highlight its compatibility with popular tools and libraries used in the scientific computing community. Whether you're working with C++, Cython, Fortran, pybind11, Nanobind, NumPy, SciPy, or specialized scientific libraries like ITK and VTK, scikit-build-core offers a flexible and robust solution for building and distributing Python extensions across different environments and architectures.

Moreover, we'll address the transition from the classic scikit-build to scikit-build-core, outlining the benefits and considerations for migrating existing projects. While scikit-build-core preserves the core functionalities of its predecessor, it introduces several improvements and optimizations that enhance the overall development experience, including editable installs with optional automatic rebuilds.

Finally, we'll provide insights into the future roadmap of scikit-build-core, including planned features and potential integrations with other build systems. As the Python ecosystem continues to evolve, scikit-build-core remains committed to delivering innovative solutions for building Python extensions with ease and efficiency.

Join us to learn how scikit-build-core empowers developers to overcome the complexities of Python extension building and unlock new possibilities for package distribution and deployment. Whether you're a seasoned Python developer or a newcomer to the world of CMake-based builds, this talk offers valuable insights and practical tips for leveraging scikit-build-core in your projects.

Jean-Christophe Fillion-Robin is an open-source enthusiast known as the original author of scikit-build. Currently, he holds the position of distinguished engineer at Kitware Inc, where he spearheads the development of commercial applications leveraging "3D Slicer". Additionally, Jean-Christophe maintains python-cmake-buildsystem, providing a CMake-based alternative build system tailored for CPython.

This speaker also appears in: