Skip to content

Build dpnp with scikit-build-core #3222

Todo

Description

@antonwolfy

scikit-build 1.0.0 replaced its classic backend with the setuptools plugin of scikit-build-core, and skbuild.setup() is now a thin wrapper around it. #3221 caps scikit-build below 1.0 to keep the current build working. Moving to the 1.0 wrapper isn't worth it: it deletes the CMake build directory on every run, so every build is a full rebuild, and pip install -e . builds everything a second time.

This issue tracks building dpnp with scikit-build-core directly (build-backend = "scikit_build_core.build") and lifting the caps. It involves:

  • pyproject.toml: the new backend and a [tool.scikit-build] table instead of setup.py, with wheel.packages, a wheel.exclude list that keeps the wheel content as it is today, and a persistent build-dir for incremental rebuilds
  • the version: setuptools-scm's default scheme rejects our X.Y.0devN tags, as it expects dev tags to end in .dev0. We can keep versioneer through a version provider in the repository, or have setuptools-scm describe only the dev0 and release tags, which turns 0.22.0dev3+71.g<hash> into 0.22.0.dev151+g<hash>
  • CMake: the Cython targets on cython-cmake instead of scikit-build's UseCython, relative install destinations instead of ${CMAKE_INSTALL_PREFIX}/..., and lib/cmake/dpnp under SKBUILD_DATA_DIR
  • editable installs: the compiled modules then live in site-packages while the Python files stay in the source tree, and dpnp.__path__ lists both. dpnp.get_include(), python -m dpnp --tensor-include-dir, the Windows DLL directories in dpnp/__init__.py and test_free_threading.py must stop relying on __file__
  • scripts/build_locally.py and scripts/gen_coverage.py: one pip install with config settings instead of setup.py build_ext --inplace followed by pip install -e .
  • the Windows wheels: the MSVC environment for the Ninja build, which classic scikit-build set up and scikit-build-core doesn't
  • the conda recipes, the build environments and workflows, the pybind11 example, the quick start guide and the AGENTS.md files

The Build with Open Source LLVM SYCL compiler job also builds dpctl from source, so it keeps scikit-build<1.0 until dpctl builds with scikit-build-core as well.

Activity

  1. self-assigned this
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions