diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index 41f2a59246d..95d1a519213 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -96,7 +96,10 @@ filterExisting() { # Syntax: wrapProgram wrapProgram() { local prog="$1" - local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped + local progBasename=$(basename $prog) + local hiddenDir=$(dirname $prog)/.$progBasename-wrapped-bin + local hidden=$hiddenDir/$progBasename + mkdir $hiddenDir mv $prog $hidden makeWrapper $hidden $prog "$@" } diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index 857f002cace..282aeca9ed1 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -26,12 +26,6 @@ wrapPythonProgramsIn() { # dont wrap EGG-INFO scripts since they are called from python if echo "$i" | grep -v EGG-INFO/scripts; then echo "wrapping \`$i'..." - sed -i "$i" -re '1 { - /^#!/!b; :r - /\\$/{N;b r} - /__future__|^ *(#.*)?$/{n;b r} - /^ *[^# ]/i import sys; sys.argv[0] = '"'$(basename "$i")'"' - }' wrapProgram "$i" \ --prefix PYTHONPATH ":" $program_PYTHONPATH \ --prefix PATH ":" $program_PATH