On 23 December 2016 at 10:58, Craig Sanders via luv-main <
[email protected]> wrote:

> On Fri, Dec 23, 2016 at 08:11:15AM +1100, Sean Crosby wrote:
> > I've taken to using /usr/bin/env a bit more because of the max length
> > limit in shebang lines. We store newer versions of Ruby, Python etc
> > on a separate filesystem, where there are many versions of these
> > directories, and they are hidden down quite far in the dirtree. So we
> > regularly hit the max shebang length limit of 128 characters.
>
> that's one of the things that symlinks are for.
>
> e.g. I have python2.6, 2.7, 3.1, 3.2, 3.4, and 3.5 all installed in
> /usr/bin, with symlinks python & python2 pointing to 2.7, and python3
> pointing to 3.5
>

All well and good if you're root....


>
> python scripts have either a specific versioned binary name in the #!
> line or just #!/usr/bin/python or #!/usr/bin/python2 for the latest
> python 2.x or #!/usr/bin/python3 for the latest python 3.x. at some
> point in the future, python3 will become the default python and
> /usr/bin/python will point to it.
>

Yes but with the software our students use, they repackage python into a
self contained directory, under the version of the software

e.g.

/foo/bar/v1.1/external/python/bin/python
/foo/bar/v1.2/external/python/bin/python

Even though the python versions might be the same, when you set up your
environment to be for v1.1 of the package or v1.2 (which changes
LD_LIBRARY_PATH, PATH etc), the python version/modules change location.
Hence why /usr/bin/env python is great.

Sean
_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

Reply via email to