Permalink
Browse files

Added build support for Python3+ and Python2.6+

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Jun 14, 2014
1 parent 3333536 commit 98a54c576eec4feda606156ae591854311d9cd0e
Showing with 262 additions and 246 deletions.
  1. +14 −6 configure
  2. +1 −0 doc/install.doc
  3. +68 −67 doc/translator.py
  4. +164 −164 src/configgen.py
  5. +3 −3 src/lang_cfg.py
  6. +6 −6 src/languages.py
  7. +6 −0 src/portable_c.c
@@ -594,36 +594,44 @@ 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
for i in $python_names; do
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 ------------------------------------------------------------
@@ -556,6 +556,7 @@ open-source tools:
<li>GNU bison version 2.5 (Linux) and 2.3 (MacOSX)
<li>GNU make version 3.81
<li>Perl version 5.12
<li>Python verion 2.7 and 3.4
<li>TeX Live 2009 (or later)
</ul>
Oops, something went wrong.

0 comments on commit 98a54c5

Please sign in to comment.