Skip to content

Commit c7a138d

Browse files
committed
revert but enable STABLE_ABI in nanobind_add_module
1 parent 8ba3c44 commit c7a138d

3 files changed

Lines changed: 11 additions & 12 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
matrix:
3030
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-13, windows-latest] # Use specific versions for clarity
3131
arch: [x86_64, arm64]
32-
pybuilds: [cp313] # Define pybuilds at the top level
32+
pybuilds: [cp312] # Define pybuilds at the top level
3333
exclude:
3434
- os: ubuntu-24.04-arm # No need to specify arch, it's already implicit
3535
arch: x86_64 # Exclude x86_64 on ARM
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v4
4747
- uses: actions/setup-python@v5
4848
with:
49-
python-version: '3.13'
49+
python-version: '3.12'
5050
- run: pip install cibuildwheel==2.23.0
5151
- run: python -m cibuildwheel --output-dir wheelhouse
5252
env:

CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
1414
# <20 for embree
1515
set(CMAKE_CXX_STANDARD 17)
1616

17-
if (CMAKE_VERSION VERSION_LESS 3.18)
18-
set(DEV_MODULE Development)
19-
else()
20-
set(DEV_MODULE Development.Module)
21-
endif()
22-
23-
find_package(Python 3.8 COMPONENTS Interpreter ${DEV_MODULE} REQUIRED)
17+
find_package(Python 3.8
18+
REQUIRED COMPONENTS Interpreter Development.Module
19+
OPTIONAL_COMPONENTS Development.SABIModule)
2420

2521
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
2622
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
@@ -125,7 +121,10 @@ function(pyigl_include prefix name)
125121
file(WRITE "${generated_dir}/BINDING_INVOCATIONS.in" "${BINDING_INVOCATIONS}")
126122

127123
set(target_name "pyigl${prefix_lc}_${name}")
128-
nanobind_add_module(${target_name} ${sources})
124+
nanobind_add_module(
125+
${target_name}
126+
STABLE_ABI
127+
${sources})
129128

130129
# important for scikit-build
131130
install(TARGETS ${target_name} LIBRARY DESTINATION "igl/${subpath}")

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ minimum-version = "build-system.requires"
3939
# Setuptools-style build caching in a local directory
4040
build-dir = "build/{wheel_tag}"
4141

42-
# Build stable ABI wheels for CPython 3.13+
43-
wheel.py-api = "cp313"
42+
# Build stable ABI wheels for CPython 3.12+
43+
wheel.py-api = "cp312"
4444

4545

4646
[tool.scikit-build.cmake]

0 commit comments

Comments
 (0)