This patch is broken when there are options supplied on the #! line, for
operating systems that don't support multiple options to a #! interpreter.
More specifically, if the original script does e.g. "#!/usr/bin/jython -S",
changing it to "#!/usr/bin/env /usr/bin/jython -S" will cause 'env' to see two
arguments: "/usr/bin/jython -S", and the original script name. This will not
work, since "/usr/bin/jython -S" is not a filename.
Note too that this means the -x hack for skipping the unicode stuff isn't going
to work either.
I don't know what to suggest, but for the greatest compatibility with existing
scripts and platforms, I think Jython is going to have to include a
platform-specific launcher for sys.executable, and not just on Windows. :(
|