diff options
author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2023-04-24 12:22:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 12:22:58 +0200 |
commit | 7282a9202bf101b13991e2163c8cabdae3ba62ba (patch) | |
tree | c1355464f3579257dd8845e4aa19f4edc1b7687a | |
parent | 12fe73d2ed9c10ee5fa9b2e9fe00a2a27fe77e22 (diff) | |
download | psutil-7282a9202bf101b13991e2163c8cabdae3ba62ba.tar.gz |
Run `abi3audit` on produced abi3 wheels (#2247)
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
-rw-r--r-- | .github/workflows/build.yml | 1 | ||||
-rwxr-xr-x | setup.py | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d735a0ce..6c3ab484 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,3 +135,4 @@ jobs: - run: | python scripts/internal/print_hashes.py wheelhouse/ pipx run twine check --strict wheelhouse/* + pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl @@ -61,7 +61,9 @@ from _compat import which # NOQA PYPY = '__pypy__' in sys.builtin_module_names PY36_PLUS = sys.version_info[:2] >= (3, 6) +PY37_PLUS = sys.version_info[:2] >= (3, 7) CP36_PLUS = PY36_PLUS and sys.implementation.name == "cpython" +CP37_PLUS = PY37_PLUS and sys.implementation.name == "cpython" macros = [] if POSIX: @@ -112,9 +114,14 @@ macros.append(('PSUTIL_VERSION', int(VERSION.replace('.', '')))) # Py_LIMITED_API lets us create a single wheel which works with multiple # python versions, including unreleased ones. -if bdist_wheel and CP36_PLUS and (MACOS or LINUX or WINDOWS): +if bdist_wheel and CP36_PLUS and (MACOS or LINUX): py_limited_api = {"py_limited_api": True} macros.append(('Py_LIMITED_API', '0x03060000')) +elif bdist_wheel and CP37_PLUS and WINDOWS: + # PyErr_SetFromWindowsErr / PyErr_SetFromWindowsErrWithFilename are + # part of the stable API/ABI starting with CPython 3.7 + py_limited_api = {"py_limited_api": True} + macros.append(('Py_LIMITED_API', '0x03070000')) else: py_limited_api = {} |