Here's the error messages:
Code:
checking for Python include path... File "<string>", line 1
import distutils.sysconfig; print distutils.sysconfig.get_python_inc();
^
SyntaxError: invalid syntax
checking Python linker flags... File "<string>", line 1
from distutils.sysconfig import *; from string import join; print join(get_config_vars('VERSION'))
^
SyntaxError: invalid syntax
File "<string>", line 1
from distutils.sysconfig import *; from string import join; print '-L' + PREFIX + '/lib', '-lpython';
^
SyntaxError: invalid syntax
and these are the corresponding lines from configure:
Code:
# Check for Python include path
# if PYTHON_INCLUDES is set, do not do anything
echo "\$PYTHON=$PYTHON"
if test $python_found = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
$as_echo_n "checking for Python include path... " >&6; }
if test -z "$PYTHON_INCLUDES"; then
python_path=`$PYTHON -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_inc();"`
if test -n "${python_path}"; then
python_path="-I$python_path"
fi
PYTHON_INCLUDES=$python_path
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_INCLUDES" >&5
$as_echo "$PYTHON_INCLUDES" >&6; }
fi
# Check for Python linker flags
# if PYTHON_LIBS is set, do not do anything
if test $python_found = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python linker flags" >&5
$as_echo_n "checking Python linker flags... " >&6; }
if test "x$PYTHON_LIBS" = "x"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
py_version=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print join(get_config_vars('VERSION'))"`
if test "x$py_version" = "xNone"; then
if test "x$PYTHON_VERSION" != "x"; then
py_version=$PYTHON_VERSION
else
py_version=`$PYTHON -c "import sys; \
print sys.version[:3]"`
fi
fi
PYTHON_LIBS=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print '-L' + PREFIX + '/lib', \
'-lpython';"`$py_version
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5
$as_echo "$PYTHON_LIBS" >&6; }
fi
I know python is finicky about whitespace so I twiddled with that, but it did nothing. This is from a proper package tarball too.