Skip to content

Instantly share code, notes, and snippets.

@tianchaijz
Last active March 1, 2018 10:47
Show Gist options
  • Save tianchaijz/558f494b45fea0bb080c1932e87d7882 to your computer and use it in GitHub Desktop.
Save tianchaijz/558f494b45fea0bb080c1932e87d7882 to your computer and use it in GitHub Desktop.

Revisions

  1. tianchaijz revised this gist Jan 2, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pyenv_ssl_archlinux.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ export LD_LIBRARY_PATH="$openssl_home/lib"

    # pythonbrew install 2.7.8
    pyenv install -v 2.7.8
    pyenv local 2.7.8
    pyenv global 2.7.8

    exec $SHELL
    python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
  2. tianchaijz revised this gist Jan 2, 2018. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions pyenv_ssl_archlinux.sh
    Original file line number Diff line number Diff line change
    @@ -3,16 +3,17 @@

    openssl_version="openssl-1.0.2g"
    openssl_package="${openssl_version}.tar.gz"
    openssl_path="/opt/$openssl_version"
    openssl_home="/opt/$openssl_version"

    curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$openssl_path && make -j8 && sudo make install
    curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$openssl_home && make -j8 && sudo make install

    export LDFLAGS="-L$openssl_path/lib -Wl,-rpath=$openssl_path/lib"
    export LD_LIBRARY_PATH="$openssl_path/lib"
    export CPPFLAGS="-I$openssl_path/include/openssl"
    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 2.7.8
    pyenv install -v 2.7.8
    pyenv local 2.7.8

    exec $SHELL
  3. tianchaijz revised this gist Jan 2, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions pyenv_ssl_archlinux.sh
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,9 @@

    openssl_version="openssl-1.0.2g"
    openssl_package="${openssl_version}.tar.gz"
    openssl_path="/opt/$openssl_package"
    openssl_path="/opt/$openssl_version"

    curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$ssl_path && make -j8 && sudo make install
    curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$openssl_path && make -j8 && sudo make install

    export LDFLAGS="-L$openssl_path/lib -Wl,-rpath=$openssl_path/lib"
    export LD_LIBRARY_PATH="$openssl_path/lib"
  4. tianchaijz revised this gist Apr 14, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pyenv_ssl_archlinux.sh
    Original file line number Diff line number Diff line change
    @@ -15,5 +15,5 @@ export CPPFLAGS="-I$openssl_path/include/openssl"
    pyenv install 2.7.8
    pyenv local 2.7.8

    exec zsh
    exec $SHELL
    python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
  5. tianchaijz revised this gist Apr 13, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions pyenv_ssl_archlinux.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    #!/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"
  6. tianchaijz created this gist Apr 13, 2016.
    18 changes: 18 additions & 0 deletions pyenv_ssl_archlinux.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/bin/bash

    openssl_version="openssl-1.0.2g"
    openssl_package="${openssl_version}.tar.gz"
    openssl_path="/opt/$openssl_package"

    curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$ssl_path && make -j8 && sudo make install

    export LDFLAGS="-L$openssl_path/lib -Wl,-rpath=$openssl_path/lib"
    export LD_LIBRARY_PATH="$openssl_path/lib"
    export CPPFLAGS="-I$openssl_path/include/openssl"

    # pythonbrew install 2.7.8
    pyenv install 2.7.8
    pyenv local 2.7.8

    exec zsh
    python -c 'import ssl; print(ssl.OPENSSL_VERSION)'