Cherrypick patch for python 2.7 compatibility (patch 1; rhbz#617782)

This commit is contained in:
dmalcolm 2010-07-26 10:42:05 +00:00
parent ab736bca28
commit 3960e9f17f
2 changed files with 48 additions and 1 deletions

View File

@ -3,7 +3,7 @@
Name: gobject-introspection
Version: 0.9.2
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Introspection system for GObject-based libraries
Group: Development/Libraries
@ -13,6 +13,10 @@ URL: http://live.gnome.org/GObjectIntrospection
Source0: gobject-introspection-0.9.2.tar.gz
Patch0: 0001-girepository-Actually-verify-header-of-loaded-typeli.patch
# rhbz#617782
# Taken from http://bugzilla-attachments.gnome.org/attachment.cgi?id=166409
Patch1: py2.7-compat.patch
Obsoletes: gir-repository
BuildRequires: glib2-devel
@ -54,6 +58,7 @@ Libraries and headers for gobject-introspection
%prep
%setup -q -n gobject-introspection-0.9.2
%patch0 -p1
%patch1 -p1
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@ -96,6 +101,9 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
%{_datadir}/gtk-doc/html/gi/*
%changelog
* Mon Jul 26 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.2-5
- Cherrypick patch for python 2.7 compatibility (patch 1; rhbz#617782)
* Wed Jul 14 2010 Colin Walters <walters@verbum.org> - 0.9.2-4
- Backport patch from upstream for better errors

39
py2.7-compat.patch Normal file
View File

@ -0,0 +1,39 @@
From 7bcb292e7ff35764a02629213589f304df8b5076 Mon Sep 17 00:00:00 2001
From: Johan Dahlin <johan@gnome.org>
Date: Thu, 22 Jul 2010 14:43:02 -0300
Subject: [PATCH] [scanner] Make it compatible with python 2.y
https://bugzilla.gnome.org/show_bug.cgi?id=618562
---
giscanner/sourcescanner.py | 2 +-
giscanner/xmlwriter.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index acfc048..ae3d29d 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -196,7 +196,7 @@ class SourceSymbol(object):
class SourceScanner(object):
def __init__(self):
- with LibtoolImporter:
+ with LibtoolImporter(None, None):
from giscanner._giscanner import SourceScanner
self._scanner = SourceScanner()
self._filenames = []
diff --git a/giscanner/xmlwriter.py b/giscanner/xmlwriter.py
index 0db286b..c10bcc6 100644
--- a/giscanner/xmlwriter.py
+++ b/giscanner/xmlwriter.py
@@ -67,7 +67,7 @@ def collect_attributes(tag_name, attributes, self_indent,
return attr_value
-with LibtoolImporter:
+with LibtoolImporter(None, None):
from giscanner._giscanner import collect_attributes
--
1.7.0.4