How do I compile Python 3.4 with custom OpenSSL?

I managed to figure it out after a lot of hair-pulling. It was a bunch of environment variables… I think I might have done a little overkill, but this basically worked:

# OpenSSL 1.0.1g
./config shared --prefix=/my/path --openssldir=/my/path/openssl
make
make install

# Python 3.4
export LDFLAGS="-L/my/path/lib/ -L/my/path/lib64/"
export LD_LIBRARY_PATH="/my/path/lib/:/my/path/lib64/"
export CPPFLAGS="-I/my/path/include -I/my/path/include/openssl"
./configure --prefix=/my/path/
make
make install

Leave a Comment