diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 461d2a0a..2feefa5f 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -46,7 +46,10 @@ jobs: env: # override setting in pyproject.toml to use msys2 instead of msys64 bash CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh - CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh + # + # Don't need to create pythonXX.a under meson. Not needed any more: + # CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh + # - uses: actions/upload-artifact@v4 with: @@ -109,7 +112,7 @@ jobs: os: [ubuntu-20.04, windows-2019, macos-13, macos-14] # This list to be kept in sync with cibuildwheel config # and python-requires in pyproject.toml. - python-version: ['3.10', '3.11', '3.12', '3.13-dev'] + python-version: ['3.10', '3.11', '3.12', '3.13-dev', 'pypy3.10'] steps: - uses: actions/setup-python@v5 diff --git a/bin/cibw_before_build_windows.sh b/bin/cibw_before_build_windows.sh index ee0621f2..1ef83fda 100644 --- a/bin/cibw_before_build_windows.sh +++ b/bin/cibw_before_build_windows.sh @@ -1,5 +1,10 @@ #!/bin/bash +# +# This script was previously needed to make libpythonXX.a on Windows when using +# MinGW and setuptools. This is no longer needed now that we use meson. +# + set -o errexit # Uncomment this to run cibuildwheel locally on Windows: diff --git a/bin/cibw_repair_wheel_command_windows.sh b/bin/cibw_repair_wheel_command_windows.sh index 0c843d31..b247b406 100755 --- a/bin/cibw_repair_wheel_command_windows.sh +++ b/bin/cibw_repair_wheel_command_windows.sh @@ -4,6 +4,12 @@ # # https://github.com/scipy/scipy/blob/main/tools/wheels/repair_windows.sh +# +# This was previously needed because delvewheel would reject wheels with +# binaries generated by MinGW unless they had been stripped. This is not needed +# any more with newer versions of delvewheel. +# + set -o errexit # Uncomment this to run cibuildwheel locally on Windows: diff --git a/pyproject.toml b/pyproject.toml index 52abe5ff..d183220d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ package = "flint" [tool.cibuildwheel] # requires-python needs to keep in sync with this and also the list of Python # versions the wheels are tested against in CI. -build = "cp310-* cp311-* cp312-* cp313-*" +build = "cp310-* cp311-* cp312-* cp313-* pp310-*" skip = "*-win32 *-manylinux_i686 *-musllinux_*" # This is needed for free-threaded wheels: @@ -90,5 +90,18 @@ before-all = "bin/cibw_before_all_macosx_$(uname -m).sh" [tool.cibuildwheel.windows] before-all = "C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh" -before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh" -repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" +before-build = "pip install delvewheel" +repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel} --add-path .local/bin" + +# Previously with setuptools and MinGW it was necessary to run +# bin/cibw_before_build_windows.sh before building the wheel to create the +# libpython*.a files. This is no longer necessary now meson is used: +# +# before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh" +# +# Previously a custom delvewheel command was needed because delvewheel would +# reject binaries created with MinGW unless they had been stripped. This is not +# needed any more with newer versions of delvewheel: +# +# repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" +#