Hello community,

here is the log from the commit of package glade for openSUSE:Factory
checked in at Mon Oct 3 20:00:04 CEST 2011.



--------
--- openSUSE:Factory/glade/glade.changes        2011-09-23 01:59:59.000000000 
+0200
+++ /mounts/work_src_done/STABLE/glade/glade.changes    2011-09-30 
10:54:48.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Sep 30 08:48:00 UTC 2011 - [email protected]
+
+- Port to pygobject 3.0:
+  + Add glade-pygobject-3.0.patch: taken from git.
+  + Change pkgconfig(pygobject-2.0) BuildRequires to
+    pkgconfig(pygobject-3.0).
+  + Add gnome-common BuildRequires and call to gnome-autogen.sh,
+    needed for the patch.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  glade-pygobject-3.0.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ glade.spec ++++++
--- /var/tmp/diff_new_pack.Kim7qF/_old  2011-10-03 19:59:59.000000000 +0200
+++ /var/tmp/diff_new_pack.Kim7qF/_new  2011-10-03 19:59:59.000000000 +0200
@@ -26,7 +26,11 @@
 Group:          Development/Tools/GUI Builders
 Url:            http://glade.gnome.org/
 Source:         
http://ftp.gnome.org/pub/GNOME/sources/glade/3.10/%{name}-%{version}.tar.bz2
+# PATCH-FIX-UPSTREAM glade-pygobject-3.0.patch [email protected] -- Port to 
pygobject 3.0
+Patch0:         glade-pygobject-3.0.patch
 BuildRequires:  fdupes
+# needed for patch0
+BuildRequires:  gnome-common
 BuildRequires:  gnome-doc-utils-devel
 BuildRequires:  gobject-introspection-devel
 BuildRequires:  intltool
@@ -34,7 +38,7 @@
 BuildRequires:  update-desktop-files
 BuildRequires:  pkgconfig(gtk+-3.0)
 BuildRequires:  pkgconfig(libxml-2.0)
-BuildRequires:  pkgconfig(pygobject-2.0)
+BuildRequires:  pkgconfig(pygobject-3.0) >= 2.90.4
 Recommends:     %{name}-lang
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -67,8 +71,11 @@
 %lang_package
 %prep
 %setup -q
+%patch0 -p1
 
 %build
+# needed for patch0
+NOCONFIGURE=1 gnome-autogen.sh
 %configure --disable-static --with-pic\
        --disable-scrollkeeper
 make %{?jobs:-j%jobs}

++++++ glade-pygobject-3.0.patch ++++++
commit 4dd25f0b6110e3a6c02e22fb491a1016f80106c9
Author: Ignacio Casal Quinteiro <[email protected]>
Date:   Mon Sep 19 16:57:05 2011 -0300

    Bump pygobject requisite to pygobject 3. Fixes bug #658667.

diff --git a/configure.ac b/configure.ac
index d24cf2f..faa003d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/plugins/python/glade-python.c b/plugins/python/glade-python.c
index 833b7de..14a2679 100644
--- a/plugins/python/glade-python.c
+++ b/plugins/python/glade-python.c
@@ -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 ();
+  /* import gobject */
+  pygobject_init (req_major, req_minor, req_micro);
+  if (PyErr_Occurred ())
+    {
+      g_warning ("Error initializing Python interpreter: could not "
+                 "import pygobject");
+
+      return;
+    }
 
-  gobject = PyImport_ImportModule ("gobject");
-  mdict = PyModule_GetDict (gobject);
-  version = PyDict_GetItemString (mdict, "pygobject_version");
-  if (!version)
+  gi = PyImport_ImportModule ("gi");
+  if (gi == NULL)
     {
-      PyErr_SetString (PyExc_ImportError, "PyGObject version too old");
+      g_warning ("Error initializing Python interpreter: could not "
+                 "import gi");
+
       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))
+
+  gobject = PyImport_ImportModule ("gi.repository.GObject");
+  if (gobject == 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 gobject");
+
       return;
     }
 }
continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to