Subject: Re: python binary
To: None <,>
From: Joachim Koenig-Baltes <>
List: tech-pkg
Date: 10/11/2005 20:33:21
Dieter Baron wrote:
 > In article <> Johnny wrote:
 > :  Mapping
 > : that idea to current pkgsrc, that would mean, e.g. for the bittornado
 > : package, we symlink /usr/pkg/bin/python2.4 to
 > : /usr/pkg/libexec/interpreters/bittornado-python, then we make the
 > : bittornado *.py scripts start with:
 > :         #! /usr/pkg/libexec/interpreters/bittornado-python
 > : This way, regardless of what other python packages you installed on 
 > the
 > : system or what your PATH looked like, bittornado would always use the
 > : python binary from the package named in its dependency list.  Also,
 > : unmanaged scripts can do whatever they want, i.e. hardcode a specific
 > : python binary, or use the well-known env PATH trick.
 >   Who creates that symlink, and what's the advantage over simply
 > making the scripts start with
 > 	#! /usr/pkg/bin/python2.4

I think that this is sufficient too. An important requirement for me
would be that the substitution will be done by INSTALL scripts so that
binary packages can be installed to a different location and the scripts
still work there (something that the python interpreter handles
gracefully by detecting from where it was started and finding its lib
directory relative to that location).

The "#!/usr/bin/env <interpreter>" has at least one advantage there in
that a user can "fix" it in his environment if he can not change the
script himself. Perhaps something we could mimic with a