[Baypiggies] Python 3 and swig help for m2crypto?

Fahrzin Hemmati fahhem at google.com
Mon Nov 16 19:57:41 EST 2015


I'm not sure, but maybe converting that to a relative import “import ._m2crypto”
or “from . import _m2crypto” might fix it, but only for python 3. Maybe running
a specific incantation of 2to3 against the file in the build step?

On Mon, Nov 16, 2015 at 4:16 PM, Craig Rodrigues < rodrigc at freebsd.org > wrote:
Hi,

As part of a learning exercise for porting a moderately complex package
from Python 2 to Python 3, I picked the m2crypto package.

I have made good progress so far, and have pushed various fixes upstream
to the m2crypto maintainer who has accepted them:

https://gitlab.com/m2crypto/ m2crypto/commits/master

I am now having problems with swig and imports.

If I do the following to create a python 3.5 virtualenv to build and test
the module:

pyvenv-3.5 mcrypto-test
cd mcrypto-test
. bin/activate
git clone https://gitlab.com/m2crypto/ m2crypto.git
cd m2crypto
python setup.py build
python setup.py install
python setup.py test

All the steps succeed except for the last step, which gives me an
exception (see attached backtrace).

If I do the same steps on Python 2.7, I don't get those errors.
I suspect that this has to do with swig and imports.
I have swig 2.0 installed.

Can someone point me in the direction where I can solve this?
Thanks.

--
Craig
https://linkedin.com/in/ rodrigc

______________________________ _________________
Baypiggies mailing list
Baypiggies at python.org
To change your subscription options or unsubscribe:
https://mail.python.org/ mailman/listinfo/baypiggies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20151117/ecb7215e/attachment.html>


More information about the Baypiggies mailing list