diff --git a/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh b/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh index dd49d935bcee..d1a1b10bf520 100644 --- a/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh @@ -5,8 +5,16 @@ pypaBuildPhase() { echo "Executing pypaBuildPhase" runHook preBuild + local -a flagsArray=( + --no-isolation + --outdir dist/ + --wheel + ) + concatTo flagsArray pypaBuildFlags + echo "Creating a wheel..." - @build@/bin/pyproject-build --no-isolation --outdir dist/ --wheel $pypaBuildFlags + echoCmd 'pypa build flags' "${flagsArray[@]}" + @build@/bin/pyproject-build "${flagsArray[@]}" echo "Finished creating a wheel..." runHook postBuild diff --git a/pkgs/development/python-modules/meson-python/add-build-flags.sh b/pkgs/development/python-modules/meson-python/add-build-flags.sh index d781b1f966f6..e1b2588f07fc 100644 --- a/pkgs/development/python-modules/meson-python/add-build-flags.sh +++ b/pkgs/development/python-modules/meson-python/add-build-flags.sh @@ -1,7 +1,7 @@ mesonPythonBuildFlagsHook() { # Add all of mesonFlags to -Csetup-args for pypa builds for f in $mesonFlags; do - pypaBuildFlags+=" -Csetup-args=$f" + 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" done