From 2d502a00cf5929355633a61992eb3cca11df90a5 Mon Sep 17 00:00:00 2001 From: William Ting Date: Thu, 9 Feb 2012 09:24:46 -1000 Subject: [PATCH 1/2] check python version during install and warn if incompatible --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.sh b/install.sh index b20fe68..819c0b4 100755 --- a/install.sh +++ b/install.sh @@ -91,8 +91,18 @@ while true; do esac done +# check Python version +python_version=`python -c 'import sys; print(sys.version_info[:])'` +if [[ ${python_version:1:1} -eq 2 && ${python_version:4:1} -lt 6 ]]; then + echo + echo "Incompatible Python version, please upgrade Python to v2.6+" +fi + +# check for valid options if [[ ${UID} != 0 ]] && [ ! ${local} ]; then + echo echo "Please rerun as root or use the --local option." + echo exit 1 fi From 6eed258dbf4bb62db2ccd6a6a6b748d6c84603b8 Mon Sep 17 00:00:00 2001 From: William Ting Date: Thu, 9 Feb 2012 11:03:22 -1000 Subject: [PATCH 2/2] minor doc requirements update --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index 3c0de5d..eb2f771 100644 --- a/README.rst +++ b/README.rst @@ -73,6 +73,11 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autojump. If not, see . +Requirements +============ + +Python v2.6+ or 3.0+ + Installation ============