-
-
Save tobiase/d2c48cf36a85447a060a18f2bd63a8a1 to your computer and use it in GitHub Desktop.
Script to solve python compilation with ssl on Arch Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://stackoverflow.com/questions/23548188/how-do-i-compile-python-3-4-with-custom-openssl | |
openssl_version="openssl-1.0.2g" | |
openssl_package="${openssl_version}.tar.gz" | |
openssl_home="/opt/$openssl_version" | |
curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$openssl_home && make -j8 && sudo make install | |
export CFLAGS="-I$openssl_home/include" | |
export CPPFLAGS="$CFLAGS" | |
export LDFLAGS="-L$openssl_home/lib -Wl,-rpath=$openssl_home/lib" | |
export LD_LIBRARY_PATH="$openssl_home/lib" | |
# pythonbrew install 2.7.8 | |
pyenv install -v 2.7.8 | |
pyenv global 2.7.8 | |
exec $SHELL | |
python -c 'import ssl; print(ssl.OPENSSL_VERSION)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment