pycairo wraps cairo_ps_surface_set_dpi, but cairo/src/cairo.h now #defines that function to cairo_ps_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution, without defining this new function. It appears to be part of a cairo effort to force people to move to the new API. (See also http://bugzilla.gnome.org/show_bug.cgi?id=344512) 1032 newren@Moe:gnome/PolicyKit$ jhbuild shell 1001 newren@Moe:gnome/PolicyKit$ python Python 2.4.3 (#1, Jun 10 2006, 15:32:32) [GCC 3.4.4 20050721 (Red Hat 3.4.4-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk Traceback (most recent call last): File "<stdin>", line 1, in ? File "/opt/gnome2/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 43, in ? from _gtk import * File "/opt/gnome2/lib/python2.4/site-packages/cairo/__init__.py", line 1, in ? from _cairo import * ImportError: /opt/gnome2/lib/python2.4/site-packages/cairo/_cairo.so: undefined symbol: cairo_ps_surface_set_dpi_REPLACED_BY_cairo_surface_set_fallback_resolution
Created attachment 5871 [details] [review] Hacky patch to fix the bug This patch takes the minimal route to fixing this bug. Probably not the best route, as you'd probably want to compress the three pycairo functions into one just as cairo did.
Created attachment 5874 [details] [review] replace *Surface set_dpi method by Surface set_fallback_resolution This patch does it like cairo did; providing set_fallback_resolution to CairoSurface instead of three set_dpi methods to children classes.
Fixed in CVS using the method from the second patch. (I received the email regarding the second patch after I had just made the equivalent changes!)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.