Hello everyone,

I'm trying to freeze paramiko using freeze.py (to freeze a program I wrote that uses paramiko).

This requires freezing PyCrypto. Hence the problem, since many PyCrypto components (mostly ciphers from what I could see) are compiled C extensions, and all compiled extension modules have to be compiled statically into Python (bc freeze.py can't import dynamically loaded libraries into frozen binary).

I have added following in the Modules/Setup while building Python

*static*
# ... lots of other modules
Crypto.Cipher.DES3 DES3.c

But this produces:

[r...@localhost Python-2.6.2]# make
/bin/sh ./Modules/makesetup -c ./Modules/config.c.in \
                                -s Modules \
                                Modules/Setup.config \
                                Modules/Setup.local \
                                Modules/Setup
bad word Crypto.Cipher.DES3 in Crypto.Cipher.DES3 DES3.c
make: *** [Makefile] Error 1

If I change that to:

DES3 DES3.c

Python compiles, but then I can't import this module and neither can PyCrypto in a frozen binary:

[r...@localhost tmp2]# ./cssh
<frozen>:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead <frozen>:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
Traceback (most recent call last):
  File "cssh.py", line 7, in <module>
    import paramiko
File "/usr/local/lib/python2.6/site-packages/paramiko/__init__.py", line 69, in <module>
    from transport import randpool, SecurityOptions, Transport
File "/usr/local/lib/python2.6/site-packages/paramiko/transport.py", line 37, in <module>
    from paramiko.dsskey import DSSKey
File "/usr/local/lib/python2.6/site-packages/paramiko/dsskey.py", line 31, in <module>
    from paramiko.pkey import PKey
File "/usr/local/lib/python2.6/site-packages/paramiko/pkey.py", line 28, in <module>
    from Crypto.Cipher import DES3
ImportError: cannot import name DES3




Regards,
mk






_______________________________________________
paramiko mailing list
[email protected]
http://www.lag.net/cgi-bin/mailman/listinfo/paramiko

Reply via email to