]> granicus.if.org Git - graphviz/commitdiff
use Python 3 compatible syntax in autotools check
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 24 May 2020 16:55:56 +0000 (09:55 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 24 May 2020 16:55:56 +0000 (09:55 -0700)
We expect `python` to be a symlink to Python 3, not Python 2 but it does not
hurt to use syntax compatible with both. Other Python checks in configure.ac
were already using compatible syntax.

Fixes #1626.

configure.ac

index 8775da43e17da4bfd85180c016b516b192704ebc..cf42504732737d87e74d84770dcdf8b64c48b8f1 100644 (file)
@@ -1270,7 +1270,7 @@ else
       if test "x$PYTHON" = "x"; then
        use_python="No (python is too old)"
       else
-        PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
+        PYTHON_PREFIX=`$PYTHON -c "import sys; print(sys.prefix)"`
         PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION_SHORT
 #        PYTHON_LIBS="-lpython$PYTHON_VERSION_SHORT"
        PYTHON_LIBS="-undefined dynamic_lookup"