On Mon, Jul 6, 2009 at 7:31 PM, David Aguilar<
dav...@gmail.com> wrote:
> On Mon, Jul 06, 2009 at 09:40:54AM -0500, Kumar McMillan wrote:
>> This patch would break installation within a virtualenv, which relies
>> on distutils' behavior of setting the explit path to the Python
>> interpreter (and is generally safer, imo). I'd suggest instead that
>> you make yourself a buildout recipe that creates a custom script with
>> the bin/env python shebang
>
> Thanks for the feedback.
>
> Is 'python' not in the virtualenv machine's path?
> (just curious).
it is, but if you run a script you might not want the result of what
env python tells you. For example:
/projects/my-env/bin/nosetests
would invoke bin/env python and that would probably be
/usr/local/bin/python which is not what you want. The shebang on the
script would be /projects/my-env/bin/python which is what you'd want
for the script to run in the virtualenv
Also, there is no standard about /usr/bin/env. It is not included by
default on some BSD systems, for examples. Then some systems put it
in /usr/local/bin/env, it is not very reliable as a shebang. Notice
that I haven't even brought up Windows :) That's only because
distutils does not generate scripts that run on Windows. You need to
use setuptools for that.