mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-12-04 00:05:37 -05:00
Bump pygobject requisite to pygobject 3. Fixes bug #658667.
This commit is contained in:
parent
e28dd8508c
commit
4dd25f0b61
@ -1,3 +1,8 @@
|
||||
2011-09-19 Ignacio Casal Quinteiro <icq@gnome.org>
|
||||
|
||||
* configure.ac, plugins/python/glade-python.c:
|
||||
Bump pygobject requisite to pygobject 3. Fixes bug #658667.
|
||||
|
||||
2011-06-14 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||
|
||||
* gladeui/glade-project.h:
|
||||
|
||||
@ -144,10 +144,10 @@ AM_CONDITIONAL(HAVE_GTK_UNIX_PRINT, test x"$have_unix_print" = "xyes")
|
||||
dnl ================================================================
|
||||
dnl Python for optional python dev libs
|
||||
dnl ================================================================
|
||||
PYGOBJECT_REQS=2.27.0
|
||||
PYGOBJECT_REQS=2.90.4
|
||||
PYGOBJECT_REQUIRED_MAJOR=2
|
||||
PYGOBJECT_REQUIRED_MINOR=27
|
||||
PYGOBJECT_REQUIRED_MICRO=0
|
||||
PYGOBJECT_REQUIRED_MINOR=90
|
||||
PYGOBJECT_REQUIRED_MICRO=4
|
||||
|
||||
AC_ARG_ENABLE(python,
|
||||
AS_HELP_STRING([--disable-python], [disable python catalog]),
|
||||
@ -156,7 +156,7 @@ AC_ARG_ENABLE(python,
|
||||
if test x"$check_python" = x"yes"; then
|
||||
have_python=yes
|
||||
|
||||
PKG_CHECK_MODULES([PYGOBJECT],[pygobject-2.0 >= ${PYGOBJECT_REQUIRED_MAJOR}.${PYGOBJECT_REQUIRED_MINOR}.${PYGOBJECT_REQUIRED_MICRO}],[have_pygobject=yes],[have_pygobject=no])
|
||||
PKG_CHECK_MODULES([PYGOBJECT],[pygobject-3.0 >= ${PYGOBJECT_REQUIRED_MAJOR}.${PYGOBJECT_REQUIRED_MINOR}.${PYGOBJECT_REQUIRED_MICRO}],[have_pygobject=yes],[have_pygobject=no])
|
||||
|
||||
AM_CHECK_PYTHON_HEADERS(, [have_python_headers=no])
|
||||
AM_CHECK_PYTHON_LIBS(, [have_python_lib=no])
|
||||
|
||||
@ -44,29 +44,33 @@ python_init (void)
|
||||
static void
|
||||
glade_python_init_pygobject_check (gint req_major, gint req_minor, gint req_micro)
|
||||
{
|
||||
PyObject *gobject, *mdict, *version;
|
||||
int found_major, found_minor, found_micro;
|
||||
PyObject *gi, *gobject;
|
||||
|
||||
init_pygobject ();
|
||||
|
||||
gobject = PyImport_ImportModule ("gobject");
|
||||
mdict = PyModule_GetDict (gobject);
|
||||
version = PyDict_GetItemString (mdict, "pygobject_version");
|
||||
if (!version)
|
||||
/* import gobject */
|
||||
pygobject_init (req_major, req_minor, req_micro);
|
||||
if (PyErr_Occurred ())
|
||||
{
|
||||
PyErr_SetString (PyExc_ImportError, "PyGObject version too old");
|
||||
g_warning ("Error initializing Python interpreter: could not "
|
||||
"import pygobject");
|
||||
|
||||
return;
|
||||
}
|
||||
if (!PyArg_ParseTuple
|
||||
(version, "iii", &found_major, &found_minor, &found_micro))
|
||||
return;
|
||||
if (req_major != found_major || req_minor > found_minor ||
|
||||
(req_minor == found_minor && req_micro > found_micro))
|
||||
|
||||
gi = PyImport_ImportModule ("gi");
|
||||
if (gi == NULL)
|
||||
{
|
||||
PyErr_Format (PyExc_ImportError,
|
||||
"PyGObject version mismatch, %d.%d.%d is required, "
|
||||
"found %d.%d.%d.", req_major, req_minor, req_micro,
|
||||
found_major, found_minor, found_micro);
|
||||
g_warning ("Error initializing Python interpreter: could not "
|
||||
"import gi");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
gobject = PyImport_ImportModule ("gi.repository.GObject");
|
||||
if (gobject == NULL)
|
||||
{
|
||||
g_warning ("Error initializing Python interpreter: could not "
|
||||
"import gobject");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user