Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37559833
en ru br
Репозитории ALT
S:8.0.5-alt2
D:2.16.1-alt1
5.1: 2.22.2-alt2.2
4.1: 2.20.3-alt0.M41.1
4.0: 2.2.1-alt2
3.0: 2.2.1-alt1
www.altlinux.org/Changes

Другие репозитории
Upstream:2.18

Группа :: Издательство
Пакет: graphviz

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: graphviz-2.40.1-python3.patch
Скачать


diff --git a/config/config_python.py b/config/config_python.py
index b747045..2b1ac8d 100644
--- a/config/config_python.py
+++ b/config/config_python.py
@@ -1,12 +1,13 @@
+from __future__ import print_function
+
 import sys
 from distutils import sysconfig
 
 if sys.argv[1] == "archlib":
-    print sysconfig.get_python_lib(1,1)
+    print(sysconfig.get_python_lib(1,1))
 elif sys.argv[1] == "lib":
-    print sysconfig.get_python_lib(0,1)
+    print(sysconfig.get_python_lib(0,1))
 elif sys.argv[1] == "archsitelib":
-    print sysconfig.get_python_lib(1,0)
+    print(sysconfig.get_python_lib(1,0))
 elif sys.argv[1] == "sitelib":
-    print sysconfig.get_python_lib(0,0)
-
+    print(sysconfig.get_python_lib(0,0))
diff --git a/configure.ac b/configure.ac
index 51166c3..4d8c9a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1142,7 +1142,7 @@ else
     if test `$SWIG -help 2>&1 | $EGREP -c '\-python *- Generate'` = 0; then
       use_python="No (swig does not support -python option)"
     else
-      AC_CHECK_PROG(PYTHON,python,python)
+      AC_CHECK_PROGS(PYTHON,[python3 python3])
       if test "x$PYTHON" = "x"; then
         use_python="No (python not available)"
       else
@@ -1167,8 +1167,11 @@ 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
+        if test $PYTHON_VERSION_MAJOR -gt 2; then
+          PYTHON_INCLUDES="${PYTHON_INCLUDES}m"
+        fi
 #        PYTHON_LIBS="-lpython$PYTHON_VERSION_SHORT"
 	PYTHON_LIBS="-undefined dynamic_lookup"
         PYTHON_INSTALL_DIR="`$PYTHON $srcdir/config/config_python.py archsitelib`"
@@ -1548,7 +1551,7 @@ else
       if test "x$PYTHON34" = "x"; then
 	    use_python34="No (python34 is too old)"
       else
-        PYTHON34_PREFIX=`$PYTHON3 -c "import sys; print sys.prefix"`
+        PYTHON34_PREFIX=`$PYTHON3 -c "import sys; print(sys.prefix)"`
 #        PYTHON34_INCLUDES=-I$PYTHON34_PREFIX/include/python$PYTHON34_VERSION_SHORT
 # FIXME - whats the stupid "m" for?
         PYTHON34_INCLUDES=-I/usr/include/python3.4m
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin