python3Packages.meson-python: honor mesonFlagsArray

This commit is contained in:
Colin
2024-12-27 03:22:21 +00:00
parent 4a30ef65f2
commit 259a468bb3
3 changed files with 1 additions and 11 deletions
@@ -1,6 +1,6 @@
mesonPythonBuildFlagsHook() {
# Add all of mesonFlags to -Csetup-args for pypa builds
for f in $mesonFlags; do
for f in $mesonFlags "${mesonFlagsArray[@]}"; do
appendToVar pypaBuildFlags "-Csetup-args=$f"
# This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html
appendToVar pipBuildFlags "--config-settings=setup-args=$f"
@@ -124,11 +124,6 @@ buildPythonPackage rec {
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 64 ? 64 : NIX_BUILD_CORES))
'';
# HACK: copy mesonEmulatorHook's flags to the variable used by meson-python
postConfigure = ''
concatTo mesonFlags mesonFlagsArray
'';
preBuild = ''
ln -s ${cfg} site.cfg
'';
@@ -101,11 +101,6 @@ buildPythonPackage rec {
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 64 ? 64 : NIX_BUILD_CORES))
'';
# HACK: copy mesonEmulatorHook's flags to the variable used by meson-python
postConfigure = ''
concatTo mesonFlags mesonFlagsArray
'';
buildInputs = [
blas
lapack