Using Python HTTPSConnect
Revision as of 15:49, 5 June 2013 by PeterHarding (talk | contribs) (Created page with "=Problems= Had a problem where httplib.HTTPSConnect() was not available. Happens when Python is not built with SSL support. To get this working I need to do the following: ...")
Problems
Had a problem where httplib.HTTPSConnect() was not available. Happens when Python is not built with SSL support. To get this working I need to do the following:
- . Download latest version of OpenSSL from http://www.openssl.org/ and install it (/usr/local/ssl)
- . Had to use the -fPIC compile flag to get the linker to work later in the process
- . Update Modules/Setup file - uncomment SSL lines.
- . Build and install Python
Other things
In OpenSSL source directory run config as follows:
./config --openssldir=/usr/local/ssl
Add -fPIC to end of CFLAGS line in Makefile before building:
CFLAG= -DOPENSSL_THREADS -D_REENTRANT ... -DGHASH_ASM -fPIC
In python source directory run configure to build for a custom location:
./configure --enable-shared --prefix=/usr/local/python LDFLAGS="-Wl,-rpath /usr/local/python/lib"