diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index 282aeca9ed1c..dda9f4877f67 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -26,6 +26,7 @@ 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" -e "/^#\!/a import sys; sys.argv[0] = '$(basename $i)'" wrapProgram "$i" \ --prefix PYTHONPATH ":" $program_PYTHONPATH \ --prefix PATH ":" $program_PATH