Skip to content

Commit

Permalink
Merge pull request #76283 from jtojnar/python-mwa
Browse files Browse the repository at this point in the history
python.pkgs.wrapPython: fix makeWrapperArgs
  • Loading branch information
worldofpeace authored Dec 27, 2019
2 parents 42b5c7e + b063340 commit 4a2621d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/development/interpreters/python/wrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a2621d

Please sign in to comment.