[oneiric] python-imaging needs to be multiarch-aware

Bug #806661 reported by Marc Tardif
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-imaging (Debian)
Fix Released
Unknown
python-imaging (Ubuntu)
Fix Released
Medium
Barry Warsaw

Bug Description

This is the content of the _imaging compiled module from Oneiric desktop amd64 [20110624]:

>>> import _imaging
>>> dir(_imaging)
['__doc__', '__file__', '__name__', '__package__', 'bit_decoder', 'blend', 'convert', 'copy', 'crc32', 'draw', 'effect_mandelbrot', 'effect_noise', 'eps_encoder', 'fill', 'fli_decoder', 'font', 'getcodecstatus', 'getcount', 'gif_decoder', 'gif_encoder', 'hex_decoder', 'hex_encoder', 'jpeg_decoder', 'jpeg_encoder', 'jpeglib_version', 'linear_gradient', 'map_buffer', 'msp_decoder', 'new', 'open_ppm', 'outline', 'packbits_decoder', 'path', 'pcd_decoder', 'pcx_decoder', 'pcx_encoder', 'radial_gradient', 'raw_decoder', 'raw_encoder', 'sun_rle_decoder', 'tga_rle_decoder', 'tiff_lzw_decoder', 'wedge', 'xbm_decoder', 'xbm_encoder', 'zip_decoder', 'zip_encoder', 'zlib_version']

And, this is the content after I dist-upgrade:

['__doc__', '__file__', '__name__', '__package__', 'bit_decoder', 'blend', 'convert', 'copy', 'crc32', 'draw', 'effect_mandelbrot', 'effect_noise', 'eps_encoder', 'fill', 'fli_decoder', 'font', 'getcodecstatus', 'getcount', 'gif_decoder', 'gif_encoder', 'hex_decoder', 'hex_encoder', 'linear_gradient', 'map_buffer', 'msp_decoder', 'new', 'open_ppm', 'outline', 'packbits_decoder', 'path', 'pcd_decoder', 'pcx_decoder', 'pcx_encoder', 'radial_gradient', 'raw_decoder', 'raw_encoder', 'sun_rle_decoder', 'tga_rle_decoder', 'tiff_lzw_decoder', 'wedge', 'xbm_decoder', 'xbm_encoder']

Notice how the latter no longer contains the zip encoder and decoder... this is causing some dependent projects to fail building, like Launchpad itself, with the exception: IOError: decoder zip not available

Revision history for this message
Marc Tardif (cr3) wrote :

Modifying setup.py to know about the new architecture specific lib directories seems to fix the problem. Here is an example diff where the architecture is hard coded, I'm sure there's precedent in other packages to patch the file properly:

=== modified file 'setup.py'
--- setup.py 2009-11-20 19:22:59 +0000
+++ setup.py 2011-07-06 20:56:04 +0000
@@ -147,6 +147,9 @@
             add_directory(library_dirs, "/opt/local/lib")
             add_directory(include_dirs, "/opt/local/include")

+ elif sys.platform == "linux2":
+ add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu")
+
         add_directory(library_dirs, "/usr/local/lib")
         # FIXME: check /opt/stuff directories here?

Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 806661] Re: [oneiric] IOError: decoder zip not available

On Jul 06, 2011, at 09:00 PM, Marc Tardif wrote:

>Modifying setup.py to know about the new architecture specific lib
>directories seems to fix the problem. Here is an example diff where the
>architecture is hard coded, I'm sure there's precedent in other packages
>to patch the file properly:

I was right! Multiarch.

Thanks, I'll work on an upload to fix this.

Barry Warsaw (barry)
summary: - [oneiric] IOError: decoder zip not available
+ [oneiric] python-imaging needs to be multiarch-aware
Changed in python-imaging (Ubuntu):
status: New → Confirmed
assignee: nobody → Barry Warsaw (barry)
milestone: none → oneiric-alpha-2
importance: Undecided → Medium
Martin Pitt (pitti)
Changed in python-imaging (Ubuntu):
milestone: oneiric-alpha-2 → oneiric-alpha-3
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-imaging - 1.1.7-3ubuntu1

---------------
python-imaging (1.1.7-3ubuntu1) oneiric; urgency=low

  * debian/patches/01_multiarch_support.patch
    - Add multiarch search directories as given by dpkg-architecture.
      This re-enables support for: tkinter, jpeg, zlib, freetype2, and
      littlecms. Problem found and patch inspired by Marc Tardif (cr3).
      (LP: #806661)
 -- Barry Warsaw <email address hidden> Thu, 07 Jul 2011 08:08:10 -0400

Changed in python-imaging (Ubuntu):
status: Confirmed → Fix Released
Changed in python-imaging (Debian):
status: Unknown → Fix Released
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.