Module codegen.createdefs is not installed

Bug #75606 reported by Michael Bienia
4
Affects Status Importance Assigned to Milestone
PyGTK
Fix Released
Medium
pygtk (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

/usr/share/python-support/python-gobject/gtk-2.0/dsextras.py tries to import codegen.createdefs which is missing.

This leads to the following error message when one tries to use Template from dsextras:
***************************************************************************
Codegen could not be found on your system and is required by the
dsextras.Template and dsextras.TemplateExtension classes. codegen is part
of PyGTK. To use either Template or TemplateExtension, you should also
install PyGTK.
***************************************************************************

createdefs.py is included in the pygtk orig.tar.gz in the codegen dir but doesn't get installed.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. What version of python-gtk2 do you use? Does "python -c "import codegen.createdefs"" work fine? That works fine on my feisty desktop

Changed in pygtk:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Michael Bienia (geser) wrote :

ii python-gtk2 2.10.3-0ubuntu3 Python bindings for the GTK+ widget set
ii python-gtk2-dev 2.10.3-0ubuntu3 GTK+ bindings: devel files

$ python -c "import codegen.createdefs"
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named codegen.createdefs

I found this bug while trying to resolve the FTBFS of diacanvas2 (python-diacanvas2).

I can only import codegen modules after adding /usr/share/pygtk/2.0 to the search path (but not the codegen.createdefs module)

>>> import codegen.override
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named codegen.override
>>> import sys
>>> sys.path.append("/usr/share/pygtk/2.0/")
>>> import codegen.override
>>> import codegen.createdefs
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named createdefs

Revision history for this message
Sebastien Bacher (seb128) wrote :

It's doing the same on my feisty desktop now, I've forwarded that upstream: http://bugzilla.gnome.org/show_bug.cgi?id=385934

Changed in pygtk:
importance: Undecided → Low
status: Needs Info → Confirmed
Changed in pygtk:
status: Unknown → Unconfirmed
Revision history for this message
Michael Bienia (geser) wrote :

The attached patch moves createdefs.py to the list of files which are installed.

Could the patch be applied until this is resolved upstream?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the patch, fixed with that upload:

 pygtk (2.10.3-0ubuntu4) feisty; urgency=low
 .
   * debian/patches/20_install_createdefs.py.dpatch:
     - patch by Michael Bienia, "Install codegen/createdefs.py" (Ubuntu: #75606)

Changed in pygtk:
status: Confirmed → Fix Released
Changed in pygtk:
status: Unconfirmed → Fix Released
Changed in pygtk:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.