[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Choose a good version of python even when "which python...
Update of /home/minion/cvsroot/src/minion
In directory moria.mit.edu:/tmp/cvs-serv10126
Modified Files:
Makefile
Log Message:
Choose a good version of python even when "which python" is too old
Index: Makefile
===================================================================
RCS file: /home/minion/cvsroot/src/minion/Makefile,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- Makefile 10 Nov 2003 04:58:07 -0000 1.53
+++ Makefile 20 Nov 2003 04:02:30 -0000 1.54
@@ -24,12 +24,15 @@
for n in $(PYTHON_CANDIDATES) ; do \
if [ 'x' = "x$$PYTHON" ]; then \
if [ -x "`which $$n 2>&1`" ]; then \
- PYTHON=$$n; \
- fi; \
+ if [ 'x' != "`$$n -V 2>&1 | grep 'Python [23456789]'`x" ]; then\
+ PYTHON=$$n; \
+ fi; \
fi; \
+ fi; \
done; \
if [ 'x' = "x$$PYTHON" ]; then \
- echo "ERROR: couldn't find any of $(PYTHON_CANDIDATES) in PATH"; \
+ echo "ERROR: couldn't find Python 2 or later on PATH as any of ";\
+ echo " $(PYTHON_CANDIDATES) in PATH"; \
echo " Please install python in your path, or set the PYTHON"; \
echo ' environment variable'; \
exit; \