Skip to content

Commit c8dbad8

Browse files
Release 1.1.6
- 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 e8417c4 commit c8dbad8

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.github/workflows/wheels.yml

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ python -m pytest
371371

372372
## Changelog
373373

374+
* Version 1.1.6: Added abi3 wheel support for smaller release size. (2025-12-12)
374375
* Version 1.1.5: Fixed PEP 561 compliance (py.typed). Fixed ruff linting in CI. (2025-12-12)
375376
* Version 1.1.4: Added support for Python 3.14 and Windows. Improved CI with PyPI trusted publishing. (2025-12-12)
376377
* Version 1.1.3: Minor tweaks. Support for Python 3.13. Now requires Python 3.9+. (2024-08-27)

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 = "icegrams"
7-
version = "1.1.5"
7+
version = "1.1.6"
88
description = "Trigram statistics for Icelandic"
99
authors = [{ name = "Miðeind ehf.", email = "mideind@mideind.is" }]
1010
maintainers = [{ name = "Miðeind ehf.", email = "mideind@mideind.is" }]

src/icegrams/trie_build.py

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

115+
# Use the Python stable ABI (abi3) for CPython, allowing a single wheel
116+
# to work across multiple Python versions (3.9+). PyPy doesn't support abi3.
117+
py_limited_api = "cp39" if IMPLEMENTATION == "CPython" else False
118+
115119
ffibuilder.set_source(
116120
"icegrams._trie",
117121
# trie.cpp is written in C++ but must export a pure C interface.
@@ -120,6 +124,7 @@
120124
source_extension=".cpp",
121125
sources=["src/icegrams/trie.cpp"],
122126
extra_compile_args=extra_compile_args,
127+
py_limited_api=py_limited_api,
123128
)
124129

125130
ffibuilder.cdef(declarations)

0 commit comments

Comments
 (0)