Skip to content

Commit faad1bb

Browse files
authored
ci: avoid Windows 3.13.4, warn (#1104)
Avoid broken 3.13.4 on Windows. It still gets pulled by Actions for now: actions/setup-python#1123 Signed-off-by: Henry Schreiner <[email protected]>
1 parent 73e44ce commit faad1bb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ jobs:
116116
with:
117117
python-version: ${{ matrix.python-version }}
118118
allow-prereleases: true
119+
# Python 3.13.4 broken on Windows
120+
check-latest: >-
121+
${{ matrix.python-version == '3.13' && runner.os == 'Windows' }}
119122
120123
- uses: astral-sh/setup-uv@v6
121124
if: matrix.python-version != 'pypy-3.8'

src/scikit_build_core/builder/builder.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,17 @@ def configure(
231231
python_include_dir = get_python_include_dir()
232232
numpy_include_dir = get_numpy_include_dir()
233233

234+
# Warning for CPython 3.13.4 Windows bug
235+
if (
236+
sys.implementation.name == "CPython"
237+
and sys.version_info[:3] == (3, 13, 4)
238+
and sys.platform.startswith("win32")
239+
and not sysconfig.get_config_var("Py_GIL_DISABLED")
240+
): # pragma: nocover
241+
logger.warning(
242+
"Python 3.13.4 on Windows is broken for building, 3.13.5 was rushed out to fix it. Use an older, newer, or free-threaded version instead."
243+
)
244+
234245
# Classic Find Python
235246
cache_config["PYTHON_EXECUTABLE"] = Path(sys.executable)
236247
cache_config["PYTHON_INCLUDE_DIR"] = python_include_dir

0 commit comments

Comments
 (0)