[Distutils] Re: FW: weird problem with startup
gward at python.net
Tue May 27 21:28:48 EDT 2003
[BTW: distutils questions belong on distutils-sig at python.org]
On 27 May 2003, Paul Dubois said:
> However if one of my users has a path with a different Python in it before
> the one I specify, on some platforms (AIX and tru64 (decs) in particular)
> the end result is that "their" Python is run on my script.
That sounds like a platform oddity in handling the #! line. If some
Unix kernel doesn't handle #! lines in the standard way, there's not
much the distutils can do.
> If I put #!/usr/bin/env /path/to/python in my script, it works, but on some
> but not all platforms distutils replaces that line with the /path/to/python
> one and then it fails.
Yeah, the code that munges the #! line -- specifically, the regex that
looks for a "#!.*python" line -- has changed a bit over time. The
result is that you should *not* use "#!/usr/bin/env python" in scripts
that are to be distributed and installed by the distutils, even if it
happens to work with your particular version of Python.
Greg Ward <gward at python.net> http://www.gerg.ca/
One man's theology is another man's belly laugh.
More information about the Distutils-SIG