Update Gobject-Introspection to 0.9.2 and add this patch that allows it to compile with Python 2.7. Fixes http://bugs.python.org/issue9259.
-- - Ariel Ben-Yehuda
diff -ru gobject-introspection-0.9.2.old/giscanner/libtoolimporter.py gobject-introspection-0.9.2/giscanner/libtoolimporter.py --- gobject-introspection-0.9.2.old/giscanner/libtoolimporter.py 2009-09-17 11:53:45.000000000 +0300 +++ gobject-introspection-0.9.2/giscanner/libtoolimporter.py 2010-07-14 16:24:54.000000000 +0300 @@ -54,10 +54,11 @@ mod.__loader__ = self return mod - @classmethod - def __enter__(cls): - sys.meta_path.append(cls) +class LibtoolContextManager(object): + def __enter__(self): + sys.meta_path.append(LibtoolImporter) - @classmethod - def __exit__(cls, type, value, traceback): - sys.meta_path.remove(cls) + def __exit__(self, type, value, traceback): + sys.meta_path.remove(LibtoolImporter) + +LibtoolContextManager = LibtoolContextManager() diff -ru gobject-introspection-0.9.2.old/giscanner/sourcescanner.py gobject-introspection-0.9.2/giscanner/sourcescanner.py --- gobject-introspection-0.9.2.old/giscanner/sourcescanner.py 2010-07-12 17:26:26.000000000 +0300 +++ gobject-introspection-0.9.2/giscanner/sourcescanner.py 2010-07-14 16:24:54.000000000 +0300 @@ -23,7 +23,7 @@ import subprocess import tempfile -from .libtoolimporter import LibtoolImporter +from .libtoolimporter import LibtoolContextManager (CSYMBOL_TYPE_INVALID, @@ -196,7 +196,7 @@ class SourceScanner(object): def __init__(self): - with LibtoolImporter: + with LibtoolContextManager: from giscanner._giscanner import SourceScanner self._scanner = SourceScanner() self._filenames = [] diff -ru gobject-introspection-0.9.2.old/giscanner/xmlwriter.py gobject-introspection-0.9.2/giscanner/xmlwriter.py --- gobject-introspection-0.9.2.old/giscanner/xmlwriter.py 2010-07-08 21:29:57.000000000 +0300 +++ gobject-introspection-0.9.2/giscanner/xmlwriter.py 2010-07-14 16:24:54.000000000 +0300 @@ -24,7 +24,7 @@ from cStringIO import StringIO from xml.sax.saxutils import escape, quoteattr -from .libtoolimporter import LibtoolImporter +from .libtoolimporter import LibtoolContextManager def _calc_attrs_length(attributes, indent, self_indent): @@ -67,7 +67,7 @@ return attr_value -with LibtoolImporter: +with LibtoolContextManager: from giscanner._giscanner import collect_attributes
-- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page