views:

182

answers:

1

i floow this step by step: http://beautifulisbetterthanugly.com/posts/2009/aug/19/compile-ssl-115-python-25-or-lower/

but not successful ,and this is my error:

alt text

how do do this ,

thanks

updated

alt text

and i import successful when 'cd' to 'build\lib.win32-2.5',

my new problem is : how to import it successful when i run 'python' on other dir s

thanks

+1  A: 

Edit: Regarding the error you got cannot find -lgw32c, you simply need to download libgw32c, which is mentioned in dependencies list on your step by step guide

I tried to compile with mingw32 too

D:\tmp\ssl-1.15> python setup.py build -c mingw32
running build
running build_py
running build_ext
building 'ssl._ssl2' extension
writing build\temp.win32-2.5\Release\ssl\_ssl2.def
gcc.exe -mno-cygwin -shared -s build\temp.win32-2.5\Release\ssl\_ssl2.o build\temp.win32-2.5\Release\ssl\_ssl2.def -LC:\Utils\GnuWin32\lib -LD:\Python25\libs -LD:\Python25\PCBuild -lssl -lcrypto -lwsock32 -lgdi32 -lgw32c -lole32 -luuid -lpython25 -lmsvcr71 -o build\lib.win32-2.5\ssl\_ssl2.pyd -static
D:\tmp\ssl-1.15>

Importing ok

D:\tmp\ssl-1.15\build\lib.win32-2.5> python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> dir(ssl)
['CERT_NONE', 'CERT_OPTIONAL', 'CERT_REQUIRED', 'DER_cert_to_PEM_cert', 'PEM_FOOTER', 'PEM_HEADER', 'PEM_cert_to_DER_cert', 'PROTOCOL_NOSSLv2', 'PROTOCOL_SSLv2', 'PROTOCOL_SSLv23', 'PROTOCOL_SSLv3', 'PROTOCOL_TLSv1', 'RAND_add', 'RAND_egd', 'RAND_status', 'SSLError', 'SSLSocket', 'SSL_ERROR_EOF', 'SSL_ERROR_INVALID_ERROR_CODE', 'SSL_ERROR_SSL', 'SSL_ERROR_SYSCALL', 'SSL_ERROR_WANT_CONNECT', 'SSL_ERROR_WANT_READ', 'SSL_ERROR_WANT_WRITE', 'SSL_ERROR_WANT_X509_LOOKUP', 'SSL_ERROR_ZERO_RETURN', '__builtins__', '__doc__', '__file__', '__name__', '__path__', '_fileobject', '_getnameinfo', '_ssl2', 'base64', 'cert_time_to_seconds', 'get_protocol_name', 'get_server_certificate', 'os', 'select', 'socket', 'sslwrap_simple', 'sys', 'wrap_socket']
>>>

Update: for the second question

my new problem is : how to import it successful when i run 'python' on other dirs?

In my example, I only did python setup.py build -c mingw32, you need to install it by using

python setup.py install

or

Just copy ssl folder from build\lib.win32-2.5 to D:\Python25\Lib\site-packages\

S.Mark
so cool ,thanks a lot
zjm1126
you're welcome @zjm, cheers.
S.Mark
Your premise is wrong: He's trying to install the SSL module on his local machine, so appcfg, the upload tool, can use it to verify the server's SSL certificate when uploading new versions of his app.
Nick Johnson
@Nick, well, so do you think which part should I correct in my answer? Am I wrong troubleshooting his installation processes OR "telling him cannot load custom c extensions in Google App Engine" is wrong? OR suggesting to use Http is wrong? OR "answering him wrong at first place"?
S.Mark
anyway, going to remove first 2 lines
S.Mark
Telling him he can't load C extensions on App Engine was inaccurate (since he's not trying to). Answer looks good now.
Nick Johnson
Weirdly, SO let me remove the downvote, but won't let me add an upvote unless you edit it again.
Nick Johnson
Ok, I was assuming he want to use SSL on App Engine and installing it on his PC and (also thought he will try to install on App Engine too). Thanks for pointing out @Nick. I appreciated.
S.Mark
Yeah @Nick, thats by design. no problem, you can skip upvoting :-), thanks btw
S.Mark