Merge pull request #76283 from jtojnar/python-mwa

python.pkgs.wrapPython: fix makeWrapperArgs
This commit is contained in:
worldofpeace 2019-12-26 19:21:37 -05:00 committed by GitHub
commit 4a2621da53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -81,7 +81,16 @@ wrapPythonProgramsIn() {
# Add any additional arguments provided by makeWrapperArgs
# argument to buildPythonPackage.
local -a user_args="($makeWrapperArgs)"
local -a user_args
# We need to support both the case when makeWrapperArgs
# is an array and a IFS-separated string.
# TODO: remove the string branch when __structuredAttrs are used.
if [[ "$(declare -p makeWrapperArgs)" =~ ^'declare -a makeWrapperArgs=' ]]; then
user_args=("${makeWrapperArgs[@]}")
else
user_args="($makeWrapperArgs)"
fi
local -a wrapProgramArgs=("${wrap_args[@]}" "${user_args[@]}")
wrapProgram "${wrapProgramArgs[@]}"
fi