[issue27] [PATCH] Fix shebang lines for Jython on POSIX

New submission from Philip Jenvey pjenvey@underboss.org:
Jython's sys.executable is a shell script on POSIX (and .bat on Windows) and thus can't be used as a shebang line interpreter.
The following patch works around this by calling sys.executable via /usr/bin/env in shebang lines on platforms where sys.platform.startswith('java') and sys.executable's MAGIC is '#!'.
Jython on Windows is a separate issue -- Jython probably has to ship a .exe to solve the problem there. This fix doesn't apply to Windows because sys.executable's MAGIC is not '#!' there.
Marking as a higher priority because installed scripts on Jython aren't executable without this fix
Original distutils-sig discussion: http://www.nabble.com/Shebang-lines-on- Jython-td16730414.html
---------- files: jython-shebang-fix_r61342.diff messages: 60 nosy: pjenvey priority: critical status: unread title: [PATCH] Fix shebang lines for Jython on POSIX Added file: http://bugs.python.org/setuptools/file10/jython-shebang-fix_r61342.diff
_______________________________________________ Setuptools tracker setuptools@bugs.python.org http://bugs.python.org/setuptools/issue27 _______________________________________________
participants (1)
-
Philip Jenvey