Python 3.0 support

"C. Collis" <[email protected]> Wed, 24 Dec 2008 14:39:20 +0100
Newsgroups gmane.comp.python.cryptography
Message-ID <LISTSERV%[email protected]>
Hey!=20

I've attempted to get M2Crypto to build with SWIG for Python 3.0. You nee=
d=20
the latest SVN trunk of SWIG (I had to edit swig\Lib\python\pyinit.swg=20=

SWIG_init function to ensure that the SWIG_module variable is declared be=
fore=20
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 i=
t successfully builds under Windows but when I try and import M2Crypto py=
thon=20
claims the __m2crypto module doesn't exist. I can build the M2Crypto libr=
ary=20
for Python 2.6 and it works great.

Note that the attached patch also contains my other changes to do with RS=
A=20
PSS padding (just ignore them)

I haven't started to look at what changes need to go into the .py files t=
o work=20
with Python 3.0, for now I'd just be happy to get the module to import in=
to=20
Python, updating from that point on is the easy part.

Hopefully this patch will help someone who has better knowledge of SWIG a=
nd=20
writing Python extension modules get it importing correctly.

It seems the author of M2Crypto has vanished as there haven't been any=20=

updates, replies, commits etc for a while, I hope not!

Help welcome!

Thanks,

Chris