diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-06-22 20:32:40 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-06-22 21:32:40 -0400 |
commit | 2cc711262fc0353efcbe6f7b4d855fe3bd404c10 (patch) | |
tree | 0476c547a98a1b1c9164cd6d27c2b0c03f68b430 | |
parent | bc07352de2d6020a42a81e418cef19e8514f6acc (diff) | |
download | py-bcrypt-git-2cc711262fc0353efcbe6f7b4d855fe3bd404c10.tar.gz |
add OS X to travis configs (#71)
* add OS X (no wait, mac OS) to travis configs
* pypy and pyenv are not the same thing
-rw-r--r-- | .travis.yml | 8 | ||||
-rwxr-xr-x | .travis/install.sh | 29 | ||||
-rwxr-xr-x | .travis/run.sh | 13 |
3 files changed, 45 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 1656377..456aba7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,14 @@ matrix: env: TOXENV=pep8 - python: 3.5 env: TOXENV=py3pep8 + - language: generic + os: osx + osx_image: xcode7.3 + env: TOXENV=py27 + - language: generic + os: osx + osx_image: xcode7.3 + env: TOXENV=py35 install: .travis/install.sh diff --git a/.travis/install.sh b/.travis/install.sh index c37edaa..551241c 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -3,13 +3,36 @@ set -e set -x -if [[ "${TOXENV}" == "pypy" ]]; then +install_pyenv () { git clone https://github.com/yyuu/pyenv.git ~/.pyenv PYENV_ROOT="$HOME/.pyenv" PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" - pyenv install pypy-2.6.0 - pyenv global pypy-2.6.0 +} + +if [[ "$(uname -s)" == 'Darwin' ]]; then + install_pyenv + case "${TOXENV}" in + py27) + curl -O https://bootstrap.pypa.io/get-pip.py + python get-pip.py --user + ;; + py35) + pyenv install 3.5.1 + pyenv global 3.5.1 + ;; + esac + pyenv rehash + python -m pip install --user virtualenv +else + if [[ "${TOXENV}" == "pypy" ]]; then + install_pyenv + pyenv install pypy-2.6.0 + pyenv global pypy-2.6.0 + fi + pip install virtualenv fi +python -m virtualenv ~/.venv +source ~/.venv/bin/activate pip install tox diff --git a/.travis/run.sh b/.travis/run.sh index 40a0750..0611797 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -3,11 +3,20 @@ set -e set -x -if [[ "${TOXENV}" == "pypy" ]]; then +init_pyenv () { PYENV_ROOT="$HOME/.pyenv" PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" - pyenv global pypy-2.6.0 +} + +if [[ "$(uname -s)" == "Darwin" ]]; then + init_pyenv +else + if [[ "${TOXENV}" == "pypy" ]]; then + init_pyenv + pyenv global pypy-2.6.0 + fi fi +source ~/.venv/bin/activate tox |