mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 15:43:00 +00:00
python{311,312,313}: use system libmpdec again
Override the configure check not to do a universal build. Using the system libmpdec is required to enable LTO on Darwin.
This commit is contained in:
parent
637b531dcf
commit
0d7d9280d3
@ -406,9 +406,6 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--without-ensurepip"
|
"--without-ensurepip"
|
||||||
"--with-system-expat"
|
"--with-system-expat"
|
||||||
] ++ optionals (!(stdenv.isDarwin && pythonAtLeast "3.12")) [
|
|
||||||
# ./Modules/_decimal/_decimal.c:4673:6: error: "No valid combination of CONFIG_64, CONFIG_32 and _PyHASH_BITS"
|
|
||||||
# https://hydra.nixos.org/build/248410479/nixlog/2/tail
|
|
||||||
"--with-system-libmpdec"
|
"--with-system-libmpdec"
|
||||||
] ++ optionals (openssl != null) [
|
] ++ optionals (openssl != null) [
|
||||||
"--with-openssl=${openssl.dev}"
|
"--with-openssl=${openssl.dev}"
|
||||||
@ -480,6 +477,10 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
|
|||||||
export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.isAarch64 then "uint128" else "x64"}
|
export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.isAarch64 then "uint128" else "x64"}
|
||||||
# Ensure that modern platform features are enabled on Darwin in spite of having no version suffix.
|
# Ensure that modern platform features are enabled on Darwin in spite of having no version suffix.
|
||||||
sed -E -i -e 's|Darwin/\[12\]\[0-9\]\.\*|Darwin/*|' configure
|
sed -E -i -e 's|Darwin/\[12\]\[0-9\]\.\*|Darwin/*|' configure
|
||||||
|
'' + optionalString (pythonAtLeast "3.11") ''
|
||||||
|
# Also override the auto-detection in `configure`.
|
||||||
|
substituteInPlace configure \
|
||||||
|
--replace-fail 'libmpdec_machine=universal' 'libmpdec_machine=${if stdenv.isAarch64 then "uint128" else "x64"}'
|
||||||
'' + optionalString (stdenv.isDarwin && x11Support && pythonAtLeast "3.11") ''
|
'' + optionalString (stdenv.isDarwin && x11Support && pythonAtLeast "3.11") ''
|
||||||
export TCLTK_LIBS="-L${tcl}/lib -L${tk}/lib -l${tcl.libPrefix} -l${tk.libPrefix}"
|
export TCLTK_LIBS="-L${tcl}/lib -L${tk}/lib -l${tcl.libPrefix} -l${tk.libPrefix}"
|
||||||
export TCLTK_CFLAGS="-I${tcl}/include -I${tk}/include"
|
export TCLTK_CFLAGS="-I${tcl}/include -I${tk}/include"
|
||||||
|
Loading…
Reference in New Issue
Block a user