From a1b589b7c0c4a539cca7a57b2bab281fa3a289f7 Mon Sep 17 00:00:00 2001 From: "Graydon, Tracy" Date: Fri, 30 Nov 2012 18:18:54 -0800 Subject: [PATCH] TINF-96: add gobject-introspection; dep for connman-test --- giscanner/gdumpparser.py | 4 +- giscanner/girparser.py | 8 +- giscanner/xmlwriter.py | 2 - packaging/gobject-introspection.spec | 214 +---------------------------------- 4 files changed, 10 insertions(+), 218 deletions(-) diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py index c0b13f4..1d335d8 100644 --- a/giscanner/gdumpparser.py +++ b/giscanner/gdumpparser.py @@ -23,7 +23,7 @@ import sys import tempfile import shutil import subprocess -from xml.etree.cElementTree import parse +from lxml import etree from . import ast from . import message @@ -168,7 +168,7 @@ blob containing data gleaned from GObject's primitive introspection.""" except subprocess.CalledProcessError, e: # Clean up temporaries raise SystemExit(e) - return parse(out_path) + return etree.parse(out_path) finally: if not utils.have_debug_flag('save-temps'): shutil.rmtree(self._binary.tmpdir) diff --git a/giscanner/girparser.py b/giscanner/girparser.py index a59037d..4db1e2b 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -19,9 +19,7 @@ # import os - -from xml.etree.cElementTree import parse - +from lxml import etree from . import ast from .girwriter import COMPATIBLE_GIR_VERSION @@ -57,7 +55,7 @@ class GIRParser(object): def parse(self, filename): filename = os.path.abspath(filename) self._filename_stack.append(filename) - tree = parse(filename) + tree = etree.parse(filename) self.parse_tree(tree) self._filename_stack.pop() @@ -91,7 +89,7 @@ class GIRParser(object): return self._pkgconfig_packages def get_doc(self): - return parse(self._filename) + return etree.parse(self._filename) # Private diff --git a/giscanner/xmlwriter.py b/giscanner/xmlwriter.py index fb34adf..ed827da 100755 --- a/giscanner/xmlwriter.py +++ b/giscanner/xmlwriter.py @@ -21,11 +21,9 @@ from __future__ import with_statement import os - from contextlib import contextmanager from cStringIO import StringIO from xml.sax.saxutils import escape, quoteattr - from .libtoolimporter import LibtoolImporter diff --git a/packaging/gobject-introspection.spec b/packaging/gobject-introspection.spec index 2ae868c..1da5cbe 100644 --- a/packaging/gobject-introspection.spec +++ b/packaging/gobject-introspection.spec @@ -1,19 +1,14 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - Name: gobject-introspection Version: 1.32.1 Release: 1%{?dist} Summary: Introspection system for GObject-based libraries - -Group: Development/Libraries +Group: Development/Libraries License: GPLv2+, LGPLv2+, MIT URL: http://live.gnome.org/GObjectIntrospection -#VCS: git:git://git.gnome.org/gobject-introspection -Source0: http://download.gnome.org/sources/gobject-introspection/1.32/%{name}-%{version}.tar.xz - +Source0: %{name}-%{version}.tar.xz Obsoletes: gir-repository - +BuildRequires: python-lxml +BuildRequires: python-xml BuildRequires: glib2-devel BuildRequires: python-devel >= 2.5 BuildRequires: gettext @@ -31,7 +26,7 @@ BuildRequires: freetype-devel # Bootstrap requirements BuildRequires: gnome-common BuildRequires: intltool -BuildRequires: gtk-doc +#BuildRequires: gtk-doc %description GObject Introspection can scan C header and source files in order to @@ -92,202 +87,3 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';' %{_mandir}/man1/*.gz %dir %{_datadir}/gtk-doc/html/gi %{_datadir}/gtk-doc/html/gi/* - -%changelog -* Fri Apr 20 2012 Kalev Lember - 1.32.1-1 -- Update to 1.32.1 - -* Tue Mar 27 2012 Matthias Clasen 0 1.32.0-1 -- Update to 1.32.0 - -* Wed Mar 21 2012 Matthias Clasen 0 1.31.22-1 -- Update to 1.31.22 - -* Mon Mar 5 2012 Matthias Clasen 0 1.31.20-1 -- Update to 1.31.20 - -* Thu Jan 19 2012 Matthias Clasen 0 1.31.10-1 -- Update to 1.31.10 - -* Fri Jan 13 2012 Fedora Release Engineering - 1.31.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Dec 20 2011 Matthias Clasen - 1.31.6-1 -- Update to 1.31.6 - -* Mon Dec 05 2011 Karsten Hopp 1.31.0-2 -- add fix for PPC failure, bugzilla 749604 - -* Wed Nov 16 2011 Colin Walters - 1.31.0-2 -- -devel package requires libtool - https://bugzilla.redhat.com/show_bug.cgi?id=613466 - -* Wed Nov 2 2011 Matthias Clasen - 1.31.0-1 -- Update to 1.31.0 - -* Mon Sep 26 2011 Ray - 1.30.0-1 -- Update to 1.30.0 - -* Tue Sep 20 2011 Matthias Clasen - 1.30.0-1 -- Update to 1.30.0 - -* Fri Jun 17 2011 Tomas Bzatek - 1.29.0-1 -- Update to 1.29.0 - -* Thu Apr 21 2011 John (J5) Palmieri - 0.10.8-1 -- Update to 0.10.8 - -* Mon Apr 4 2011 Matthias Clasen - 0.10.7-1 -- Update to 0.10.7 - -* Fri Mar 25 2011 Owen Taylor - 0.10.6-1 -- New upstream release to fix missing cairo typelib - -* Fri Mar 25 2011 Colin Walters - 0.10.5-1 -- New upstream release, fixes cairo.gir - Necessary to avoid gnome-shell having a cairo-devel dependency. -- Also add cairo-gobject-devel dependency, since we really want - the cairo typelib to link to GObject, since anyone using - introspection has it anyways. - -* Thu Mar 10 2011 Colin Walters - 0.10.4-1 -- Update to 0.10.4 - -* Wed Feb 23 2011 Colin Walters - 0.10.3-1 -- Update to 0.10.3 - -* Tue Feb 08 2011 Fedora Release Engineering - 0.10.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Feb 7 2011 Colin Walters - 0.10.2-1 -- Update to 0.10.2 - -* Wed Jan 12 2011 Colin Walters - 0.10.1-1 -- Update to 0.10.1 - -* Mon Jan 10 2011 Owen Taylor - 0.10.0-1 -- Update to 0.10.0 - -* Thu Sep 30 2010 Colin Walters - 0.9.10-1 -- Update to 0.9.10 - -* Thu Sep 30 2010 Colin Walters - 0.9.9-1 -- Update to 0.9.9 - -* Wed Sep 29 2010 Matthias Clasen - 0.9.8-1 -- Update to 0.9.8 - -* Tue Sep 28 2010 Colin Walters - 0.9.7-1 -- Update to 0.9.7 - -* Tue Sep 21 2010 Owen Taylor - 0.9.6-1 -- Update to 0.9.6 - -* Thu Sep 2 2010 Colin Walters - 0.9.3-6 -- Strip out test libraries; they're gone in upstream git, and - create a dependency on cairo (which requires libX11, which makes - server operating system builders freak out). - -* Tue Aug 3 2010 Matthias Clasen - 0.9.3-1 -- Update to 0.9.3 - -* Mon Jul 26 2010 David Malcolm - 0.9.2-5 -- Cherrypick patch for python 2.7 compatibility (patch 1; rhbz#617782) - -* Wed Jul 14 2010 Colin Walters - 0.9.2-4 -- Backport patch from upstream for better errors - -* Mon Jul 12 2010 Colin Walters - 0.9.2-1 -- New upstream (unstable series) release; requires rebuilds - -* Tue Jun 29 2010 Colin Walters - 0.9.0-1.4.20100629gitf0599b0a -- Add gtk-doc to files - -* Tue Jun 29 2010 Colin Walters -- Switch to git snapshot; I forgot to enable gtk-doc in the last - tarball. - -* Tue Jun 29 2010 Colin Walters - 0.9.0-1 -- New upstream development release -- Update to support building git snapshot directly - -* Thu Jun 24 2010 Colin Walters - 0.6.14-3 -- rebuild to pick up new glib changes - -* Thu Jun 10 2010 Colin Walters - 0.6.14-2 -- Obsolete gir-repository{,-devel} - -* Tue Jun 8 2010 Matthias Clasen - 0.6.14-1 -- Update to 0.6.14 - -* Wed May 24 2010 Colin Walters - 0.6.12-1 -- Update to latest upstream release 0.6.12 - -* Thu Mar 25 2010 Colin Walters - 0.6.9-3 -- Move python library back into /usr/lib/gobject-introspection. I put - it there upstream for a reason, namely that apps need to avoid - polluting the global Python site-packages with bits of their internals. - It's not a public API. - - Possibly resolves bug #569885 - -* Wed Mar 24 2010 Adam Miller - 0.6.9-2 -- Added newly owned files (gobject-introspection-1.0 directory) - -* Wed Mar 24 2010 Adam Miller - 0.6.9-1 -- Update to latest upstream release 0.6.9 - -* Thu Mar 11 2010 Colin Walters - 0.6.8-0.3.20100311git2cc97351 -- rebuilt - -* Thu Mar 11 2010 Colin Walters -- New upstream snapshot -- rm unneeded rm - -* Thu Jan 28 2010 Adam Miller - 0.6.8-0.1.20100128git -- Update to new git snapshot -- Fix Version tag to comply with correct naming use with alphatag - -* Thu Jan 15 2010 Adam Miller - 0.6.7.20100115git-1 -- Update to git snapshot for rawhide - -* Tue Dec 22 2009 Matthias Clasen - 0.6.7-1 -- Update to 0.6.7 - -* Fri Sep 11 2009 Colin Walters - 0.6.5-1 -- New upstream -- Drop libtool dep - -* Fri Aug 28 2009 Colin Walters - 0.6.4-2 -- Add dep on libtool temporarily - -* Mon Aug 26 2009 Colin Walters - 0.6.4-1 -- New upstream 0.6.4 -- Drop upstreamed build fix patch - -* Fri Jul 24 2009 Fedora Release Engineering - 0.6.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Mon Jul 6 2009 Peter Robinson - 0.6.3-4 -- Add upstream patch to fix a build crash - -* Thu Jul 2 2009 Peter Robinson - 0.6.3-3 -- Add -ggdb temporarily so it compiles on ppc64 - -* Thu Jul 2 2009 Peter Robinson - 0.6.3-2 -- Add the new source file - -* Thu Jul 2 2009 Peter Robinson - 0.6.3-1 -- Update to 0.6.3 - -* Mon Jun 1 2009 Dan Williams - 0.6.2-1 -- Update to 0.6.2 - -* Tue Feb 24 2009 Fedora Release Engineering - 0.6.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Dec 11 2008 Colin Walters - 0.6.1-1 -- Update to 0.6.1 - -* Fri Oct 31 2008 Colin Walters - 0.6.0-1 -- Create spec goo -- 2.7.4