On 1 May, 2011, at 12:17, Brendan Simon (eTRIX) wrote:

> I get the following error when trying to run my app when built with py2app 
> and python 2.7.
> 
>   File "crcmod/__init__.pyc", line 7, in <module>
> ImportError: No module named predefined
> 
> The app works fine when built with Python 2.5 or Python 2.6.
> 
> It seems the folks in py2exe land are having the same issue.
> http://thread.gmane.org/gmane.comp.python.py2exe/4301
> http://thread.gmane.org/gmane.comp.python.py2exe/4302
> 
> Any ideas what would be causing this and how it can be 
> fixed/solved/worked-around ??

The crcmod package contains a module named crcmod. My guess is that both py2app 
and py2exe get confused by this and try to fetch 'crcmod.predefined' from the 
nested module instead of the toplevel package.  This basicly means that both 
py2*s have a bug in their emulation of the __import__ code.  

I'll see if I can create a testcase for this for the modulegraph package, it 
should then be fairly easy to actually fix the issue. As this is only a problem 
with python2.7 this may end up being a bug in the stdlib though.

As a workaround try adding includes for crcmod.predefined, or even the entire 
crcmod package (setup(..., package=['crcmod'], ...))

Ronald

Ronald
> 
> Thanks, Brendan.
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to