Subject: Re: Installing symlink from /usr/pkg/bin/python to preferred version...
To: Michal Pasternak <michal@pasternak.w.lub.pl>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-pkg
Date: 01/23/2004 00:30:49
--FZIkiClxIZ9JeWSb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Jan 22, 2004 at 01:23:37PM +0100, Michal Pasternak wrote:
| 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).
|=20
| You can use PYTHON_PATCH_SCRIPTS (lang/python/application.mk) in pkgsrc
| Makefiles.
How does this help my own local scripts that I don't install as part
of pkgsrc?
In short, it doesn't.
| > 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).
|=20
| 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).=20
|=20
| When installed, it doesn't allow me to change the version I choosed dur=
ing
| "compile" time (I must have pkgsrc installed).
|=20
| So, I don't think it's worth to import that Makefile to pkgsrc. It does=
n't
| fix anything, really.
Of course it does; see above.
I could potentially have a bunch of python programs that have
#!/usr/bin/env python
in them. These are ~/bin, which is shared amongst many systems.
I don't see why I have to edit those scripts depending upon which
python package a particular pkgsrc-using system has installed.=20
That is _lame_.
| 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.
|=20
| Check Debian's "alternatives" system to see one of possible solutions.
I really don't care how the problem is solved, except that it should
be intrinsic to pkgsrc and not something that I have to rely upon the
local sysadmin to setup in /usr/pkg/bin/python as a symlink to
whichever version that pkgsrc has decided to install by default.
--FZIkiClxIZ9JeWSb
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFAD9CJpBhtmn8zJHIRAlXnAKC39+3wCRp8DMznkl239kv9+ob9qACfdXmm
/D/qGPVt0Nwm224+FTfWrLs=
=5gcI
-----END PGP SIGNATURE-----
--FZIkiClxIZ9JeWSb--