After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 381389 - pygimp complains in codegen.py in cvs gimp
pygimp complains in codegen.py in cvs gimp
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: codegen
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 387409 396432 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-01 20:01 UTC by Adrian Likins
Modified: 2008-07-16 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the issue (1.07 KB, patch)
2006-12-02 07:26 UTC, Manish Singh
committed Details | Review

Description Adrian Likins 2006-12-01 20:01:11 UTC
Not sure whats going on here, but current cvs gimp as of 12/1/2006 seems to fail to compile on fc6.i386

make[4]: Entering directory `/usr/src/gimp-smudge/plug-ins/pygimp'
(cd . \
         && /usr/bin/pygtk-codegen-2.0 \
            --override gimpui.override \
            --register /usr/share/pygtk/2.0/defs/gdk-types.defs \
            --register /usr/share/pygtk/2.0/defs/gtk-types.defs \
            --register ./gimpcolor-types.defs \
            --register ./gimpenums-types.defs \
            --prefix gimpui gimpui.defs) > gen-gimpui.c \
         && cp gen-gimpui.c gimpui.c \
         && rm -f gen-gimpui.c
Warning: generating old-style constructor for:gimp_color_display_new
Could not write method GimpColorDisplay.load_state: No ArgType for GimpParasite*
Could not write method GimpColorDisplay.save_state: No ArgType for GimpParasite*
Warning: generating old-style constructor for:gimp_color_selector_new
Warning: generating old-style constructor for:gimp_frame_new
Could not write method GimpIntComboBox.prepend: varargs functions not supported
Could not write method GimpIntComboBox.append: varargs functions not supported
Could not write method GimpIntComboBox.connect: No ArgType for GCallback
Could not write method GimpIntComboBox.set_sensitivity: No ArgType for GimpIntSensitivityFunc
Warning: generating old-style constructor for:gimp_enum_combo_box_new
Warning: generating old-style constructor for:gimp_enum_store_new
Warning: generating old-style constructor for:gimp_memsize_entry_new
Warning: generating old-style constructor for:gimp_offset_area_new
Could not write method GimpPageSelector.get_selected_pages: No ArgType for gint*
Warning: generating old-style constructor for:gimp_path_editor_new
Could not write method GimpPreview.get_position: No ArgType for gint*
Could not write method GimpPreview.get_size: No ArgType for gint*
Could not write method GimpPreviewArea.draw: No ArgType for GimpImageType
Could not write method GimpPreviewArea.blend: No ArgType for GimpImageType
Could not write method GimpPreviewArea.mask: No ArgType for GimpImageType
Could not write method GimpDrawablePreview.get_drawable: No ArgType for GimpDrawable*
Could not write method GimpDrawablePreview.draw_region: No ArgType for const-GimpPixelRgn*
Warning: generating old-style constructor for:gimp_size_entry_new
Could not write constructor for GimpSizeEntry: No ArgType for GimpUnit
Could not write method GimpSizeEntry.get_unit: No ArgType for GimpUnit
Could not write method GimpSizeEntry.set_unit: No ArgType for GimpUnit
Warning: generating old-style constructor for:gimp_unit_menu_new
Could not write constructor for GimpUnitMenu: No ArgType for GimpUnit
Could not write method GimpUnitMenu.set_unit: No ArgType for GimpUnit
Could not write method GimpUnitMenu.get_unit: No ArgType for GimpUnit
Could not write method GimpZoomModel.get_fraction: No ArgType for gint*
Could not write method GimpZoomPreview.get_source: No ArgType for gint*
Could not write method GimpZoomPreview.get_drawable: No ArgType for GimpDrawable*
Traceback (most recent call last):
  • File "/usr/share/pygtk/2.0/codegen/codegen.py", line 1685 in ?
    sys.exit(main(sys.argv))
  • File "/usr/share/pygtk/2.0/codegen/codegen.py", line 1676 in main
    sw.write()
  • File "/usr/share/pygtk/2.0/codegen/codegen.py", line 1338 in write
    self.write_classes()
  • File "/usr/share/pygtk/2.0/codegen/codegen.py", line 1418 in write_classes
    instance.write_class()
  • File "/usr/share/pygtk/2.0/codegen/codegen.py", line 283 in write_class
    substdict['tp_methods'] = self.write_methods()
  • File "/usr/share/pygtk/2.0/codegen/codegen.py", line 519 in write_methods
    methods.append(self.methdef_tmpl %
UnboundLocalError: local variable 'meth' referenced before assignment
make[4]: *** [gimpui.c] Error 1
make[4]: Leaving directory `/usr/src/gimp-smudge/plug-ins/pygimp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/gimp-smudge/plug-ins/pygimp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/gimp-smudge/plug-ins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/gimp-smudge'
make: *** [all] Error 2
Comment 1 Manish Singh 2006-12-01 21:33:45 UTC
Looks like pygtk's codegen has a bug. Reassigning (though I'll take a look at fixing it myself)
Comment 2 Kevin Cozens 2006-12-01 21:43:28 UTC
I have the same problem building pygimp. I have pygtk2-2.10.3-2.fc6.
Comment 3 Manish Singh 2006-12-02 07:26:04 UTC
Created attachment 77525 [details] [review]
Patch to fix the issue

This should fix the error in codegen. However, since there's no way to specify a docstring for a defined method, perhaps the override syntax should be extended?
Comment 4 Manish Singh 2006-12-02 18:46:56 UTC
2006-12-02  Manish Singh  <yosh@gimp.org>

        * codegen/codegen.py: fix code for generating defines in override
        files, by using variables that actually exist in the context.
        Fixes bug #381389.
Comment 5 Manish Singh 2006-12-19 05:29:00 UTC
*** Bug 387409 has been marked as a duplicate of this bug. ***
Comment 6 Manish Singh 2007-01-15 00:42:53 UTC
*** Bug 396432 has been marked as a duplicate of this bug. ***