From 1b3dbc29e2d926e935378da284ee218bab6a9a13 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Sun, 29 Dec 2024 21:59:36 +0800 Subject: [PATCH] python: add ninja build dependency (#1128) * python: add ninja build dependency * change ninja version setting * CI: install ninja for SDist * fix package name --- .github/workflows/build_wheels.yml | 6 +++++- pyproject.toml | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 5657befdc..0b8864027 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -36,7 +36,11 @@ jobs: - name: Build SDist run: pipx run build --sdist - name: Confirm SDist can be built - run: pip wheel dist/*.tar.gz + run: | + # FIXME: why doesn't scikit_build_core automatically download ninja? + sudo apt-get update + sudo apt-get install ninja-build + pip wheel dist/*.tar.gz - uses: actions/upload-artifact@v4 with: name: python-sdist diff --git a/pyproject.toml b/pyproject.toml index 09e119e77..0a586a60e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,8 @@ requires = [ build-backend = "scikit_build_core.build" [tool.scikit-build] -cmake.minimum-version = "3.18" +cmake.version = ">=3.18" +ninja.version = ">=1.11" sdist.exclude = [ ".github", "bindings/c",