Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "reynir"
version = "3.7.0"
version = "3.7.1"
description = "A natural language parser for Icelandic"
authors = [{ name = "Miðeind ehf.", email = "mideind@mideind.is" }]
maintainers = [{ name = "Miðeind ehf.", email = "mideind@mideind.is" }]
Expand Down
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@
All package metadata is defined in pyproject.toml.
"""

import platform

from setuptools import setup

options = {}
if platform.python_implementation() == "CPython":
# Tag CPython wheels with the stable ABI (e.g. cp310-abi3), so that a
# single wheel serves all CPython versions >= 3.10. The extension
# module itself is compiled with Py_LIMITED_API via the py_limited_api
# flag in eparser_build.py; this option makes the *wheel tag* reflect
# that. Not applicable to PyPy, which has no stable ABI.
options = {"bdist_wheel": {"py_limited_api": "cp310"}}

# The cffi_modules and zip_safe settings are not yet supported in pyproject.toml
# and must be defined here.
setup(
zip_safe=True,
cffi_modules=["src/reynir/eparser_build.py:ffibuilder"],
options=options,
)
6 changes: 5 additions & 1 deletion src/reynir/eparser_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@

# Use the Python stable ABI (abi3) for CPython, allowing a single wheel
# to work across multiple Python versions (3.9+). PyPy doesn't support abi3.
py_limited_api = "cp39" if IMPLEMENTATION == "CPython" else False
# Compile the extension against the stable ABI (Py_LIMITED_API) on
# CPython, producing an _eparser.abi3.so module usable on any CPython
# version >= 3.10. The matching cp310-abi3 wheel tag is set via the
# bdist_wheel py_limited_api option in setup.py.
py_limited_api = "cp310" if IMPLEMENTATION == "CPython" else False

ffibuilder.cdef(declarations + callbacks)

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading