python3.pkgs.meson-python: populate python build flags with $mesonFlags

This commit is contained in:
Doron Behar
2023-07-13 16:13:09 +03:00
committed by Martin Weinelt
parent 4c772b984f
commit 70d182be3f
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
# 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

View File

@@ -39,6 +39,9 @@ buildPythonPackage rec {
] ++ lib.optionals (pythonOlder "3.10") [
typing-extensions
];
setupHooks = [
./add-build-flags.sh
];
# Ugly work-around. Drop ninja dependency.
# We already have ninja, but it comes without METADATA.