jasonmorganson / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

python: unable to import gzip or bz2 compression modules #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
gzip is there, but import fails:

>>> import gzip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lib/python2.7/gzip.py", line 9, in <module>
    import zlib
ImportError: No module named zlib

bz2 is just not there:

>>> import bz2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named bz2

This makes the tarfile module less functional because it cannot handle gzip or 
bz2 compressed tar files (which are pretty standard).  Uncompressed tarballs 
seem to work ok with tarfile.open

Original issue reported on code.google.com by elijahta...@chromium.org on 17 Oct 2014 at 4:59

GoogleCodeExporter commented 9 years ago
The zlib module is there is current builds.

bz2 should be there for glibc builds since it will be loaded dynamically, I'll 
try to add bz2 to the static newlib python build too.

Original comment by sbc@google.com on 28 Oct 2014 at 10:19

GoogleCodeExporter commented 9 years ago
WIP: https://codereview.chromium.org/687553005

Original comment by sbc@google.com on 28 Oct 2014 at 10:51

GoogleCodeExporter commented 9 years ago
Fixed at https://codereview.chromium.org/687553005

Original comment by sbc@google.com on 21 Nov 2014 at 1:37