Google App Engine (Python) 安裝 SSL


Install MinGW
Go and get Automated MinGW Installer at http://www.mingw.org/
Environment Settings
Right-click on "My Computer" and select "Properties".
Click Advanced -> Environment Variables.
In the box entitled "System Variables" scroll down to the line that says "PATH" and double-click the entry.
You will be presented with a dialog box with two text boxes, the bottom text box allows you to edit the PATH variable. It is very important that you do not delete the existing values in the PATH string, this will cause all sorts of problems for you!
Scroll to the end of the string and at the end add ";\bin". Here is the full absolute path name of the installation directory; if you accepted the defaults when installing tar and gzip, then for these, it will (probably) be C:\Program Files\GnuWin32, while for MinGW it will be C:\MinGW\bin, (if you kept to the recommended default installation directory). Don't forget the semicolon; this separates the entries in the PATH.
press OK -> OK -> OK and you are done.

Below are libraries you will need
OpenSSL
libgw32c
unzip and place it at C:\GnuWin32

Get the sorce code
Go to download the source code at http://pypi.python.org/pypi/ssl/ and extract to somewhere you want.
Modify setup.py
The original setup.py is assume that you place library at C:\Utils\GnuWin32
if sys.platform == 'win32':
# Assume the openssl libraries from GnuWin32 are installed in the
# following location:
gnuwin32_dir = os.environ.get("GNUWIN32_DIR", r"C:\GnuWin32")

Go to line 152 and change you path you have extracted the files in.

Build it
setup.py build_ext --compiler=mingw32 install

留言

熱門文章