Hello community,

here is the log from the commit of package python-nautilus for openSUSE:11.4
checked in at Fri Apr 8 23:43:55 CEST 2011.



--------
--- old-versions/11.4/all/python-nautilus/python-nautilus.changes       
2011-01-07 09:29:29.000000000 +0100
+++ 11.4/python-nautilus/python-nautilus.changes        2011-03-22 
15:37:00.000000000 +0100
@@ -1,0 +2,11 @@
+Fri Mar 22 15:27:10 CET 2011 - [email protected]
+
+- Added a patch from Adam Plumb to fix bug 676708
+
+-------------------------------------------------------------------
+Fri Mar 11 03:31:10 CET 2011 - [email protected]
+
+- Upgraded to version 0.7.2:
+  * fixes a bug that creates an error from python when importing nautilus 
+
+-------------------------------------------------------------------

Package does not exist at destination yet. Using Fallback 
old-versions/11.4/all/python-nautilus
Destination is old-versions/11.4/UPDATES/all/python-nautilus
calling whatdependson for 11.4-i586


Old:
----
  nautilus-python-0.7.0.tar.bz2

New:
----
  nautilus-python-0.7.2.tar.gz
  pygobject-capsule.patch

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

Other differences:
------------------
++++++ python-nautilus.spec ++++++
--- /var/tmp/diff_new_pack.jvRsv4/_old  2011-04-08 23:43:41.000000000 +0200
+++ /var/tmp/diff_new_pack.jvRsv4/_new  2011-04-08 23:43:41.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package python-nautilus (Version 0.7.0)
+# spec file for package python-nautilus
 #
 # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
@@ -20,13 +20,14 @@
 
 Name:           python-nautilus
 %define _name   nautilus-python
-Version:        0.7.0
-Release:        2
+Version:        0.7.2
+Release:        0.<RELEASE2>
 License:        LGPL v2 or later
 Summary:        Python bindings for Nautilus
 Group:          Development/Libraries/Python
 Url:            http://git.gnome.org/cgit/nautilus-python/
-Source:         %{_name}-%{version}.tar.bz2
+Source:         %{_name}-%{version}.tar.gz
+Patch0:         pygobject-capsule.patch
 BuildRequires:  gtk-doc
 BuildRequires:  nautilus-devel
 BuildRequires:  python-devel
@@ -56,6 +57,7 @@
 
 %prep
 %setup -q -n %{_name}-%{version}
+%patch0 -p1
 
 %build
 %configure --disable-static \

++++++ pygobject-capsule.patch ++++++
diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index d222140..69c63ee 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -48,19 +48,29 @@ np_init_pygobject(void)
     PyObject *gobject = PyImport_ImportModule("gobject");
     if (gobject != NULL)
     {
-        PyObject *mdict = PyModule_GetDict(gobject);
-        PyObject *cobject = PyDict_GetItemString(mdict, "_PyGObject_API");
-        if (PyCObject_Check(cobject))
-        {
-            _PyGObject_API = (struct _PyGObject_Functions 
*)PyCObject_AsVoidPtr(cobject);
-        }
-        else
-        {
-            PyErr_SetString(PyExc_RuntimeError,
-                            "could not find _PyGObject_API object");
-                       PyErr_Print();
-                       return FALSE;
-        }
+#ifdef Py_CAPSULE_H
+               void *capsule = PyCapsule_Import("gobject._PyGObject_API", 0);
+               if (capsule)
+               {
+                       _PyGObject_API = (struct _PyGObject_Functions *)capsule;
+               }
+#endif
+               if (!_PyGObject_API)
+               {
+                   PyObject *mdict = PyModule_GetDict(gobject);
+                   PyObject *cobject = PyDict_GetItemString(mdict, 
"_PyGObject_API");
+                   if (PyCObject_Check(cobject))
+                   {
+                       _PyGObject_API = (struct _PyGObject_Functions 
*)PyCObject_AsVoidPtr(cobject);
+                   }
+                   else
+                   {
+                       PyErr_SetString(PyExc_RuntimeError,
+                                       "could not find _PyGObject_API object");
+                               PyErr_Print();
+                               return FALSE;
+                   }
+               }
     }
     else
     {

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



Remember to have fun...

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

Reply via email to