Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Sep 2000 13:36:29 -0500
From:      Steve Price <sprice@hiwaay.net>
To:        tg@freebsd.org
Cc:        ports@freebsd.org
Subject:   'make index' slightly borked
Message-ID:  <20000904133629.D266@bonsai.hiwaay.net>

next in thread | raw e-mail | index | archive | help
I just noticed while doing a 'make index' that I got a couple of
'python: not found' messages.  The culprits turned out to be the
math/numpy and misc/py-distutils ports.  Make sure the python port
is not installed or at the very least not in your PATH and type
'make describe' in either one of these ports and you'll see what
I mean.

One way of fixing this would be to use something like the following
patch.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/misc/py-distutils/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	2000/09/04 12:28:11	1.5
+++ Makefile	2000/09/04 18:06:41
@@ -19,7 +19,7 @@
 
 PLIST_SUB=	PYVERSION="python${PYVERSION}"
 
-PYVERSION!=	python -c 'import string, sys; print string.split(sys.version)[0][:3]' || echo "1.5"
+PYVERSION!=	(which python > /dev/null && python -c 'import string, sys; print string.split(sys.version)[0][:3]') || echo "1.5"
 
 do-build:
 	@(cd ${WRKSRC}; python setup.py build)

However, this doesn't work very well besides being hackish.  The port
really needs to be fixing up PLIST when we are absolutely positive that
python will be around - like in the do-build target.  Though not very
pretty here is one way of going about it.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/misc/py-distutils/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	2000/09/04 12:28:11	1.5
+++ Makefile	2000/09/04 18:25:32
@@ -17,11 +17,10 @@
 BUILD_DEPENDS=	python:${PORTSDIR}/lang/python
 RUN_DEPENDS=	python:${PORTSDIR}/lang/python
 
-PLIST_SUB=	PYVERSION="python${PYVERSION}"
+PLIST=		${WRKDIR}/PLIST
 
-PYVERSION!=	python -c 'import string, sys; print string.split(sys.version)[0][:3]' || echo "1.5"
-
 do-build:
+	@${SED} -e "s/%%PYVERSION%%/python`python -c 'import string, sys; print string.split(sys.version)[0][:3]' || echo '1.5'`/g" ${PKGDIR}/PLIST > ${WRKDIR}/PLIST
 	@(cd ${WRKSRC}; python setup.py build)
 
 do-install:

The math/numpy port will be a bit trickier to fix and is left as an
exercise for the reader. :)

-steve


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000904133629.D266>