Subject: Installing symlink from /usr/pkg/bin/python to preferred version...
To: None <tech-pkg@NetBSD.org>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-pkg
Date: 01/23/2004 00:04:12
--pnDjx0H/VpusRTEI
Content-Type: multipart/mixed; boundary="QHhm1I6mwQR20oIa"
Content-Disposition: inline


--QHhm1I6mwQR20oIa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi all.

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).

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).

Are they any objections to this?


Cheers,
Luke.

--QHhm1I6mwQR20oIa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=Makefile

# $NetBSD$
#

DISTNAME=	python
CATEGORIES=	lang
MASTER_SITES=	# empty
DISTFILES=	# empty

MAINTAINER=	lukem@NetBSD.org
HOMEPAGE=	http://www.python.org/
COMMENT=	The "meta-package" for Python

EXTRACT_ONLY=	# empty
NO_CHECKSUM=	yes
NO_CONFIGURE=	yes
NO_BUILD=	yes

# Ensure version of python the user asks for is selected, even
# if it's not yet installed.
_PYTHON_VERSION=${PYTHON_VERSION_DEFAULT}

do-install:
	@echo "Linking ${PREFIX}/bin/python to ${PYTHONBIN}"
	@rm -f ${PREFIX}/bin/python
	@ln -s ${PYTHONBIN} ${PREFIX}/bin/python

.include "../../lang/python/pyversion.mk"
.include "../../mk/bsd.pkg.mk"

--QHhm1I6mwQR20oIa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=DESCR

Python is an interpreted, interactive, object-oriented
programming language that combines remarkable power with
very clear syntax. For an introduction to programming in
Python you are referred to the Python Tutorial. The
Python Library Reference documents built-in and standard
types, constants, functions and modules. Finally, the
Python Reference Manual describes the syntax and semantics
of the core language in (perhaps too) much detail.

Python's basic power can be extended with your own modules
written in C or C++. On most systems such modules may be
dynamically loaded. Python is also adaptable as an exten-
sion language for existing applications. See the internal
documentation for hints.

This package provides easy installation of the preferred
version of python (selected with PYTHON_VERSION_DEFAULT)
and installs a symbolic link from ${PKGBASE}/bin/python
to that version.

--QHhm1I6mwQR20oIa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=PLIST

@comment $NetBSD$
bin/python

--QHhm1I6mwQR20oIa--

--pnDjx0H/VpusRTEI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAD8pMpBhtmn8zJHIRArUzAKCJD5yvYjv+PuSwZCUNIuAeXA/7PQCfYzLM
49n6qm817QolJ3suZI6ELcM=
=0agX
-----END PGP SIGNATURE-----

--pnDjx0H/VpusRTEI--