Skip to content

Commit

Permalink
Only build with Cython alpha on the free-threaded build
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou committed Jan 23, 2025
1 parent 42e13da commit d1e22ca
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packaging/pep517_backend/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

import os
import sysconfig
import typing as t
from contextlib import contextmanager, nullcontext, suppress
from functools import partial
Expand Down Expand Up @@ -371,10 +372,12 @@ def get_requires_for_build_wheel(
stacklevel=999,
)

c_ext_build_deps = [] if is_pure_python_build else [
'Cython == 3.1.0a1; python_version >= "3.13"',
'Cython ~= 3.0.0; python_version <= "3.12"',
]
if is_pure_python_build:
c_ext_build_deps = []
elif sysconfig.get_config_var("Py_GIL_DISABLED"):
c_ext_build_deps = ['Cython == 3.1.0a1']
else:
c_ext_build_deps = ['Cython ~= 3.0.0']

return _setuptools_get_requires_for_build_wheel(
config_settings=config_settings,
Expand Down

0 comments on commit d1e22ca

Please sign in to comment.