Skip to content

Commit 4dfe747

Browse files
committed
BLD: use the CPython Limited C API, and hence the Stable ABI
This will build an `abi3` wheel per platform, which can be used for multiple (with-GIL) Python interpreter versions.
1 parent f8ac486 commit 4dfe747

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

meson.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ project(
33
'c', 'cython',
44
version: '1.10.0.dev0',
55
license: 'MIT',
6-
meson_version: '>= 1.1.0',
6+
meson_version: '>= 1.5.0',
77
default_options: [
88
'buildtype=debugoptimized',
99
'b_ndebug=if-release',
1010
'c_std=c17',
11+
# We default to false here (so produce wheels like cp314), and can opt into
12+
# producing abi3 wheels. The setting in pyproject.toml is
13+
# `limited-api=true`, but this default will ensure it is opt-in:
14+
'python.allow_limited_api=false',
1115
],
1216
)
1317

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ homepage = "https://github.com/PyWavelets/pywt"
5555
source = "https://github.com/PyWavelets/pywt"
5656
documentation = "https://pywavelets.readthedocs.io/"
5757

58+
[tool.meson-python]
59+
limited-api = true
60+
5861
[tool.ruff]
5962
line-length = 88
6063
target-version = 'py310'

pywt/_extensions/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ foreach pyx_file: pyx_files
106106
py.extension_module(pyx_file[0],
107107
[cython_gen.process(pyx_file[1])],
108108
c_args : c_args,
109+
limited_api: '3.12',
109110
include_directories : 'c',
110111
dependencies : [np_dep, cy_deps],
111112
link_with : libc_wt,

0 commit comments

Comments
 (0)