diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 77f58f1..1fb70bc 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -21,24 +21,19 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel] arch: [native] - python: ["{cp310,pp310,pp311}"] + python: ["{cp310,pp311}"] # Split aarch64 across jobs because it uses emulation (slow) include: - - os: ubuntu-latest + # DNS fails inside i686 containers on ubuntu-26.04 runners + - os: ubuntu-24.04 arch: i686 - python: "{cp310,pp310,pp311}" + python: "{cp310,pp311}" - os: ubuntu-latest arch: aarch64 python: "cp310" - os: ubuntu-latest arch: aarch64 - python: "pp310" - - os: ubuntu-latest - arch: aarch64 - python: "pp3{10,11}" - - os: ubuntu-latest - arch: aarch64 - python: "pp3{10,11}" + python: "pp311" steps: - uses: actions/checkout@v7 with: @@ -49,7 +44,7 @@ jobs: with: platforms: all if: runner.os == 'Linux' && matrix.arch == 'aarch64' - - uses: pypa/cibuildwheel@v4.2.1 + - uses: pypa/cibuildwheel@v4.3.1 env: CIBW_ARCHS: "${{ matrix.arch }}" CIBW_BUILD: "${{ matrix.python }}-*" diff --git a/pyproject.toml b/pyproject.toml index dec3b6b..29b1141 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,16 +34,10 @@ Homepage = "https://python-rtmixer.readthedocs.io" "Source Code" = "https://github.com/spatialaudio/python-rtmixer" [tool.cibuildwheel] -enable = ["pypy", "pypy-eol"] -manylinux-aarch64-image = "manylinux2014" -manylinux-pypy_x86_64-image = "manylinux2014" -manylinux-pypy_aarch64-image = "manylinux2014" -manylinux-x86_64-image = "manylinux2014" +enable = ["pypy"] test-command = "python -c \"import rtmixer; print(rtmixer.__version__)\"" # No portaudio on these platforms: test-skip = "*_i686 *-musllinux_* *_aarch64" -# To enable testing we'd have to bump up to the Almalinux 8-based image: -# manylinux-aarch64-image = "manylinux_2_28" repair-wheel-command = "bash ./tools/cibw_repair_wheel_command.sh {dest_dir} {wheel} {delocate_archs}" [tool.cibuildwheel.linux] diff --git a/rtmixer_build.py b/rtmixer_build.py index ef647e4..387c674 100644 --- a/rtmixer_build.py +++ b/rtmixer_build.py @@ -20,6 +20,11 @@ extra_compile_args = list() if sys.platform == "linux": extra_compile_args.append("--std=c99") +extra_kwargs = dict() +# cffi sets py_limited_api=True by default, which setuptools >= 84.1 no longer +# ignores for PyPy on Windows (giving an untagged, unimportable "_rtmixer.pyd") +if sys.implementation.name != 'cpython': + extra_kwargs['py_limited_api'] = False ffibuilder.set_source( '_rtmixer', RINGBUFFER_CDEF + open('src/rtmixer.c').read(), @@ -30,6 +35,7 @@ undef_macros=[ # 'NDEBUG' ], + **extra_kwargs, ) if __name__ == '__main__':