[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What should we do now?



On Tue, Oct 23, 2001 at 01:27:22PM +1000, Anthony Towns wrote:
> On Mon, Oct 22, 2001 at 08:32:33AM -0700, Neil Schemenauer wrote:
> > Anthony Towns wrote:
> > > On Mon, Oct 22, 2001 at 10:13:17AM +0200, Gregor Hoffleit wrote:
> > > > Say, you would install 2.1.2 in /usr/local. 
> > > How about we just say "Don't install other versions of python in
> > > /usr/local" ?
> > Please no.  Making this work properly is not hard.  
> 
> Again, _why_ does this matter? Who does this? Is it even remotely common?
> That people would even consider installing another version of python in
> /usr/local surely just points to a problem with the Debian packaging, no?

The most common reason for installing python in /usr/local is to play with
the latest and greatest bleeding edge. Typicaly you want to play without
everything else installed on you system suddenly using and relying on your
experiment. I know that you can rename the executable to something else, but
what does a basic "make install" do?

> The problems with using "#!/usr/bin/python1.5" is threefold: first, it
> makes dependencies that much more complicated: *all* python scripts have
> to depend on versioned modules in every way, ie "Depends: python1.5-base,
> python1.5-glade, python1.5-gtk, python1.5-numeric", second it means *all*

How else are you going to ensure that a script that relies on version
1.5 of python runs using that version, when you also have python2.1-base
installed, and python-base has made the default /usr/bin/python point at
/usr/bin/python2.1? If it genuinely needs python1.5 and related modules,
there is no other way to specify the dependancies either.

I think you are mistaking this as a suggestion to always refer to a
particular version of python. This is not what is being proposed... the
#!/usr/bin/pythonX.Y" is only for scripts that explicitly rely on a
particular version of Python. For version independant or "default version"
dependant scripts, "#!/usr/bin/python" is recomended.

The real debate here is "#!/usr/bin/python[X.Y]" vs "#!/usr/bin/env
python[X.Y]" (note the X.Y is optional) for Debian scripts. From hearing the
arguments for and against, I agree with Gregor; "#!/usr/bin/python[X.Y]" is
safer and should be recommended, but packagers might have legitimate reasons
for using "#!/usr/bin/env python[X.Y]".

ie, leave it up to the package mantainers, but make them aware of the pro's
and con's.

> python executables need to be modified at the source level for every
> python upgrade, and finally it makes Debian veer away from upstream
> standards for python scripts.

This is the strongest argument for /usr/bin/env... 

> If you install new versions of standard tools in /usr/local you have
> to be careful. This applies to a hypothetical /usr/local/bin/dpkg, or
[...]

but remember why /usr/bin/env was made the upstream standard; it was because
Python is not a "standard tool", and hence could be located in
/usr/local/bin, ~/bin, or anywhere. The env trick meant scripts could run
without modification on any system, regardless of where Python was
installed. In a Debian package environment, we have the benefit of a
garenteed location for python, and a dependancy system to ensure it's
actualy there.

-- 
----------------------------------------------------------------------
ABO: finger abo@minkirri.apana.org.au for more info, including pgp key
----------------------------------------------------------------------



Reply to: