[EMAIL PROTECTED] wrote:

> This is one of the things that I tried, but to no effect.
> The following will reproduce the problem on windows.


I have investigated this issue and it's related to the fact that PyInstaller
does not accurately emulate import on case-insensitive filesystems.
Specifically, Python (2.1+) does a strict case check on module filenames even
under Windows (unless PYTHONCASEOK is set in the environment). The conflict
happens because Crypto.Hash.SHA (note: uppercase) imports the standard module
sha (note: lowercase). While Python understands that the import has to refer to
the standard module, PyInstaller believes that Crypto.Hash.SHA is importing
itself.

You can verify this by yourself: if you set PYTHONCASEOK in the env (with any
value), PyCrypto will break with exactly the same error you get when packaging
it with PyInstaller.

I'm working on a fix for the issue. I'll try to reproduce the correct behaviour
of Python 2.1+ (before they were using a different logic, but I won't care
unless someone explicitally asks for it), including support for PYTHONCASEOK
(which will have to be set at runtime by the bootloader).

Giovanni Bajo

_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller

Reply via email to