views:

52

answers:

1

We've been using M2crypto with Python 2.6 for Windows (32-bit) for some time with great success. We used one of the user contributed setups to install M2crypto in our development environments. We would like to move to Python 2.7, but noticed there are no pre-built Python 2.7 setups for m2crypto.

Questions:

  1. Is M2crypto 0.20.2 compatible with Python 2.7 or should we remain at Python 2.6 if we want to continue to use this library?

  2. Does anyone have a user built setup for installing M2Crypto 0.20.2 in a Python 2.7 environment? (There are no 2.7 contributions on the M2crypto site and google comes up empty as well)

  3. Can we copy our Python 2.6 M2Crypto files (under lib\site-packages\M2Crypto) to the same place in our Python 2.7 setup and avoid a formal installation process?

  4. What version of OpenSLL should we use with M2crypto 0.20.2? I checked the OpenSSL website and there appear 2 versions of OpenSSL to choose from: 0.9.8 and 1.0.0a.

Thank you, Malcolm

+2  A: 
  1. Yes, it's compatible with Python 2.7, so you can freely upgrade if you have not already.
  2. Yes, here you have bdist_wininst, bdist_egg and bdist for M2Crypto 20.2 built for Python 2.7 with MSVS2008 by me, hope it will fit your needs.
  3. No, you will get import error, as .pyd file (which is actually DLL) has python26.dll in it's import table, so this will not work. Of course, you can hack it and replace python26 with python27, but that's too dirt and gives you no guarantee it will work all the time.
  4. Version I uploaded for you works fine with OpenSSL 0.9.8o, haven't tested it with 1.0.0.
modchan
if any of these links will expire, write me and I will reupload them where you wish.
modchan
Modchan: You're my hero :) Thank you very much for posting those links - greatly appreciated! Regards, Malcolm
Malcolm
Modchan: the front page of the M2Crypto project is a wiki; could you add those links to the "contributed builds" section so that people looking there also find your builds? Thanks! The page is here: http://chandlerproject.org/Projects/MeTooCrypto
Brandon Craig Rhodes
@brandon-craig-rhodes, thanks - I'm uploading them to chandler wiki just now.
modchan