Skip to content

Commit 12cb307

Browse files
setup.py: removed special casing of python>=3.13 with py_limited_api.
Current swig now generates ok code with py_limited_api and python>=3.13, so we don't need to force non-py_limited_api.
1 parent 3346b73 commit 12cb307

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

setup.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@
159159
160160
PYMUPDF_SETUP_PY_LIMITED_API
161161
If not '0', we build for current Python's stable ABI.
162-
163-
However if unset and we are on Python-3.13 or later, we do
164-
not build for the stable ABI because as of 2025-03-04 SWIG
165-
generates incorrect stable ABI code with Python-3.13 - see:
166-
https://github.com/swig/swig/issues/3059
167162
168163
PYMUPDF_SETUP_URL_WHEEL
169164
If set, we use an existing wheel instead of building a new wheel.
@@ -236,11 +231,7 @@
236231
PYMUPDF_SETUP_PY_LIMITED_API = os.environ.get('PYMUPDF_SETUP_PY_LIMITED_API')
237232
assert PYMUPDF_SETUP_PY_LIMITED_API in (None, '', '0', '1'), \
238233
f'Should be "", "0", "1" or undefined: {PYMUPDF_SETUP_PY_LIMITED_API=}.'
239-
if PYMUPDF_SETUP_PY_LIMITED_API is None and python_version_tuple >= (3, 13):
240-
log(f'Not defaulting to Python limited api because {platform.python_version_tuple()=}.')
241-
g_py_limited_api = False
242-
else:
243-
g_py_limited_api = (PYMUPDF_SETUP_PY_LIMITED_API != '0')
234+
g_py_limited_api = (PYMUPDF_SETUP_PY_LIMITED_API != '0')
244235

245236
PYMUPDF_SETUP_URL_WHEEL = os.environ.get('PYMUPDF_SETUP_URL_WHEEL')
246237
log(f'{PYMUPDF_SETUP_URL_WHEEL=}')

0 commit comments

Comments
 (0)