From c4cde4a36151e848d83b7778a2a104391cc323ec Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 7 Jul 2010 14:24:41 +0000 Subject: [PATCH] - Update to latest upstream - Drop upstreamed patches - Drop libtool overriding; was not commented and seems fine without - Drop --enable-thread, it's default now - Drop --enable-pygi, it's default now - Drop clean section, no longer needed in F-14 - Drop python-sitearch copy&paste, no longer needed in F-14 --- .cvsignore | 2 +- Clear-error-if-we-failed-import.patch | 35 -------- ...i_import-if-pygi-support-is-disabled.patch | 82 ------------------- pygobject2.spec | 42 ++++------ sources | 2 +- 5 files changed, 20 insertions(+), 143 deletions(-) delete mode 100644 Clear-error-if-we-failed-import.patch delete mode 100644 Don-t-raise-an-error-in-_pygi_import-if-pygi-support-is-disabled.patch diff --git a/.cvsignore b/.cvsignore index f8759c6..e8dc8cf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pygobject-2.21.1.tar.bz2 +pygobject-2.21.4.tar.bz2 diff --git a/Clear-error-if-we-failed-import.patch b/Clear-error-if-we-failed-import.patch deleted file mode 100644 index e3e0013..0000000 --- a/Clear-error-if-we-failed-import.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8a577bcbbeca38f94363e8313410b8a5499de975 Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Wed, 5 May 2010 13:54:27 -0400 -Subject: [PATCH] [pygi] Clear error if we failed the import - -Otherwise we leave the exception set which causes bizarre problems -later in unrelated code. - -https://bugzilla.redhat.com/show_bug.cgi?id=569885 - -https://bugzilla.gnome.org/show_bug.cgi?id=617796 ---- - gobject/pygi-external.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/gobject/pygi-external.h b/gobject/pygi-external.h -index aec2f25..b369dca 100644 ---- a/gobject/pygi-external.h -+++ b/gobject/pygi-external.h -@@ -27,11 +27,13 @@ _pygi_import (void) - - module = PyImport_ImportModule("gi"); - if (module == NULL) { -+ PyErr_Clear(); - return -1; - } - - api = PyObject_GetAttrString(module, "_API"); - if (api == NULL) { -+ PyErr_Clear(); - Py_DECREF(module); - return -1; - } --- -1.7.0.1 \ No newline at end of file diff --git a/Don-t-raise-an-error-in-_pygi_import-if-pygi-support-is-disabled.patch b/Don-t-raise-an-error-in-_pygi_import-if-pygi-support-is-disabled.patch deleted file mode 100644 index 09fb262..0000000 --- a/Don-t-raise-an-error-in-_pygi_import-if-pygi-support-is-disabled.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 23fc0f615d87994acafd9d39e92dd92b587fc2eb Mon Sep 17 00:00:00 2001 -From: Simon van der Linden -Date: Thu, 21 Jan 2010 17:30:51 +0100 -Subject: [PATCH] Don't raise an error in _pygi_import if pygi support is disabled - -http://bugzilla.gnome.org/show_bug.cgi?id=607674 ---- - gobject/pygboxed.c | 6 +----- - gobject/pygi-external.h | 1 - - gobject/pygobject.c | 6 +----- - gobject/pygpointer.c | 6 +----- - 4 files changed, 3 insertions(+), 16 deletions(-) - -diff --git a/gobject/pygboxed.c b/gobject/pygboxed.c -index 1233b01..87695eb 100644 ---- a/gobject/pygboxed.c -+++ b/gobject/pygboxed.c -@@ -185,12 +185,8 @@ pyg_boxed_new(GType boxed_type, gpointer boxed, gboolean copy_boxed, - - tp = g_type_get_qdata(boxed_type, pygboxed_type_key); - -- if (tp == NULL) { -+ if (!tp) - tp = (PyTypeObject *)pygi_type_import_by_g_type(boxed_type); -- if (tp == NULL) { -- PyErr_Clear(); -- } -- } - - if (!tp) - tp = (PyTypeObject *)&PyGBoxed_Type; /* fallback */ -diff --git a/gobject/pygi-external.h b/gobject/pygi-external.h -index e0d11c2..aec2f25 100644 ---- a/gobject/pygi-external.h -+++ b/gobject/pygi-external.h -@@ -49,7 +49,6 @@ _pygi_import (void) - - return 0; - #else -- PyErr_SetString(PyExc_ImportError, "PyGI support not enabled"); - return -1; - #endif /* ENABLE_PYGI */ - } -diff --git a/gobject/pygobject.c b/gobject/pygobject.c -index 222280b..f8d7dd1 100644 ---- a/gobject/pygobject.c -+++ b/gobject/pygobject.c -@@ -874,12 +874,8 @@ pygobject_lookup_class(GType gtype) - if (py_type == NULL) { - py_type = g_type_get_qdata(gtype, pyginterface_type_key); - -- if (py_type == NULL) { -+ if (py_type == NULL) - py_type = (PyTypeObject *)pygi_type_import_by_g_type(gtype); -- if (py_type == NULL) { -- PyErr_Clear(); -- } -- } - - if (py_type == NULL) { - py_type = pygobject_new_with_interfaces(gtype); -diff --git a/gobject/pygpointer.c b/gobject/pygpointer.c -index 449b80c..5f6417f 100644 ---- a/gobject/pygpointer.c -+++ b/gobject/pygpointer.c -@@ -159,12 +159,8 @@ pyg_pointer_new(GType pointer_type, gpointer pointer) - - tp = g_type_get_qdata(pointer_type, pygpointer_class_key); - -- if (tp == NULL) { -+ if (!tp) - tp = (PyTypeObject *)pygi_type_import_by_g_type(pointer_type); -- if (tp == NULL) { -- PyErr_Clear(); -- } -- } - - if (!tp) - tp = (PyTypeObject *)&PyGPointer_Type; /* fallback */ --- -1.6.6.1 - diff --git a/pygobject2.spec b/pygobject2.spec index 92047c7..71ce276 100644 --- a/pygobject2.spec +++ b/pygobject2.spec @@ -1,5 +1,3 @@ -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - # Last updated for version 2.21.0 %define glib2_version 2.22.4 %define gobject_introspection_version 0.6.3 @@ -14,17 +12,14 @@ ### Abstract ### Name: pygobject2 -Version: 2.21.1 -Release: 9%{?dist} +Version: 2.21.4 +Release: 2%{?dist} License: LGPLv2+ Group: Development/Languages Summary: Python bindings for GObject URL: http://www.pygtk.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root #VCS: git:git://git.gnome.org/pygobject -Patch1: Don-t-raise-an-error-in-_pygi_import-if-pygi-support-is-disabled.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=617796 -Patch2: Clear-error-if-we-failed-import.patch Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.21/pygobject-%{version}.tar.bz2 ### Build Dependencies ### @@ -72,25 +67,19 @@ This package contains documentation files for %{name}. %prep %setup -q -n pygobject-%{version} -%patch1 -p1 -%patch2 -p1 %build -%configure --enable-thread --enable-pygi -export tagname=CC -make LIBTOOL=/usr/bin/libtool +%configure +make %install rm -rf $RPM_BUILD_ROOT -export tagname=CC -make LIBTOOL=/usr/bin/libtool DESTDIR=$RPM_BUILD_ROOT install -find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f +make DESTDIR=$RPM_BUILD_ROOT install +find $RPM_BUILD_ROOT -name '*.la' -delete +find $RPM_BUILD_ROOT -name '*.a' -delete rm examples/Makefile* -%clean -rm -fr $RPM_BUILD_ROOT - %files %defattr(644, root, root, 755) %doc AUTHORS NEWS README @@ -98,14 +87,9 @@ rm -fr $RPM_BUILD_ROOT %{_libdir}/libpyglib-2.0-python.so* %dir %{python_sitearch}/gtk-2.0 -%{python_sitearch}/gtk-2.0/dsextras.* +%{python_sitearch}/gtk-2.0/* %{python_sitearch}/pygtk.* -%defattr(755, root, root, 755) -%{python_sitearch}/gtk-2.0/gio -%{python_sitearch}/gtk-2.0/glib -%{python_sitearch}/gtk-2.0/gobject - %files codegen %defattr(755, root, root, 755) %{_bindir}/pygobject-codegen-2.0 @@ -128,6 +112,16 @@ rm -fr $RPM_BUILD_ROOT %{_datadir}/pygobject/xsl %changelog +* Wed Jul 7 2010 Colin Walters - 2.21.4-1 +- Update to latest upstream +- Drop upstreamed patches +- Drop libtool overriding; was not commented and seems fine + without +- Drop --enable-thread, it's default now +- Drop --enable-pygi, it's default now +- Drop clean section, no longer needed in F-14 +- Drop python-sitearch copy&paste, no longer needed in F-14 + * Thu May 27 2010 Colin Walters - 2.21.1-9 - Readd my patch to not blow up mysteriously Resolves: #596392 diff --git a/sources b/sources index e517673..85ad7ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c12eef0cd6725dc7245c3db78ef85d2d pygobject-2.21.1.tar.bz2 +fae9b01b939621ae211810652cd86726 pygobject-2.21.4.tar.bz2