python313: add a flag to disable GIL

This commit is contained in:
natsukium 2024-03-13 23:32:38 +09:00
parent b89f66b768
commit 8837f2fef2
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53

View File

@ -60,6 +60,7 @@
, static ? stdenv.hostPlatform.isStatic
, enableFramework ? false
, noldconfigPatch ? ./. + "/${sourceVersion.major}.${sourceVersion.minor}/no-ldconfig.patch"
, enableGIL ? true
# pgo (not reproducible) + -fno-semantic-interposition
# https://docs.python.org/3/using/configure.html#cmdoption-enable-optimizations
@ -111,6 +112,7 @@ let
inherit (lib)
concatMapStringsSep
concatStringsSep
enableFeature
getDev
getLib
optionals
@ -402,6 +404,8 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
"--enable-shared"
] ++ optionals enableFramework [
"--enable-framework=${placeholder "out"}/Library/Frameworks"
] ++ optionals (pythonAtLeast "3.13") [
(enableFeature enableGIL "gil")
] ++ optionals enableOptimizations [
"--enable-optimizations"
] ++ optionals (sqlite != null) [