Commit c8d73f5e by Steven Bird

removed code that attempted to guess where the system python installation is,in…

removed code that attempted to guess where the system python installation is,in an attempt to make installation more generic

svn/trunk@8490
parent e81fc7db
...@@ -8,29 +8,21 @@ ...@@ -8,29 +8,21 @@
TMP=/tmp/nltk-installer/ TMP=/tmp/nltk-installer/
cd $TMP cd $TMP
# test for python version MINPYVERMAJOR=2
#first see if python from the default install is there MINPYVERMINOR=4
if [ -e /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python ] PYVER=`python -V 2>&1 | sed 's/Python \([0-9]\.[0-9]\).*/\1/'`
PYMAJOR=`echo $PYVER | sed 's/\([0-9]\)\.\([0-9]\)/\1/'`
PYMINOR=`echo $PYVER | sed 's/\([0-9]\)\.\([0-9]\)/\2/'`
# if [[ ( "$PYMAJOR" -ge "$MINPYVERMAJOR" ) \ permits Python 3
if [[ ( "$PYMAJOR" -eq "$MINPYVERMAJOR" && "$PYMINOR" -ge "$MINPYVERMINOR" ) ]]
then then
/usr/bin/sudo /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python ./setup.py install /usr/bin/sudo python ./setup.py install
else else
MINPYVERMAJOR=2 exit -1
MINPYVERMINOR=4
PYVER=`python -V 2>&1 | sed 's/Python \([0-9]\.[0-9]\).*/\1/'`
PYMAJOR=`echo $PYVER | sed 's/\([0-9]\)\.\([0-9]\)/\1/'`
PYMINOR=`echo $PYVER | sed 's/\([0-9]\)\.\([0-9]\)/\2/'`
if [[ ( "$PYMAJOR" -ge "$MINPYVERMAJOR" ) \
|| ( "$PYMAJOR" -eq "$MINPYVERMAJOR" && "$PYMINOR" -ge "$MINPYVERMINOR" ) ]]
then
/usr/bin/sudo python ./setup.py install
else
exit -1
fi
fi fi
/usr/bin/sudo python ./setup.py install
# Clean up after ourselves by deleting /tmp/nltk-installer? # Clean up after ourselves by deleting /tmp/nltk-installer?
# rm -rf $TMP # rm -rf $TMP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment