[Distutils] [Fwd: Re: [scons-devel] specifying python interpreter for #! in scons.py?]

Chad Austin aegisk at vrac.iastate.edu
Wed Oct 29 16:17:55 EST 2003

I'm not on the distutils-sig mailing list, so please CC me on any responses.

Is there a way to specify the command used to load Python in a script installed 
via distutils?  Distutils automatically adds #!<python> to the top of installed 
scripts, where <python> is an absolute path to the Python interpreter used to 
execute setup.py.  I'd like to be able to specify the #! command because I use a 
single installation of SCons on platforms with the 'python' command in different 
locations.  Is this possible?

Thanks much!

-------- Original Message --------
Subject: Re: [scons-devel] specifying python interpreter for #! in scons.py?
Date: Wed, 29 Oct 2003 15:47:06 -0500
From: Stefan Seefeld <seefeld at sympatico.ca>
To: scons-devel at lists.sourceforge.net
References: <3FA024D6.6080805 at vrac.iastate.edu>

Chad Austin wrote:
> Is there a way, using distutils, to specify the command used to load 
> Python in scons.py?  We would like a single SCons installation on a 
> networked filesystem so that all machines (Linux and SGI) can use it.  
> However, Python is available in /usr/bin on Linux and /usr/freeware/bin 
> on IRIX.  On install, distutils adds #!<python> to the top of scons.py, 
> where <python> is the version of Python used to install.  Anyone know of 
> a way to tell distutils to put "#!/usr/bin/env python" at the top of the 
> file?

there is none (the relevant distutils command is 'build_scripts', in
case you want to have a look).

I'd suggest you address this issue on the distutils ML. Specifically,
I'd prefer distutils to (optionally) not touch the first line, and thus
giving the user the chance to put whatever he wants there. That'd offer
even more flexibility than the default '#!/usr/bin/env python'...


This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
scons-devel mailing list
scons-devel at lists.sourceforge.net

More information about the Distutils-SIG mailing list