From 1084cef0e38e48e30d0f2279cb69e541d053e462 Mon Sep 17 00:00:00 2001 From: Griger5 Date: Fri, 5 Dec 2025 20:15:20 +0100 Subject: [PATCH 1/8] download newest cibuildwheel, instead of a specific version (which was currently one major release behind) --- .github/workflows/buildwheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index f2acdde9..c094ac44 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -63,7 +63,7 @@ jobs: - uses: actions/setup-python@v5 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.23.2 + run: python -m pip install cibuildwheel - name: Build and test wheels env: From 8de4668a4d7052e1aa4e154d35374ea00a5ad7fe Mon Sep 17 00:00:00 2001 From: Griger5 Date: Fri, 5 Dec 2025 20:19:13 +0100 Subject: [PATCH 2/8] update: build source distributions with cibuildwheel --- .github/workflows/buildwheels.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index c094ac44..0ec848e4 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -183,3 +183,36 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1.12 with: attestations: false + + make_sdist: + name: Make source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + submodules: true + + - name: Build source distribution + run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/*.tar.gz + + upload_sdist: + needs: [build_wheels, make_sdist] + environment: pypi + permissions: + id-token: write + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v5 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From fd3b8e6edde61e274464e6546593c2e7f53b37f8 Mon Sep 17 00:00:00 2001 From: Griger5 Date: Fri, 5 Dec 2025 21:14:49 +0100 Subject: [PATCH 3/8] compile nanobind extension as free threaded, for the no-GIL python --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50fd4c7b..e0e0d1d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,7 +546,7 @@ endif() find_package(nanobind CONFIG REQUIRED) add_subdirectory(gitmodules/nanobind) -nanobind_add_module(_PyPartMC STABLE_ABI ${PyPartMC_sources}) +nanobind_add_module(_PyPartMC FREE_THREADED STABLE_ABI ${PyPartMC_sources}) add_dependencies(_PyPartMC partmclib) set(PYPARTMC_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/include;" From 64ce1c950c011038df117b26b158afb740609b8a Mon Sep 17 00:00:00 2001 From: Griger5 Date: Fri, 5 Dec 2025 22:00:55 +0100 Subject: [PATCH 4/8] remove skipping PyPy builds, as they are now not enabled on default --- .github/workflows/buildwheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 0ec848e4..09abe659 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -67,8 +67,8 @@ jobs: - name: Build and test wheels env: - # skip 32-bit, PyPy, and musllinux builds - CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *musllinux*" + # skip 32-bit and musllinux builds + CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux*" CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} From 21fb073672b9def71d47a68eb533db3c8fb8899b Mon Sep 17 00:00:00 2001 From: Griger5 Date: Sat, 6 Dec 2025 17:30:58 +0100 Subject: [PATCH 5/8] skip pypy due to old version on windows, skip free-threaded builds --- .github/workflows/buildwheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 09abe659..28c0d6af 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -67,8 +67,8 @@ jobs: - name: Build and test wheels env: - # skip 32-bit and musllinux builds - CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux*" + # skip 32-bit, PyPy, musllinux, and free-threaded builds + CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *musllinux* cp3??t-*" CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} From c13bc28e117b672bf09fa3593428012ebc7eb4e8 Mon Sep 17 00:00:00 2001 From: Griger5 Date: Sat, 6 Dec 2025 18:50:59 +0100 Subject: [PATCH 6/8] set python version in setup-python --- .github/workflows/buildwheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 28c0d6af..6aa909b4 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -61,6 +61,8 @@ jobs: m4 - uses: actions/setup-python@v5 + with: + python-version: "3.11" - name: Install cibuildwheel run: python -m pip install cibuildwheel From 844692cbf77a1a2a4eb8078693a31d397baadf4d Mon Sep 17 00:00:00 2001 From: Griger5 Date: Sat, 6 Dec 2025 19:09:57 +0100 Subject: [PATCH 7/8] delete skipping PyPy, as it is not enabled by default (Windows now installs the correct version) --- .github/workflows/buildwheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 6aa909b4..0150d38e 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -69,8 +69,8 @@ jobs: - name: Build and test wheels env: - # skip 32-bit, PyPy, musllinux, and free-threaded builds - CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *musllinux* cp3??t-*" + # skip 32-bit, musllinux, and free-threaded builds + CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-*" CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} From b26424da735a0b1aaa8091230120fdd4d3ee0212 Mon Sep 17 00:00:00 2001 From: Griger5 Date: Sun, 7 Dec 2025 01:54:06 +0100 Subject: [PATCH 8/8] remove the free threaded nanobind build --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0e0d1d7..50fd4c7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,7 +546,7 @@ endif() find_package(nanobind CONFIG REQUIRED) add_subdirectory(gitmodules/nanobind) -nanobind_add_module(_PyPartMC FREE_THREADED STABLE_ABI ${PyPartMC_sources}) +nanobind_add_module(_PyPartMC STABLE_ABI ${PyPartMC_sources}) add_dependencies(_PyPartMC partmclib) set(PYPARTMC_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/include;"