Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
[CI] Add comments for ci/install_python_for_osx.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
shunyi authored and shunyi committed Apr 4, 2019
1 parent bee3e4c commit 8d108a0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions ci/install_python_for_osx.sh
Expand Up @@ -2,15 +2,20 @@

set -ev

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
brew update && brew upgrade pyenv

# Upgrade pyenv
cd ~/.pyenv/plugins/python-build/../.. && git pull && cd -
# print openssl path
brew --prefix openssl

# Install specific version of Python via pyenv
LDFLAGS="-L$(brew --prefix openssl)/lib" \
CPPFLAGS="-I$(brew --prefix openssl)/include" \
CFLAGS="-I$(brew --prefix openssl)/include" \
CPPFLAGS="-I$(brew --prefix zlib)/include" \
~/.pyenv/bin/pyenv install -v $PYTHON_VERSION
pyenv install -v $PYTHON_VERSION

~/.pyenv/versions/$PYTHON_VERSION/bin/python3 --version
# Activate the specific Python version
~/.pyenv/versions/$PYTHON_VERSION/bin/python3 -m venv ~/venv

# Check the specifically installed Python version
python --version

0 comments on commit 8d108a0

Please sign in to comment.