[PYTHON-CRYPTO] Python 3.0 support
C. Collis
koniosis at GMAIL.COM
Wed Dec 24 14:39:20 CET 2008
Hey!
I've attempted to get M2Crypto to build with SWIG for Python 3.0. You need
the latest SVN trunk of SWIG (I had to edit swig\Lib\python\pyinit.swg
SWIG_init function to ensure that the SWIG_module variable is declared before
the call to SWIG_Python_FixMethods otherwise MSVC compiler errors).
Anyway, I've made a stab at getting it to work (see attached patch) and it successfully builds under Windows but when I try and import M2Crypto python
claims the __m2crypto module doesn't exist. I can build the M2Crypto library
for Python 2.6 and it works great.
Note that the attached patch also contains my other changes to do with RSA
PSS padding (just ignore them)
I haven't started to look at what changes need to go into the .py files to work
with Python 3.0, for now I'd just be happy to get the module to import into
Python, updating from that point on is the easy part.
Hopefully this patch will help someone who has better knowledge of SWIG and
writing Python extension modules get it importing correctly.
It seems the author of M2Crypto has vanished as there haven't been any
updates, replies, commits etc for a while, I hope not!
Help welcome!
Thanks,
Chris
More information about the python-crypto
mailing list