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! Chad
-------- 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 firstname.lastname@example.org To: email@example.com References: 3FA024D6.firstname.lastname@example.org
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 email@example.com https://lists.sourceforge.net/lists/listinfo/scons-devel
On Wed, Oct 29, 2003 at 03:17:55PM -0600, Chad Austin wrote:
Is there a way to specify the command used to load Python in a script installed via distutils? Distutils automatically adds #!<python> to the
No, not at the moment. It's not a bad idea, though; look at distutils/commands/build_scripts.py for the code to change.