depot/third_party/nixpkgs/pkgs/development/python-modules/meson-python/add-build-flags.sh
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

10 lines
384 B
Bash

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)