Problem importing codegen from desextras
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGTK |
Fix Released
|
Medium
|
|||
pygobject (Ubuntu) |
Fix Released
|
Medium
|
Ubuntu Desktop Bugs |
Bug Description
Hello,
In trying to build diacanvas2 in Edgy, I recieve the following error:
#
copying ./placementtool.py -> build/lib.
#
running build_ext
#
Traceback (most recent call last):
#
File "setup.py", line 171, in ?
#
cmdclass=
#
File "distutils/
#
File "distutils/
#
File "distutils/
#
File "distutils/
#
File "/usr/lib/
#
del help[cmd]
#
File "distutils/
#
File "distutils/
#
File "/usr/lib/
#
del help[cmd]
#
File "distutils/
#
File "distutils/
#
File "/var/lib/
#
build_
#
File "distutils/
#
File "/var/lib/
#
ext.generate()
#
File "/var/lib/
#
map(lambda x: x.generate(), self.templates)
#
File "/var/lib/
#
map(lambda x: x.generate(), self.templates)
#
File "/var/lib/
#
from codegen import register_types, write_source, FileOutput
#
ImportError: cannot import name write_source
#
make: *** [install-python2.4] Error 1
#
pbuilder: Failed autobuilding of package
Thank you.
Changed in pygobject: | |
importance: | Untriaged → Medium |
status: | Unconfirmed → Confirmed |
Changed in pygtk: | |
status: | Unknown → Fix Released |
Changed in pygtk: | |
importance: | Unknown → Medium |
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 self.override) , share/pygtk/ 2.0/codegen/ override. py", line 49, in __init__ handle_ file(filename) share/pygtk/ 2.0/codegen/ override. py", line 81, in handle_file __parse_ override( buf, startline, filename) share/pygtk/ 2.0/codegen/ override. py", line 130, in __parse_override "Function %s is being overridden more than once" % (func,))
Overrides(
File "//usr/
self.
File "//usr/
self.
File "//usr/
raise RuntimeError(