diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index d6651f4ee..0b75e3a98 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -36,7 +36,7 @@ jobs: matrix: config: - {os: ubuntu-24.04, python: "3.12", ffmpeg: "8.0.1", extras: true} - # - {os: ubuntu-24.04, python: "pypy3.11", ffmpeg: "8.0.1"} + - {os: ubuntu-24.04, python: "pypy3.11", ffmpeg: "8.0.1"} - {os: macos-14, python: "3.11", ffmpeg: "8.0.1"} env: diff --git a/setup.py b/setup.py index 1db60b649..9be9acb27 100644 --- a/setup.py +++ b/setup.py @@ -24,9 +24,11 @@ if sys.implementation.name == "cpython": py_limited_api = True options = {"bdist_wheel": {"py_limited_api": "cp311"}} + define_macros = [("Py_LIMITED_API", 0x030B0000)] else: py_limited_api = False options = {} + define_macros = [] # Monkey-patch Cython to not overwrite embedded signatures. old_embed_signature = EmbedSignature._embed_signature @@ -148,7 +150,7 @@ def parse_cflags(raw_flags): include_dirs=[f"{IMPORT_NAME}/filter"] + extension_extra["include_dirs"], libraries=extension_extra["libraries"], library_dirs=extension_extra["library_dirs"], - define_macros=[("Py_LIMITED_API", 0x030B0000)], + define_macros=define_macros, py_limited_api=py_limited_api, ) @@ -194,7 +196,7 @@ def parse_cflags(raw_flags): libraries=extension_extra["libraries"], library_dirs=extension_extra["library_dirs"], sources=[pyx_path], - define_macros=[("Py_LIMITED_API", 0x030B0000)], + define_macros=define_macros, py_limited_api=py_limited_api, ), compiler_directives=compiler_directives,