Skip to content

Commit 812c014

Browse files
Release 3.6.1
- Added abi3 wheel support (Python stable ABI) - Single CPython wheel now works across Python 3.9-3.14+ - Significantly reduces release size and build time 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 04dedc5 commit 812c014

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ jobs:
3030
run: python -m cibuildwheel --output-dir wheelhouse
3131
# Options (https://cibuildwheel.readthedocs.io/en/stable/options/)
3232
env:
33-
# Build for CPython 3.9-3.13 and PyPy 3.11
34-
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* pp311-*
33+
# Build abi3 wheel for CPython 3.9+ (one wheel for all versions)
34+
# Build version-specific wheel for PyPy (which doesn't support abi3)
35+
CIBW_BUILD: cp39-* pp311-*
3536
CIBW_SKIP: "*musllinux*"
3637
CIBW_ENABLE: pypy
3738
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "reynir"
7-
version = "3.6.0"
7+
version = "3.6.1"
88
description = "A natural language parser for Icelandic"
99
authors = [{ name = "Miðeind ehf.", email = "mideind@mideind.is" }]
1010
maintainers = [{ name = "Miðeind ehf.", email = "mideind@mideind.is" }]

src/reynir/eparser_build.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@
139139
if IMPLEMENTATION == "PyPy":
140140
os.environ["LDCXXSHARED"] = "c++ -shared"
141141

142+
# Use the Python stable ABI (abi3) for CPython, allowing a single wheel
143+
# to work across multiple Python versions (3.9+). PyPy doesn't support abi3.
144+
py_limited_api = "cp39" if IMPLEMENTATION == "CPython" else False
145+
142146
ffibuilder.cdef(declarations + callbacks)
143147

144148
ffibuilder.set_source(
@@ -149,6 +153,7 @@
149153
source_extension=".cpp",
150154
sources=["src/reynir/eparser.cpp"],
151155
extra_compile_args=extra_compile_args,
156+
py_limited_api=py_limited_api,
152157
)
153158

154159
if __name__ == "__main__":

0 commit comments

Comments
 (0)