diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-06-14 17:34:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-06-15 13:11:44 (GMT) |
commit | 98a54c576eec4feda606156ae591854311d9cd0e (patch) | |
tree | b84864b6b256b00ce2c8bc138e1f1e0b45a5f14c /configure | |
parent | 3333536dfd3066f10183cbeb5a80faef232982fa (diff) | |
download | Doxygen-98a54c576eec4feda606156ae591854311d9cd0e.zip Doxygen-98a54c576eec4feda606156ae591854311d9cd0e.tar.gz Doxygen-98a54c576eec4feda606156ae591854311d9cd0e.tar.bz2 |
Added build support for Python3+ and Python2.6+
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -594,9 +594,10 @@ fi # - check for python ---------------------------------------------------------- +python_version=0 printf " Checking for python... " if test "$f_python" = NO; then - python_names="python2 python" + python_names="python3 python2 python" python_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" python_prog=NO python_found=NO @@ -604,26 +605,33 @@ if test "$f_python" = NO; then for j in $python_dirs; do if test -x "$j/$i"; then python_found=YES - if test `$j/$i -c "import sys; print sys.version_info[0]"` = 2; then - python_prog="$j/$i" + if test `$j/$i -c "import sys; print(sys.version_info[0])"` = 3; then + python_prog="$j/$i"; + python_version=`$j/$i -c "import platform; print(platform.python_version())"`; break 2 + elif test `$j/$i -c "import sys; print(sys.version_info[0])"` = 2; then + if test `$j/$i -c "import sys; print(sys.version_info[1])"` -ge 6; then + python_prog="$j/$i"; + python_version=`$j/$i -c "import platform; print(platform.python_version())"`; + break 2 + fi fi fi done done - f_python="$python_prog" + f_python="$python_prog" fi if test "$f_python" = NO; then if test "$python_found" = YES; then - echo "version should be python 2." + echo "version should be python 2.6 or higher." else echo "not found!"; fi echo exit 2 fi -echo "using $f_python"; +echo "using $f_python (version $python_version)"; # - check for perl ------------------------------------------------------------ |