mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 12:53:54 +00:00
python3.pkgs.meson-python: run hook in postConfigure
It's not uncommon for packages to modify mesonFlags/mesonFlagsArray in
e.g. preConfigure. Since the hook was previously run immediately,
these changes wouldn't have been picked up. To fix this, run the hook
after the configure phase, where we know the list of meson flags will
have been finalized.
Fixes: 70d182be3f
("python3.pkgs.meson-python: populate python build flags with $mesonFlags")
This commit is contained in:
parent
4a7eb88e55
commit
787af710c6
@ -1,6 +1,10 @@
|
||||
# Add all of mesonFlags to -Csetup-args for pypa builds
|
||||
for f in $mesonFlags; do
|
||||
pypaBuildFlags+=" -Csetup-args=$f"
|
||||
# This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html
|
||||
pipBuildFlags+=" --config-settings=setup-args=$f"
|
||||
done
|
||||
mesonPythonBuildFlagsHook() {
|
||||
# Add all of mesonFlags to -Csetup-args for pypa builds
|
||||
for f in $mesonFlags; do
|
||||
pypaBuildFlags+=" -Csetup-args=$f"
|
||||
# This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html
|
||||
pipBuildFlags+=" --config-settings=setup-args=$f"
|
||||
done
|
||||
}
|
||||
|
||||
postConfigureHooks+=(mesonPythonBuildFlagsHook)
|
||||
|
Loading…
Reference in New Issue
Block a user