Skip to content

Commit 6f6f544

Browse files
committed
BLD/WHL: declare Python 3 wheels as abi3-compliant
1 parent ef5eb91 commit 6f6f544

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

extension/wrapper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// keep in sync with setup.py setup(options=...)
2+
#define Py_LIMITED_API 0x030800f0
3+
14
#define PY_SSIZE_T_CLEAN
25
#include <Python.h>
36
#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"cp38"}} if sys.version_info >= (3, 8) else {},
9294
)

0 commit comments

Comments
 (0)