On Thu, Mar 03, 2011 at 09:11:40PM -0500, Barry Warsaw wrote:
> On Mar 03, 2011, at 02:17 PM, David Malcolm wrote:
>
> >On a related note, we have a number of scripts packaged across the
> >distributions with a shebang line that reads:
> > #!/usr/bin/env python
> >which AIUI follows upstream recommendations.
>
> Actually, I think this is *not* a good idea for distro provided scripts. For
> any Python scripts released by the distro, you know exactly which Python it
> should run on, so it's better to hard code it. That way, if someone installs
> Python from source, or installs an experimental version of a new distro
> Python, it won't break their system. Yes, this has happened to me. Also,
> note that distutils/setuptools/distribute rewrite the shebang line when they
> install scripts.
>
> >There was a proposal to change these when packaging them to hardcode the
> >specific python binary:
> >
> >
https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
> >on the grounds that a packaged system script is expecting (and has been
> >tested against) a specific python build.
> >
> >That proposal has not yet been carried out. Ideally if we did this,
> >we'd implement it as a postprocessing phase within "rpmbuild", rather
> >than manually patching hundreds of files.
> >
> >Note that this would only cover shebang lines at the tops of scripts.
>
> JFDI!
>
> FWIW, a quick grep reveals about two dozen such scripts in /usr/bin on
> Ubuntu. We should fix these. ;)
>