From 84db7e4c874fd9165ae8d7c183f670ae9c407cfd Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 10:22:14 -0400 Subject: [PATCH 01/10] try cp313 --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8d61145a..74e86ae3 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-13, windows-latest] # Use specific versions for clarity arch: [x86_64, arm64] - pybuilds: [cp38, cp39, cp310, cp311, cp312] # Define pybuilds at the top level + pybuilds: [cp313] # Define pybuilds at the top level exclude: - os: ubuntu-24.04-arm # No need to specify arch, it's already implicit arch: x86_64 # Exclude x86_64 on ARM From d58699a72071c1dc0e9a4b3e90c6cf495a9f1f46 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 10:52:47 -0400 Subject: [PATCH 02/10] try again --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 74e86ae3..da6a08f1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - run: pip install cibuildwheel==2.23.0 - run: python -m cibuildwheel --output-dir wheelhouse env: From 71701fff0266fff1572ddf0551128ab77f0eca5f Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 13:18:41 -0400 Subject: [PATCH 03/10] try some stuff from drjit --- .github/workflows/wheels.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index da6a08f1..4980a664 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -48,9 +48,22 @@ jobs: with: python-version: '3.13' - run: pip install cibuildwheel==2.23.0 + + ################################################################ + # Set up envvars to build the correct wheel (stable ABI or not) + ################################################################ + - name: Prepare cibuildwheel environment (UNIX) + if: ${{ runner.os != 'Windows' }} + run: | + echo "CIBW_BUILD=${{ matrix.pybuilds }}-*" >> $GITHUB_ENV + + - name: Prepare cibuildwheel environment (Windows) + if: ${{ runner.os == 'Windows' }} + run: | + echo "CIBW_BUILD=${{ matrix.pybuilds }}-*" >> $env:GITHUB_ENV + - run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: "${{ matrix.pybuilds }}-*" # Use matrix.pybuilds and matrix.arch CIBW_ARCHS_MACOS: ${{ matrix.arch }} CIBW_SKIP: "cp*-manylinux_i686 cp*-musllinux* cp*-win32" - name: Upload Artifact From 27b02b58bf86d7e1a89514d967c032e4211a6bd1 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 13:22:36 -0400 Subject: [PATCH 04/10] change in pypro; revert wheels --- .github/workflows/wheels.yml | 15 +-------------- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4980a664..da6a08f1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -48,22 +48,9 @@ jobs: with: python-version: '3.13' - run: pip install cibuildwheel==2.23.0 - - ################################################################ - # Set up envvars to build the correct wheel (stable ABI or not) - ################################################################ - - name: Prepare cibuildwheel environment (UNIX) - if: ${{ runner.os != 'Windows' }} - run: | - echo "CIBW_BUILD=${{ matrix.pybuilds }}-*" >> $GITHUB_ENV - - - name: Prepare cibuildwheel environment (Windows) - if: ${{ runner.os == 'Windows' }} - run: | - echo "CIBW_BUILD=${{ matrix.pybuilds }}-*" >> $env:GITHUB_ENV - - run: python -m cibuildwheel --output-dir wheelhouse env: + CIBW_BUILD: "${{ matrix.pybuilds }}-*" # Use matrix.pybuilds and matrix.arch CIBW_ARCHS_MACOS: ${{ matrix.arch }} CIBW_SKIP: "cp*-manylinux_i686 cp*-musllinux* cp*-win32" - name: Upload Artifact diff --git a/pyproject.toml b/pyproject.toml index d399c9e6..2de8d13d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ minimum-version = "build-system.requires" build-dir = "build/{wheel_tag}" # Build stable ABI wheels for CPython 3.12+ -wheel.py-api = "cp312" +wheel.py-api = false [tool.scikit-build.cmake] build-type = "Release" From 8ba3c444aae8dcbce11a680b761655ceb8dc9f28 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 13:24:20 -0400 Subject: [PATCH 05/10] 313 --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2de8d13d..faf4f467 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,8 +39,9 @@ minimum-version = "build-system.requires" # Setuptools-style build caching in a local directory build-dir = "build/{wheel_tag}" -# Build stable ABI wheels for CPython 3.12+ -wheel.py-api = false +# Build stable ABI wheels for CPython 3.13+ +wheel.py-api = "cp313" + [tool.scikit-build.cmake] build-type = "Release" From c7a138d801169faed0a33aff472bc99e89a4f400 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 13:37:29 -0400 Subject: [PATCH 06/10] revert but enable STABLE_ABI in nanobind_add_module --- .github/workflows/wheels.yml | 4 ++-- CMakeLists.txt | 15 +++++++-------- pyproject.toml | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index da6a08f1..d56525f0 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-13, windows-latest] # Use specific versions for clarity arch: [x86_64, arm64] - pybuilds: [cp313] # Define pybuilds at the top level + pybuilds: [cp312] # Define pybuilds at the top level exclude: - os: ubuntu-24.04-arm # No need to specify arch, it's already implicit arch: x86_64 # Exclude x86_64 on ARM @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.12' - run: pip install cibuildwheel==2.23.0 - run: python -m cibuildwheel --output-dir wheelhouse env: diff --git a/CMakeLists.txt b/CMakeLists.txt index a5b9251f..b8d4369d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,13 +14,9 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15") # <20 for embree set(CMAKE_CXX_STANDARD 17) -if (CMAKE_VERSION VERSION_LESS 3.18) - set(DEV_MODULE Development) -else() - set(DEV_MODULE Development.Module) -endif() - -find_package(Python 3.8 COMPONENTS Interpreter ${DEV_MODULE} REQUIRED) +find_package(Python 3.8 + REQUIRED COMPONENTS Interpreter Development.Module + OPTIONAL_COMPONENTS Development.SABIModule) if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) @@ -125,7 +121,10 @@ function(pyigl_include prefix name) file(WRITE "${generated_dir}/BINDING_INVOCATIONS.in" "${BINDING_INVOCATIONS}") set(target_name "pyigl${prefix_lc}_${name}") - nanobind_add_module(${target_name} ${sources}) + nanobind_add_module( + ${target_name} + STABLE_ABI + ${sources}) # important for scikit-build install(TARGETS ${target_name} LIBRARY DESTINATION "igl/${subpath}") diff --git a/pyproject.toml b/pyproject.toml index faf4f467..c8750a18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,8 +39,8 @@ minimum-version = "build-system.requires" # Setuptools-style build caching in a local directory build-dir = "build/{wheel_tag}" -# Build stable ABI wheels for CPython 3.13+ -wheel.py-api = "cp313" +# Build stable ABI wheels for CPython 3.12+ +wheel.py-api = "cp312" [tool.scikit-build.cmake] From 8f7398dbde3dfb97067d61721779dd13602fcd54 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 14:25:05 -0400 Subject: [PATCH 07/10] inc version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1cb3af3d..7672d373 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ build-backend = "scikit_build_core.build" [project] name = "libigl" -version = "2.6.0" +version = "2.6.1" description = "libigl: A simple C++ geometry processing library" readme = "README.md" requires-python = ">=3.8" From f69388ab60e33f39b2a241fad6c2733535f28991 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 14:26:12 -0400 Subject: [PATCH 08/10] name [skip ci] --- .github/workflows/wheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d56525f0..621a74be 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -41,6 +41,8 @@ jobs: arch: arm64 # Exclude arm64 on macOS 13 - os: macos-13 pybuilds: cp38 + name: > + ${{ matrix.pybuilds }} ${{ matrix.os }} ${{ matrix.arch }} steps: - uses: actions/checkout@v4 From 4b24e6de0e28599f679210e73bab268633191121 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 14:27:17 -0400 Subject: [PATCH 09/10] bump --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 621a74be..264995ff 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -41,6 +41,7 @@ jobs: arch: arm64 # Exclude arm64 on macOS 13 - os: macos-13 pybuilds: cp38 + name: > ${{ matrix.pybuilds }} ${{ matrix.os }} ${{ matrix.arch }} From 927dc2f6379dfbc1a1a64e2411cc1f0b9a937ff0 Mon Sep 17 00:00:00 2001 From: Alec Jacobson Date: Thu, 15 May 2025 14:40:43 -0400 Subject: [PATCH 10/10] add back all the others --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 264995ff..9a200e6c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-13, windows-latest] # Use specific versions for clarity arch: [x86_64, arm64] - pybuilds: [cp312] # Define pybuilds at the top level + pybuilds: [cp38, cp39, cp310, cp311, cp312] # Define pybuilds at the top level exclude: - os: ubuntu-24.04-arm # No need to specify arch, it's already implicit arch: x86_64 # Exclude x86_64 on ARM