Skip to content

Commit e7b471f

Browse files
Merge pull request #411 from oscarbenjamin/pr_abi3_wheels
Add stable ABI wheels for CPython 3.10+
2 parents 5480e73 + e51cd20 commit e7b471f

7 files changed

Lines changed: 88 additions & 24 deletions

File tree

.github/workflows/buildwheel.yml

Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ env:
1515
PYODIDE_VERSION: '314.0.0'
1616
PYODIDE_EMSCRIPTEN_VERSION: '5.0.3'
1717
PYODIDE_PYTHON_VERSION: '3.14'
18-
PYODIDE_CIBW_BUILD: 'cp314-*'
1918

2019
jobs:
2120
build_wheels:
@@ -26,54 +25,117 @@ jobs:
2625
fail-fast: false
2726
matrix:
2827
include:
28+
2929
- name: Build manylinux x86-64 wheels
3030
os: ubuntu-22.04
3131
kind: native
3232
artifact_name: wheels-ubuntu-22.04
3333
cibw_platform: auto
34-
cibw_build: "*"
34+
cibw_build: "cp313-* cp314-* cp314t-* pp311-*"
35+
cibw_config_settings: ""
36+
37+
- name: Build manylinux x86-64 stable ABI wheels
38+
os: ubuntu-22.04
39+
kind: stable-abi
40+
artifact_name: wheels-ubuntu-22.04-abi3
41+
cibw_platform: auto
42+
cibw_build: "cp310-*"
43+
cibw_config_settings: "setup-args=-Dpython.allow_limited_api=true"
44+
3545
- name: Build manylinux arm64 wheels
3646
os: ubuntu-22.04-arm
3747
kind: native
3848
artifact_name: wheels-ubuntu-22.04-arm
3949
cibw_platform: auto
40-
cibw_build: "*"
50+
cibw_build: "cp313-* cp314-* cp314t-* pp311-*"
51+
cibw_config_settings: ""
52+
53+
- name: Build manylinux arm64 stable ABI wheels
54+
os: ubuntu-22.04-arm
55+
kind: stable-abi
56+
artifact_name: wheels-ubuntu-22.04-arm-abi3
57+
cibw_platform: auto
58+
cibw_build: "cp310-*"
59+
cibw_config_settings: "setup-args=-Dpython.allow_limited_api=true"
60+
4161
- name: Build Windows x86-64 wheels
4262
os: windows-2022
4363
kind: native
4464
artifact_name: wheels-windows-2022
4565
cibw_platform: auto
46-
cibw_build: "*"
66+
cibw_build: "cp313-* cp314-* cp314t-* pp311-*"
67+
cibw_config_settings: "setup-args=--vsenv build-dir=build"
68+
69+
- name: Build Windows x86-64 stable ABI wheels
70+
os: windows-2022
71+
kind: stable-abi
72+
artifact_name: wheels-windows-2022-abi3
73+
cibw_platform: auto
74+
cibw_build: "cp310-*"
75+
cibw_config_settings: "setup-args=--vsenv setup-args=-Dpython.allow_limited_api=true build-dir=build"
76+
4777
- name: Build Windows arm64 wheels
4878
os: windows-11-arm
4979
kind: native
5080
artifact_name: wheels-windows-11-arm
5181
cibw_platform: auto
52-
cibw_build: "*"
82+
cibw_build: "cp313-* cp314-* cp314t-* pp311-*"
83+
cibw_config_settings: "setup-args=--vsenv build-dir=build"
84+
85+
- name: Build Windows arm64 stable ABI wheels
86+
os: windows-11-arm
87+
kind: stable-abi
88+
artifact_name: wheels-windows-11-arm-abi3
89+
cibw_platform: auto
90+
cibw_build: "cp310-*"
91+
cibw_config_settings: "setup-args=--vsenv setup-args=-Dpython.allow_limited_api=true build-dir=build"
92+
5393
- name: Build macOS x86-64 wheels
5494
os: macos-15-intel
5595
kind: native
5696
artifact_name: wheels-macos-15-intel
5797
cibw_platform: auto
58-
cibw_build: "*"
98+
cibw_build: "cp313-* cp314-* cp314t-* pp311-*"
99+
cibw_config_settings: ""
100+
101+
- name: Build macOS x86-64 stable ABI wheels
102+
os: macos-15-intel
103+
kind: stable-abi
104+
artifact_name: wheels-macos-15-intel-abi3
105+
cibw_platform: auto
106+
cibw_build: "cp310-*"
107+
cibw_config_settings: "setup-args=-Dpython.allow_limited_api=true"
108+
59109
- name: Build macOS arm64 wheels
60110
os: macos-14
61111
kind: native
62112
artifact_name: wheels-macos-14
63113
cibw_platform: auto
64-
cibw_build: "*"
114+
cibw_build: "cp313-* cp314-* cp314t-* pp311-*"
115+
cibw_config_settings: ""
116+
117+
- name: Build macOS arm64 stable ABI wheels
118+
os: macos-14
119+
kind: stable-abi
120+
artifact_name: wheels-macos-14-abi3
121+
cibw_platform: auto
122+
cibw_build: "cp310-*"
123+
cibw_config_settings: "setup-args=-Dpython.allow_limited_api=true"
124+
65125
- name: Build Pyodide wheels
66126
os: ubuntu-22.04
67127
kind: pyodide
68128
artifact_name: wheels-pyodide
69129
cibw_platform: pyodide
130+
cibw_build: "cp314-*"
131+
cibw_config_settings: "build-dir=flint_wasm_build setup-args=-Dflint_version_check=false"
70132

71133
steps:
72134
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
73135
with:
74136
persist-credentials: false
75137

76-
- if: ${{ matrix.kind == 'native' }}
138+
- if: ${{ matrix.kind != 'pyodide' }}
77139
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
78140
with:
79141
python-version: '3.13'
@@ -120,7 +182,8 @@ jobs:
120182
uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0
121183
env:
122184
CIBW_PLATFORM: ${{ matrix.cibw_platform }}
123-
CIBW_BUILD: ${{ matrix.kind == 'pyodide' && env.PYODIDE_CIBW_BUILD || matrix.cibw_build }}
185+
CIBW_BUILD: ${{ matrix.cibw_build }}
186+
CIBW_CONFIG_SETTINGS: ${{ matrix.cibw_config_settings }}
124187
CIBW_PYODIDE_VERSION: ${{ env.PYODIDE_VERSION }}
125188
# override setting in pyproject.toml to use msys2 instead of msys64 bash
126189
CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.os == 'windows-11-arm' && 'msys2 -c bin/cibw_before_all_windows_arm64.sh' || 'msys2 -c bin/cibw_before_all_windows_amd64.sh' }}
@@ -172,8 +235,10 @@ jobs:
172235
macos-15,
173236
]
174237
# This list to be kept in sync with python-requires in pyproject.toml.
175-
python-version: ['3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy3.11']
238+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', '3.15', 'pypy3.11']
176239
exclude:
240+
- os: windows-11-arm
241+
python-version: '3.10'
177242
- os: windows-11-arm
178243
python-version: pypy3.11
179244

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Author: Fredrik Johansson <fredrik.johansson@gmail.com>
1818
Installation
1919
------------
2020

21-
Currently python-flint supports CPython versions 3.11-3.14 and 3.14t
21+
Currently python-flint supports CPython versions 3.10-3.14 and 3.14t
2222
(free-threaded) and provides binaries on PyPI for the following platforms:
2323

2424
- Windows (x86-64)
@@ -144,7 +144,7 @@ Compatible versions:
144144

145145
| python-flint | Release date | CPython | FLINT | Cython |
146146
|--------------|---------------|-------------|------------|------------------|
147-
| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.6` | `3.1-3.2?` |
147+
| `0.9.0` | ??? | `3.10-3.14` | `3.0-3.6` | `3.1-3.2?` |
148148
| `0.8.0` | 29th Aug 2025 | `3.11-3.14` | `3.0-3.3` | `3.1` only |
149149
| `0.7.0` | 16th Mar 2025 | `3.11-3.13` | `3.0-3.2` | `3.0.11-3.1.0a1` |
150150
| `0.6.0` | 1st Feb 2024 | `3.9-3.12` | `3.0` only | `3.0` only |

bin/cibw.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ rem
2222
del /q wheelhouse\*
2323

2424
rem override setting in pyproject.toml
25-
set CIBW_BUILD=cp39-* cp310-* cp311-*
25+
set CIBW_BUILD=cp313-* cp314-* cp314t-* pp311-*
26+
27+
cibuildwheel --platform windows
28+
29+
set CIBW_BUILD=cp310-*
2630

2731
cibuildwheel --platform windows

doc/source/build.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Compatible versions:
8686
- Cython
8787
* - 0.9.0
8888
- Not yet
89-
- 3.11-3.14
89+
- 3.10-3.14
9090
- 3.0-3.6
9191
- 3.1-3.2?
9292
* - 0.8.0

doc/source/install.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Fully supported platforms
4747

4848
Generally each release of python-flint will be compatible with a range of
4949
Python versions as described in `SPEC 0
50-
<https://scientific-python.org/specs/spec-0000/>`_. At the time of writing, the
51-
current release of ``python-flint`` is ``0.6.0`` and binaries are provided for
52-
Python 3.9, 3.10 3.11 and 3.12 for the following platforms:
50+
<https://scientific-python.org/specs/spec-0000/>`_. At the time of writing,
51+
binaries are provided for CPython 3.10-3.14 and PyPy 3.11 for the following
52+
platforms:
5353

5454
- Windows 64-bit (``x86_64``)
5555
- MacOS 64-bit Intel and 64-bit ARM (i.e. Apple Silicon)

meson.options

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
option('coverage', type : 'boolean', value : false, description : 'enable coverage build')
22
option('add_flint_rpath', type : 'boolean', value : false)
33
option('flint_version_check', type: 'boolean', value : true)
4-
option('limited_api_version', type: 'string', value : '3.12')
4+
option('limited_api_version', type: 'string', value : '3.10')

pyproject.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Bindings for FLINT"
44
version = "0.8.0"
55

66
# This needs to be in sync with README, and CI config.
7-
requires-python = ">= 3.11"
7+
requires-python = ">= 3.10"
88
authors = [
99
{name = "Fredrik Johansson", email = "fredrik.johansson@gmail.com"},
1010
{name = "Oscar Benjamin", email = "oscar.j.benjamin@gmail.com"},
@@ -154,7 +154,6 @@ repair-wheel-command = [
154154

155155
[tool.cibuildwheel.windows]
156156
before-build = "pip install wheel delvewheel"
157-
config-settings = {setup-args = ["--vsenv"], build-dir = "build"}
158157
repair-wheel-command = [
159158
"""python bin/cibw_repair_wheel_licenses.py {wheel} \
160159
--license LGPL-3.0-or-later \
@@ -199,7 +198,3 @@ WASM_LIBRARY_DIR = "$(pwd)/wasm-library-dir"
199198
PKG_CONFIG_PATH = "$(pwd)/wasm-library-dir/lib/pkgconfig:$PKG_CONFIG_PATH"
200199
CFLAGS = "-I$(pwd)/wasm-library-dir/include $CFLAGS"
201200
LDFLAGS = "-L$(pwd)/wasm-library-dir/lib -lflint -lmpfr -lgmp $LDFLAGS"
202-
203-
[tool.cibuildwheel.pyodide.config-settings]
204-
build-dir = "flint_wasm_build"
205-
setup-args = ["-Dflint_version_check=false"]

0 commit comments

Comments
 (0)