At 01:33 AM 12/19/2008 -0600, Ian Bicking wrote:
Tres Seaver wrote:
I would way rather see that kind of solution than using 'env':  scripts
installed by easy_install should *not* use whatever python happens to be
found at the moment on PATH.

I agree that's necessary, but I don't think anyone has been proposing that (well, except the initial proposal). I'm guessing the script in this case could look like:

#!/bin/sh
exec "path/to/python" -c "everything that would normally be in the body of the script"

Actually, I was thinking more like:

#!/bin/sh
# standard easy_install comment lines here
""":"
exec '/path/to/python' "$0" "$@"
"""
# rest of the code here

The idea being to preserve the inspectable info that easy_install puts in the first few lines of script comments. And of course, to properly pass through sys.argv, etc. The path to sys.executable also needs to be properly escaped by the code writing the script.

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to