Skip to content

Commit

Permalink
Merge pull request #76 from oscarbenjamin/pr_pypy
Browse files Browse the repository at this point in the history
Add PyPy 3.10 to CI build
  • Loading branch information
oscarbenjamin authored Aug 26, 2024
2 parents 03a4baf + f9618a4 commit 53a1c3f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/buildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions bin/cibw_before_build_windows.sh
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 6 additions & 0 deletions bin/cibw_repair_wheel_command_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 16 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}"
#

0 comments on commit 53a1c3f

Please sign in to comment.