diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4bb59b9..d72cd5c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,13 @@ Changelog ========= +Unreleased +---------- + +- Enable thread-free wheels for Python 3.13 and 3.14. +- Enable PYPY 3.11 wheels. + + 2025.11.0 (2025-11-02) ---------------------- diff --git a/pyproject.toml b/pyproject.toml index 3769af4..f740060 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,5 +11,4 @@ build-backend = "setuptools.build_meta" # configuration below. enable = ["all"] # See https://cibuildwheel.pypa.io/en/stable/options/#build-skip -# Not sure why it was failing on PyPy 3.11. -build = "cp38-* pp310-*" +build = "cp38-* pp310-* pp311-* cp313t-* cp314t-*" diff --git a/setup.py b/setup.py index 2f6614b..647a55b 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,6 @@ +import sys +import sysconfig + from setuptools import Extension, setup from Cython.Build import cythonize @@ -11,17 +14,29 @@ # 0x030B0000 - Python 3.11 - support typed memoryviews. # 0x030C0000 - Python 3.12 - support vectorcall (performance improvement). +py_limited_api_kwargs = {} +bdist_wheel_kwargs = {} +if sys.implementation.name == "cpython" and not sysconfig.get_config_var( + "Py_GIL_DISABLED" +): + py_limited_api_kwargs = { + "define_macros": [ + # For now we are at python 3.8 as we still support 3.10. + ("Py_LIMITED_API", 0x03080000), + ], + "py_limited_api": True, + } + bdist_wheel_kwargs = {"py_limited_api": "cp38"} + setup( - ext_modules=cythonize([ - Extension( - name="raiser", - sources=["cython_test_exception_raiser/raiser.pyx"], - define_macros=[ - # For now we are at python 3.8 as we still support 3.10. - ("Py_LIMITED_API", 0x03080000), - ], - py_limited_api=True - ), - ]), - options={"bdist_wheel": {"py_limited_api": "cp38"}}, + ext_modules=cythonize( + [ + Extension( + name="raiser", + sources=["cython_test_exception_raiser/raiser.pyx"], + **py_limited_api_kwargs + ), + ] + ), + options={"bdist_wheel": {**bdist_wheel_kwargs}}, )