Comment 1 for bug 57182

Revision history for this message
Wouter van Heyst (larstiq) wrote :

This seems to have change in 1.110 of codegen.py:

http://cvs.gnome.org/viewcvs/pygtk/codegen/codegen.py?r1=1.110&r2=1.111

The message is just '* codegen/codegen.py: Refactor a big chunk into a class with methods.'

The change introduces a class SourceWriter that bundles the functions that did the source writing.

A call changes from:

    write_source(p, o, prefix, FileOutput(sys.stdout, outfilename))

to

    sw = SourceWriter(p, o, prefix, FileOutput(sys.stdout, outfilename))
    sw.write()

Making corresponding changes to /var/lib/python-support/python2.4/gtk-2.0/dsextras.py lets the build continue, only to fail in:

  File "/var/lib/python-support/python2.4/gtk-2.0/dsextras.py", line 360, in generate
    Overrides(self.override),
  File "//usr/share/pygtk/2.0/codegen/override.py", line 49, in __init__
    self.handle_file(filename)
  File "//usr/share/pygtk/2.0/codegen/override.py", line 81, in handle_file
    self.__parse_override(buf, startline, filename)
  File "//usr/share/pygtk/2.0/codegen/override.py", line 130, in __parse_override
    raise RuntimeError("Function %s is being overridden more than once" % (func,))