m4/am-check-python-headers.m4: Python 3 wrapper for comedi
authorChristoph Schmidt-Hieber <c.schmidt-hieber@ucl.ac.uk>
Wed, 17 Aug 2011 09:26:51 +0000 (10:26 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Wed, 17 Aug 2011 09:36:24 +0000 (10:36 +0100)
Here's a small patch to make the configure script compatible with Python
3. The wrapper itself (swig/python/comedi_python_wrap.c) will have to be
generated with SWIG >= 2.0.0 for Python 3 compatibility.

m4/am-check-python-headers.m4

index 1e0f2b6372c65481c30fa5194e02bdb8302d0929..4a97740c84425c5f671d100491b9e2046f5acf1c 100644 (file)
@@ -5,8 +5,8 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
 [AC_REQUIRE([AM_PATH_PYTHON])
 AC_MSG_CHECKING(for headers required to compile python extensions)
 dnl deduce PYTHON_INCLUDES
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
 PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
 if test "$py_prefix" != "$py_exec_prefix"; then
   PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"