Skip to content
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
types:
- published

env:
FORCE_COLOR: 3

jobs:
build_sdist:
name: Build SDist
Expand All @@ -36,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -45,11 +48,20 @@ jobs:

- uses: pypa/[email protected]
env:
CIBW_BUILD: cp311-* cp312-*

# Cross-compile on macOS
CIBW_ARCHS_MACOS: x86_64 arm64

# Cross-compile on Win
CIBW_ARCHS_WINDOWS: ARM64

# Temporary: use pre-release Python 3.12 for stable ABI builds
CIBW_PRERELEASE_PYTHONS: True

# Debugging
SKBUILD_CMAKE_VERBOSE: 1
SKBUILD_LOGGING_LEVEL: DEBUG

- name: Verify clean directory
run: git diff --exit-code
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ endif()

# Try to import all Python components potentially needed by nanobind
find_package(Python 3.8
REQUIRED COMPONENTS Interpreter Development.Module
OPTIONAL_COMPONENTS Development.SABIModule)
REQUIRED COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT})

# Import nanobind through CMake's find_package mechanism
find_package(nanobind CONFIG REQUIRED)

include(CMakePrintHelpers)
cmake_print_variables(Python_SOABI SKBUILD_SOABI NB_SUFFIX)

# We are now ready to compile the actual extension module
nanobind_add_module(
# Name of the extension
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[build-system]
requires = ["scikit-build-core >=0.4.3", "nanobind >=1.3.2"]
requires = [
"scikit-build-core @ git+https://github.com/scikit-build/scikit-build-core@henryiii/fix/crosscompile",
"nanobind @ git+https://github.com/henryiii/nanobind@henryiii/fix/suffix"]
build-backend = "scikit_build_core.build"

[project]
Expand Down