[libpeas] Fix checking the PyGObject version at runtime
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Fix checking the PyGObject version at runtime
- Date: Tue, 29 Jun 2010 17:04:19 +0000 (UTC)
commit 586dcc538d164d5d2d59c46c8c80c8d28efd0bdc
Author: Garrett Regier <alias301 gmail com>
Date: Tue Jun 29 09:17:34 2010 -0700
Fix checking the PyGObject version at runtime
configure.ac | 10 +++++++++-
loaders/python/peas-plugin-loader-python.c | 4 +++-
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7ca7f98..92375e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,7 +166,12 @@ dnl Python
dnl ================================================================
PYTHON_REQUIRED=2.5.2
-PYGOBJECT_REQUIRED=2.20
+
+dnl Used by the Python loader to check the PyGObject version at runtime
+PYGOBJECT_MAJOR_VERSION=2
+PYGOBJECT_MINOR_VERSION=20
+PYGOBJECT_MICRO_VERSION=0
+PYGOBJECT_REQUIRED=$PYGOBJECT_MAJOR_VERSION.$PYGOBJECT_MINOR_VERSION.$PYGOBJECT_MICRO_VERSION
AC_ARG_ENABLE(python,
AS_HELP_STRING([--enable-python],[Enable Python support]),
@@ -218,6 +223,9 @@ if test "$found_python" = "yes"; then
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
+ AC_DEFINE_UNQUOTED(PYGOBJECT_MAJOR_VERSION,[$PYGOBJECT_MAJOR_VERSION], [PyGObject major version.])
+ AC_DEFINE_UNQUOTED(PYGOBJECT_MINOR_VERSION,[$PYGOBJECT_MINOR_VERSION], [PyGObject minor version.])
+ AC_DEFINE_UNQUOTED(PYGOBJECT_MICRO_VERSION,[$PYGOBJECT_MICRO_VERSION], [PyGObject micro version.])
AC_DEFINE(ENABLE_PYTHON,1,[Define to compile with Python support])
fi
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 5d9258d..f5c5bbd 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -427,7 +427,9 @@ peas_plugin_loader_python_add_module_path (PeasPluginLoaderPython *self,
static void
peas_init_pygobject (void)
{
- init_pygobject_check (2, 11, 5); /* FIXME: get from config */
+ init_pygobject_check (PYGOBJECT_MAJOR_VERSION,
+ PYGOBJECT_MINOR_VERSION,
+ PYGOBJECT_MICRO_VERSION);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]