Subject: Re: Installing symlink from /usr/pkg/bin/python to preferred version...
To: Luke Mewburn <lukem@NetBSD.org>
From: Michal Pasternak <michal@pasternak.w.lub.pl>
List: tech-pkg
Date: 01/22/2004 13:23:37
Luke Mewburn [Fri, Jan 23, 2004 at 12:04:12AM +1100]:
> An annoying side effect of the way that we support multiple versions
> of python is that "/usr/pkg/bin/python" doesn't exist, so scripts
> can't use the usual
> 	#!/usr/bin/env python
> trick to startup.  It's a hassle to have to edit your scripts to
> contain "python2p3" (or whatever).

You can use PYTHON_PATCH_SCRIPTS (lang/python/application.mk) in pkgsrc
Makefiles.

> I have implemented a "meta package" in lang/Makefile which installs a
> symlink from /usr/pkg/bin/python to ${PYTHONBIN}.
> I've attached the files (to go into lang/python).

It won't work as a binary package (except I want the Python version that
build machine uses, which might not be exactly the one). 

When installed, it doesn't allow me to change the version I choosed during
"compile" time (I must have pkgsrc installed).

So, I don't think it's worth to import that Makefile to pkgsrc. It doesn't
fix anything, really.

Such functionality (provide one, common name for one or more different
versions of single package) should be provided by some lower layer of
pkgsrc, in a generalised way, available for all packages.

Check Debian's "alternatives" system to see one of possible solutions.