Skip to content

Commit f0292cf

Browse files
committed
BLD/WHL: declare cp3 wheels as abi3-compliants
1 parent ef5eb91 commit f0292cf

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ jobs:
117117
steps:
118118
- uses: actions/checkout@v4
119119
- name: Build wheels python 3.7 - 3.13
120-
uses: pypa/cibuildwheel@v2.23.2
120+
uses: pypa/cibuildwheel@v3.4.0
121121
env:
122122
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*"
123123
CIBW_BUILD_VERBOSITY: 0
124124
CIBW_SKIP: '*-musllinux_*'
125125

126126
- name: Build wheels python 3.14
127-
uses: pypa/cibuildwheel@v2.23.2
127+
uses: pypa/cibuildwheel@v3.4.0
128128
env:
129129
CIBW_BUILD: "cp314-*"
130130
CIBW_BUILD_VERBOSITY: 0

extension/wrapper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#ifndef
2+
// keep in sync with setup.py setup(options=...)
3+
#define Py_LIMITED_API 0x030700f0
4+
#endif
5+
16
#define PY_SSIZE_T_CLEAN
27
#include <Python.h>
38
#include "SGP4.h"

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,6 @@
8989
package_data = {'sgp4': ['SGP4-VER.TLE', 'sample*', 'tcppver.out']},
9090
provides = ['sgp4'],
9191
ext_modules = ext_modules,
92+
# keep in sync with wrapper.cpp Py_LIMITED_API
93+
options={"bdist_wheel": {"py_limited_api": f"cp37"}} if sys.version_info >= (3, 7) else {},
9294
)

0 commit comments

Comments
 (0)