Added check for pygobject >= 3.3.2

svn: r20065
This commit is contained in:
Doug Blank 2012-07-24 15:36:06 +00:00
parent d57b63ac6d
commit 868d00a67f

View File

@ -45,10 +45,10 @@ dnl We first only check for python >= 2.6
AM_PATH_PYTHON(2.6)
AC_PATH_PROG(BINSH, sh)
pygtk_require="
AC_MSG_CHECKING(Python bindings for gtk 3.3.2 (pygobject>=3.3.2))
cat > conftest.py <<EOF
try:
import pygtk
pygtk.require('2.0')
from gi.repository import Gtk
except ImportError:
pass
@ -56,22 +56,17 @@ def out(line):
f = open('conftest.out', 'w')
f.write(line)
f.close()
"
AC_MSG_CHECKING(Python bindings for gtk 2.10 (pygtk2>=2.10.0))
cat > conftest.py <<EOF
$pygtk_require
try:
import gobject
version = gobject.pygtk_version
if version >= (2,10,0):
print_version = '.'.join([[str(i) for i in version]])
gtk_ver = (Gtk.get_major_version(),
Gtk.get_minor_version(),
Gtk.get_micro_version())
if gtk_ver >= (3, 3, 2):
print_version = '.'.join([str(i) for i in gtk_ver])
out(print_version)
else:
out("NO")
except ImportError:
out("NO")
except AttributeError:
except:
out("NO")
EOF
$PYTHON conftest.py
@ -81,7 +76,7 @@ if test NO = "$has_pygtk"
then
AC_MSG_ERROR([
**** The python bindings for gtk 2.10 (pygtk2>=2.10.0) could not be found.])
**** The python bindings for pygobect 3.3.2 (pygobject>=3.3.2) could not be found.])
fi
AC_MSG_RESULT($has_pygtk)