swift: use Python 3.12

https://hydra.nixos.org/build/299109156

Per the release notes: https://docs.python.org/3/whatsnew/3.13.html

> Remove the PyEval_ThreadsInitialized() function, deprecated in Python 3.9. Since Python 3.7, Py_Initialize() always creates the GIL: calling PyEval_InitThreads() does nothing and PyEval_ThreadsInitialized() always returns non-zero.
This commit is contained in:
Olivér Falvai
2025-06-01 10:10:49 +02:00
parent 5957df0f6a
commit 024f70f64d

View File

@@ -11,7 +11,7 @@
pkg-config,
clang,
bintools,
python3Packages,
python312Packages,
git,
fetchpatch,
fetchpatch2,
@@ -48,7 +48,8 @@ let
else
targetPlatform.darwinMinVersion;
python3 = python3Packages.python.withPackages (p: [ p.setuptools ]); # python 3.12 compat.
# Use Python 3.12 for now because Swift 5.8 depends on Python's PyEval_ThreadsInitialized(), which was removed in 3.13.
python3 = python312Packages.python.withPackages (p: [ p.setuptools ]); # python 3.12 compat.
inherit (stdenv) hostPlatform targetPlatform;