mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
python311: fix _ctypes build on darwin
In Python 3.12+, the -DUSING_APPLE_OS_LIBFFI=1 macro is always set:
25590eb5de
Fixes #390348
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
@@ -434,6 +434,9 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
||||
for path in /usr /sw /opt /pkg; do
|
||||
substituteInPlace ./setup.py --replace-warn $path /no-such-path
|
||||
done
|
||||
'' + optionalString (stdenv.hostPlatform.isDarwin && pythonOlder "3.12") ''
|
||||
# Fix _ctypes module compilation
|
||||
export NIX_CFLAGS_COMPILE+=" -DUSING_APPLE_OS_LIBFFI=1"
|
||||
'' + optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Override the auto-detection in setup.py, which assumes a universal build
|
||||
export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.hostPlatform.isAarch64 then "uint128" else "x64"}
|
||||
|
||||
Reference in New Issue
Block a user