tech-pkg archive

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

Re: Denying #!/usr/bin/env as a valid interpreter

On Tue, 2011-04-19 at 21:46 -0400, matthew sporleder wrote:
> On Tue, Apr 19, 2011 at 8:43 PM, George Michaelson <> 
> wrote:
> >
> > Maybe I am misreading things, but this reads to me like a proposal to
> > ignore what python people experience on *every other platform* and
> > attempt to enforce a 'NetBSD does this different' position.
> >
> > I love NetBSD, but thats a form of mental torture that I suspect few
> > python developers want to go with.
> >
> > if #!/usr/bin/env python doesn't work on NetBSD, then NetBSD has a
> > problem, not python. If the problem is which python to invoke, then I
> > think it bears musing how other Unix-like platforms deal with this.
> >
> > What I am reading here smells a lot like 'we wont fix/change netbsd'
> >
> > Please tell me I'm wrong.
> >

The reason for using "env" is so that a script can find the interpreter
under the user's $PATH - wherever it may be.

This makes sense for scripts in general, where the specifics of the
final system cannot be assumed by the author.

But with Pkgsrc we can go one better.  We know at installation time
where python is installed, and we know which version and particular
instance of python the script's dependency was on.  So fixing the path
as part of Pkgsrc installation is a win.

It doesn't mean that NetBSD is compelling anyone to change their
behaviour, its just a value add from Pkgsrc.

That said, it wouldn't be crazy to support a symlink from "python" to
PYTHON_VERSION_DEFAULT for the benefit of scripts outside Pkgsrc.  Maybe
as a separate package...

Home | Main Index | Thread Index | Old Index