mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 08:08:00 +02:00
React badly to python <= 2.5; let the user set LE_PYTHON
This commit is contained in:
+7
-4
@@ -42,14 +42,13 @@ ExperimentalBootstrap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
if which python2 > /dev/null ; then
|
if which python2 > /dev/null ; then
|
||||||
export LE_PYTHON=python2
|
export LE_PYTHON=${LE_PYTHON:-python2}
|
||||||
elif which python2.7 > /dev/null ; then
|
elif which python2.7 > /dev/null ; then
|
||||||
export LE_PYTHON=python2.7
|
export LE_PYTHON=${LE_PYTHON:-python2.7}
|
||||||
elif which python > /dev/null ; then
|
elif which python > /dev/null ; then
|
||||||
export LE_PYTHON=python
|
export LE_PYTHON=${LE_PYTHON:-python}
|
||||||
else
|
else
|
||||||
echo "Cannot find any Pythons... please install one!"
|
echo "Cannot find any Pythons... please install one!"
|
||||||
fi
|
fi
|
||||||
@@ -57,6 +56,10 @@ DeterminePythonVersion() {
|
|||||||
PYVER=`$LE_PYTHON --version 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'`
|
PYVER=`$LE_PYTHON --version 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'`
|
||||||
if [ $PYVER -eq 26 ] ; then
|
if [ $PYVER -eq 26 ] ; then
|
||||||
ExperimentalBootstrap "Python 2.6" true
|
ExperimentalBootstrap "Python 2.6" true
|
||||||
|
elif [ $PYVER -lt 26 ] ; then
|
||||||
|
echo "You have an ancient version of Python entombed in your operating system..."
|
||||||
|
echo "This isn't going to work."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user