diff --git a/.github/workflows/packaging_wheels.yml b/.github/workflows/packaging_wheels.yml index ea13b674..2bf0ac6a 100644 --- a/.github/workflows/packaging_wheels.yml +++ b/.github/workflows/packaging_wheels.yml @@ -30,14 +30,10 @@ jobs: strategy: fail-fast: false matrix: - python: [ cp39, cp310, cp311, cp312, cp313, cp314, cp314t ] + python: [ cp313 ] platform: - { os: windows-2025, arch: amd64, cibw_system: win } - - { os: ubuntu-24.04, arch: x86_64, cibw_system: manylinux } - - { os: ubuntu-24.04-arm, arch: aarch64, cibw_system: manylinux } - - { os: macos-15, arch: arm64, cibw_system: macosx } - - { os: macos-15, arch: universal2, cibw_system: macosx } - - { os: macos-13, arch: x86_64, cibw_system: macosx } + minimal: - ${{ inputs.minimal }} exclude: @@ -89,14 +85,25 @@ jobs: cache-suffix: -${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }} python-version: ${{ matrix.python }} + # Load MSVC environment, needed for Windows - ninja builds + # Without this, the linking step will fail. + # Note: CIBW uses the host environment for windows, rather than an isolated container + - uses: ilammy/msvc-dev-cmd@v1 + if: ${{ matrix.platform.cibw_system == 'win' }} + with: + arch: ${{ matrix.platform.arch }} + - name: Build${{ inputs.testsuite != 'none' && ' and test ' || ' ' }}wheels uses: pypa/cibuildwheel@v3.1 env: CIBW_ARCHS: ${{ matrix.platform.arch == 'amd64' && 'AMD64' || matrix.platform.arch }} CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }} - # PYTHON_GIL=1: Suppresses the RuntimeWarning that the GIL is enabled on free-threaded builds. - # TODO: Remove PYTHON_GIL=1 when free-threaded is supported. + # PYTHON_GIL=1: Suppresses the RuntimeWarning that the GIL is enabled on free-threaded builds. + # TODO: Remove PYTHON_GIL=1 when free-threaded is supported. + # CMAKE_BUILD_TYPE=Release: Override Debug default when MSVC dev environment is loaded CIBW_ENVIRONMENT: PYTHON_GIL=1 + # For Windows, msvc-dev-cmd sets build to Debug. So, override it back to Release. + CIBW_ENVIRONMENT_WINDOWS: PYTHON_GIL=1 CMAKE_BUILD_TYPE=Release - name: Upload wheel uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index bcbb24f6..1c47e449 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -389,3 +389,10 @@ before-build = ["brew install ccache"] [tool.cibuildwheel.windows] before-build = ["choco install ccache"] + +[[tool.scikit-build.overrides]] +if.platform-system = "^win32" +cmake.args = [ + "-G", "Ninja", + "--log-level=DEBUG", +] \ No newline at end of file