If resourcepackage is used for an application and then
the application is bundled up into a zip (as the latest
py2exe does) for use with the new zipimport,
resourcepackage dies because it tries to list a directory
when the directory is actually a zip.
resourcepackage could perhaps be updated to rebuild
from a zip (it's possible, although unlikely, that the zip
would change), but that probably isn't necessary.
This can also be avoided by replacing the __init__.py in
the zip, so that resource package isn't used. Swapping
them in and out is a pain, though <wink>.
This very small patch avoids the problem by simply not
scanning anything that isn't a directory, which is
probably the intent, anyway.
(SpamBayes is the particular use case where this has
come up, but it seems fairly generic, especially once
using zipimport becomes more common).
Context diff for the patch (package.py)