Problem building/using M2Crypto extension module
Carl Waldbieser
waldbie at attglobal.net
Fri Oct 3 02:59:02 EDT 2003
"Ng Pheng Siong" <ngps at netmemetic.com> wrote in message
> cd there, import the DLL into the interpreter toplevel:
>
> $ ls -l __m2crypto.so
> -rwxr-xr-x 1 ngps ngps 458146 Sep 28 20:59 __m2crypto.so*
>
> $ python
> Python 2.3 (#3, Sep 15 2003, 15:22:12)
> [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import __m2crypto
> >>>
>
> Does it work?
No, it gives me an error each time. Guess there is something wrong with the
.pyd.
> I've just put up 0.12 snapshot #1. There is a SWIG/Makefile.mw, which is
> for use with mingw. Take a look and adjust paths (e.g., OpenSSL
> include/library files, swig.exe) where necessary. Try it with "make -f
> Makefile.mw".
That seems to have worked. The .pyd is a little bigger. I copied it into
the site-packages/M2Crypto directory, and I can import M2Crypto now. When I
run the tests, I get:
................................................................EEEEEE
======================================================================
ERROR: test_cipher_mismatch (test_ssl_win.SSLWinClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl.py", line
88, in test_cipher_mismatch
pid = self.start_server(self.args)
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl_win.py",
line 41, in start_server
None, None, self.startupinfo)
error: (2, 'CreateProcess', 'The system cannot find the file specified.')
======================================================================
ERROR: test_cipher_ok (test_ssl_win.SSLWinClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl.py", line
114, in test_cipher_ok
pid = self.start_server(self.args)
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl_win.py",
line 41, in start_server
None, None, self.startupinfo)
error: (2, 'CreateProcess', 'The system cannot find the file specified.')
======================================================================
ERROR: test_no_such_cipher (test_ssl_win.SSLWinClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl.py", line
101, in test_no_such_cipher
pid = self.start_server(self.args)
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl_win.py",
line 41, in start_server
None, None, self.startupinfo)
error: (2, 'CreateProcess', 'The system cannot find the file specified.')
======================================================================
ERROR: test_server_simple (test_ssl_win.SSLWinClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl.py", line
54, in test_server_simple
pid = self.start_server(self.args)
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl_win.py",
line 41, in start_server
None, None, self.startupinfo)
error: (2, 'CreateProcess', 'The system cannot find the file specified.')
======================================================================
ERROR: test_tls1_nok (test_ssl_win.SSLWinClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl.py", line
65, in test_tls1_nok
pid = self.start_server(self.args)
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl_win.py",
line 41, in start_server
None, None, self.startupinfo)
error: (2, 'CreateProcess', 'The system cannot find the file specified.')
======================================================================
ERROR: test_tls1_ok (test_ssl_win.SSLWinClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl.py", line
77, in test_tls1_ok
pid = self.start_server(self.args)
File "C:\Downloads\m2crypto\m2crypto-0.12-snap1\tests\test_ssl_win.py",
line 41, in start_server
None, None, self.startupinfo)
error: (2, 'CreateProcess', 'The system cannot find the file specified.')
----------------------------------------------------------------------
Ran 70 tests in 2.530s
FAILED (errors=6)
So it looks like I'm not quite out of the woods yet, but these Python errors
at least seem a little more comprehensible to me. I am still not sure what
was going on with the library. Do you have any idea what I did wrong the
first time, or was it just a lucky guess? I would be interested in knowing
so I can try to avoid that kind of mistake in the future.
Thanks for your help!
Carl Waldbieser
More information about the Python-list
mailing list