diff options
author | Donald Stufft <donald@stufft.io> | 2014-04-26 13:02:20 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2014-05-03 03:01:08 -0400 |
commit | cb31669564344da5cf4ba28a844c8a8bbd8d9053 (patch) | |
tree | 2cb2b4a7b0e69a10ad54d80a287313355cf74a11 /.travis | |
parent | 16a435e315ea248fa379528c1c5df05e5adf47f7 (diff) | |
download | pip-cb31669564344da5cf4ba28a844c8a8bbd8d9053.tar.gz |
Run our Travis tests on OSX as well as Linux
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/install.sh | 79 | ||||
-rwxr-xr-x | .travis/run.sh | 2 |
2 files changed, 81 insertions, 0 deletions
diff --git a/.travis/install.sh b/.travis/install.sh index dd9dc98e7..e41f3ad01 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -3,8 +3,87 @@ set -e set -x +if [[ "$(uname -s)" == "Darwin" ]]; then + brew update + brew install bazaar + brew install pyenv + + if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi + + # Adapted from Ubuntu 14.04 + PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs4 --with-wide-unicode --enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos" + PYTHON_CFLAGS="-g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" + + case $TOXENV in + py26) + pyenv install 2.6.9 + pyenv global 2.6.9 + ;; + py27) + pyenv install 2.7.6 + pyenv global 2.7.6 + ;; + pypy) + pyenv install pypy-2.2.1 + pyenv global pypy-2.2.1 + ;; + py32) + pyenv install 3.2.5 + pyenv global 3.2.5 + ;; + py33) + pyenv install 3.3.5 + pyenv global 3.3.5 + ;; + py34) + pyenv install 3.4.0 + pyenv global 3.4.0 + ;; + esac + + pip install virtualenv + + pyenv rehash +else + # add mega-python ppa + sudo add-apt-repository -y ppa:fkrull/deadsnakes + sudo apt-get -y update + + case $TOXENV in + py26) + sudo apt-get install python2.6 + ;; + py32) + sudo apt-get install python3.2 + ;; + py33) + sudo apt-get install python3.3 + ;; + py34) + sudo apt-get install python3.4 + ;; + py3pep8) + sudo apt-get install python3.3 + ;; + pypy) + sudo add-apt-repository -y ppa:pypy/ppa + sudo apt-get -y update + sudo apt-get install -y --force-yes pypy + ;; + esac + + sudo pip install virtualenv +fi + git config --global user.email "python-virtualenv@googlegroups.com" git config --global user.name "Pip" +virtualenv ~/.venv +source ~/.venv/bin/activate + pip install --upgrade setuptools pip install tox + +if [[ "$(uname -s)" == "Darwin" ]]; then + pyenv rehash +fi diff --git a/.travis/run.sh b/.travis/run.sh index aef517e35..ca59087fa 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -3,6 +3,8 @@ set -e set -x +source ~/.venv/bin/activate + case $TOXENV in py32) tox |