- 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
This commit is contained in:
Colin Walters 2010-07-07 14:24:41 +00:00
parent 856273f813
commit c4cde4a361
5 changed files with 20 additions and 143 deletions

View File

@ -1 +1 @@
pygobject-2.21.1.tar.bz2
pygobject-2.21.4.tar.bz2

View File

@ -1,35 +0,0 @@
From 8a577bcbbeca38f94363e8313410b8a5499de975 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
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

View File

@ -1,82 +0,0 @@
From 23fc0f615d87994acafd9d39e92dd92b587fc2eb Mon Sep 17 00:00:00 2001
From: Simon van der Linden <svdlinden@src.gnome.org>
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

View File

@ -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 <walters@verbum.org> - 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 <walters@verbum.org> - 2.21.1-9
- Readd my patch to not blow up mysteriously
Resolves: #596392

View File

@ -1 +1 @@
c12eef0cd6725dc7245c3db78ef85d2d pygobject-2.21.1.tar.bz2
fae9b01b939621ae211810652cd86726 pygobject-2.21.4.tar.bz2