diff options
author | TingPing <tngpng@gmail.com> | 2013-04-01 07:02:48 -0300 |
---|---|---|
committer | TingPing <tngpng@gmail.com> | 2013-04-01 07:02:48 -0300 |
commit | 190a56684a8019d4a849e4adb7d367b229e7a1e6 (patch) | |
tree | 19f3f4724e7fbbff1fd5dd78e7ba70ea92071e04 | |
parent | d8409cae72977a10e33b13b9cb5f938743a74616 (diff) |
Fix detecting python3
-rw-r--r-- | configure.ac | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 196c1482..0b0fe00d 100644 --- a/configure.ac +++ b/configure.ac @@ -348,17 +348,17 @@ if test "x$python" != xno ; then else AC_MSG_CHECKING(Python version) changequote(<<, >>)dnl - PY_VER=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("VERSION")[0];'` - PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1);'` - PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc();'` - PYPLAT_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc(plat_specific=True);'` - $pythonpath -c "import sys; map(int,sys.version[:3].split('.')) >= [2,2] or sys.exit(1)" + PY_VER=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_vars("VERSION")[0]);'` + PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(standard_lib=1));'` + PY_INC=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());'` + PYPLAT_INC=`$pythonpath -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(plat_specific=True));'` changequote([, ])dnl AC_MSG_RESULT($PY_VER) + $pythonpath -c "import sys; float(sys.version[[:3]]) >= 2.2 and int(sys.version[[0]]) < 3 or sys.exit(1)" if test "$?" != "1"; then AC_MSG_CHECKING(Python compile flags) - PY_PREFIX=`$pythonpath -c 'import sys; print sys.prefix'` - PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print sys.exec_prefix'` + PY_PREFIX=`$pythonpath -c 'import sys; print(sys.prefix)'` + PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print(sys.exec_prefix)'` if test -f $PY_INC/Python.h || test -f $PYPLAT_INC/Python.h; then PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil" PY_CFLAGS="-I$PY_INC -I$PYPLAT_INC" |