[telepathy-salut/master] Make Python 2.5 a hard dependency

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Sep 9 08:27:54 PDT 2009


Gabble switched to Python 2.5 as even Maemo has it now.
---
 configure.ac |   32 ++++++++++----------------------
 1 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index ac880c5..08eadbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,29 +90,17 @@ AC_CHECK_PROGS([DBUS_BINDING_TOOL], [dbus-binding-tool])
 if test -z "$DBUS_BINDING_TOOL"; then
   AC_MSG_ERROR([dbus-binding-tool (from dbus-glib) is required])
 fi
-PYTHON=
-AC_CHECK_PROGS([PYTHON], [python2.3 python2.4 python2.5 python])
-if test -z "$PYTHON"; then
-  AC_MSG_ERROR([Python is required to compile this package])
-fi
 
-# Check for a python >= 2.4 with twisted to run python tests
-AC_MSG_CHECKING([for Python >= 2.4 with Twisted and XMPP protocol support])
-for TEST_PYTHON in python2.4 python2.5 python; do
-  if $TEST_PYTHON -c "from sys import version_info;
-      raise SystemExit(version_info < (2, 4, 0, 'final', 0))" \
-      >/dev/null 2>&1; then
-    if $TEST_PYTHON -c "import twisted.words.xish.domish,
-        twisted.words.protocols.jabber, twisted.internet.reactor" \
-        >/dev/null 2>&1; then
-      AC_MSG_RESULT([$TEST_PYTHON])
-      AM_CONDITIONAL([WANT_TWISTED_TESTS], true)
-      break
-    else
-      TEST_PYTHON=false
-    fi
-  fi
-done
+AM_PATH_PYTHON([2.5])
+
+# Check for a python >= 2.5 with twisted to run python tests
+AC_MSG_CHECKING([for Python with Twisted and XMPP protocol support])
+if $PYTHON -c "import twisted.words.xish.domish, twisted.words.protocols.jabber, twisted.internet.reactor" >/dev/null 2>&1; then
+    TEST_PYTHON="$PYTHON"
+else
+    TEST_PYTHON=false
+fi
+AC_MSG_RESULT([$TEST_PYTHON])
 AC_SUBST(TEST_PYTHON)
 AM_CONDITIONAL([WANT_TWISTED_TESTS], test false != "$TEST_PYTHON")
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list