Skip to content

Commit 831a30a

Browse files
committed
test ABI3
1 parent 349e687 commit 831a30a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
3737
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
3838
env:
39-
# Skips pypy and musllinux for now.
40-
CIBW_SKIP: "pp* cp36-* cp37-* cp38-* *-musllinux*"
39+
CIBW_SKIP: "*-musllinux*"
40+
CIBW_BUILD: "cp311-* cp314-*"
4141
CIBW_ARCHS: ${{ matrix.arch }}
4242
CIBW_BUILD_FRONTEND: build
4343
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28

setup.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
rootpath = os.path.abspath(os.path.dirname(__file__))
1515

1616

17+
DEFINE_MACROS = [
18+
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"),
19+
# 0x030B0000 -> 3.11
20+
("Py_LIMITED_API", "0x030B0000"),
21+
("CYTHON_LIMITED_API", None),
22+
]
23+
1724
def read(*parts):
1825
return open(os.path.join(rootpath, *parts)).read()
1926

@@ -49,9 +56,15 @@ def build_extensions(self):
4956
]
5057

5158
config = {
52-
"ext_modules": [Extension("gsw._gsw_ufuncs", ufunc_src_list)],
59+
"ext_modules": [
60+
Extension(
61+
"gsw._gsw_ufuncs",
62+
ufunc_src_list,
63+
define_macros=DEFINE_MACROS,
64+
py_limited_api=True)],
5365
"include_dirs": [os.path.join(rootpath, "src", "c_gsw")],
5466
"cmdclass": {"build_ext": build_ext},
67+
"options": {"bdist_wheel": {"py_limited_api": "cp311"}},
5568
}
5669

5770
setup(**config)

0 commit comments

Comments
 (0)