aboutsummaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorTerry Chia <terrycwk1994@gmail.com>2014-10-25 21:03:15 +0800
committerTerry Chia <terrycwk1994@gmail.com>2014-10-28 23:30:14 +0800
commit3c4a94a1f8144676357fa371262320b7df2de88c (patch)
tree9f09fe07f1c415a7c772212429f43766bf074cbc /.travis
parent4365b12f01b3f5f501ca4f86c59999e78980790c (diff)
downloadcryptography-3c4a94a1f8144676357fa371262320b7df2de88c.tar.gz
cryptography-3c4a94a1f8144676357fa371262320b7df2de88c.tar.bz2
cryptography-3c4a94a1f8144676357fa371262320b7df2de88c.zip
Refactor .travis/install.sh.
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/install.sh167
1 files changed, 76 insertions, 91 deletions
diff --git a/.travis/install.sh b/.travis/install.sh
index af4d8704..242adbda 100755
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -9,110 +9,95 @@ else
DARWIN=false
fi
-if [[ "${OPENSSL}" == "0.9.8" ]]; then
- if [[ "$DARWIN" = false ]]; then
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main"
- sudo apt-get -y update
- sudo apt-get install -y --force-yes libssl-dev/lucid
- fi
-else
- if [[ "$DARWIN" = true ]]; then
- brew update
- brew upgrade openssl
- fi
-fi
+if [[ "$DARWIN" = true ]]; then
+ brew update
-if [[ "${TOX_ENV}" == "docs" ]]; then
- if [[ "$DARWIN" = true ]]; then
- brew update
- brew install enchant
- else
- sudo apt-get -y update
- sudo apt-get install libenchant-dev
- fi
-fi
+ if [[ "${OPENSSL}" == "0.9.8" ]]; then
+ brew upgrade openssl
-if [[ "$DARWIN" = true ]]; then
if which pyenv > /dev/null; then
- eval "$(pyenv init -)"
+ eval "$(pyenv init -)"
fi
case "${TOX_ENV}" in
- py26)
- curl -O https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- sudo pip install virtualenv
- ;;
- py27)
- curl -O https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- sudo pip install virtualenv
- ;;
- pypy)
- brew update
- brew upgrade pyenv
- pyenv install pypy-2.4.0
- pyenv global pypy-2.4.0
- pip install virtualenv
- ;;
- py32)
- brew update
- brew upgrade pyenv
- pyenv install 3.2.6
- pyenv global 3.2.6
- pip install virtualenv
- ;;
- py33)
- brew update
- brew upgrade pyenv
- pyenv install 3.3.6
- pyenv global 3.3.6
- pip install virtualenv
- ;;
- py34)
- brew update
- brew upgrade pyenv
- pyenv install 3.4.2
- pyenv global 3.4.2
- pip install virtualenv
- ;;
- docs)
- curl -O https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- sudo pip install virtualenv
- ;;
+ py26)
+ curl -O https://bootstrap.pypa.io/get-pip.py
+ sudo python get-pip.py
+ ;;
+ py27)
+ curl -O https://bootstrap.pypa.io/get-pip.py
+ sudo python get-pip.py
+ py32)
+ brew upgrade pyenv
+ pyenv install 3.2.6
+ pyenv global 3.2.6
+ ;;
+ py33)
+ brew upgrade pyenv
+ pyenv install 3.3.6
+ pyenv global 3.3.6
+ ;;
+ py34)
+ brew upgrade pyenv
+ pyenv install 3.4.2
+ pyenv global 3.4.2
+ ;;
+ py3pep8)
+ sudo apt-get install python3.3 python3.3-dev
+ ;;
+ pypy)
+ brew upgrade pyenv
+ pyenv install pypy-2.4.0
+ pyenv global pypy-2.4.0
+ ;;
+ docs)
+ curl -O https://bootstrap.pypa.io/get-pip.py
+ sudo python get-pip.py
+ ;;
esac
- pyenv rehash
+ pvenv rehash
+
else
- # add mega-python ppa
- sudo add-apt-repository -y ppa:fkrull/deadsnakes
- sudo apt-get -y update
+ sudo add-apt-repository ppa:fkrull/deadsnakes
+
+ if [[ "${TOX_ENV}" == "pypy" ]]; then
+ sudo add-apt-repository ppa:pypy/ppa
+ fi
+
+ if [[ "${OPENSSL}" == "0.9.8" ]]; then
+ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main"
+
+ sudo apt-get update
+
+ if [[ "${OPENSSL}" == "0.9.8" ]]; then
+ sudo apt-get install --force-yes libssl-dev/lucid
case "${TOX_ENV}" in
- py26)
- sudo apt-get install python2.6 python2.6-dev
- ;;
- py32)
- sudo apt-get install python3.2 python3.2-dev
- ;;
- py33)
- sudo apt-get install python3.3 python3.3-dev
- ;;
- py34)
- sudo apt-get install python3.4 python3.4-dev
- ;;
- py3pep8)
- sudo apt-get install python3.3 python3.3-dev
- ;;
- pypy)
- sudo add-apt-repository -y ppa:pypy/ppa
- sudo apt-get -y update
- sudo apt-get install -y --force-yes pypy pypy-dev
- ;;
+ py26)
+ sudo apt-get install python2.6 python2.6-dev
+ ;;
+ py32)
+ sudo apt-get install python3.2 python3.2-dev
+ ;;
+ py33)
+ sudo apt-get install python3.3 python3.3-dev
+ ;;
+ py34)
+ sudo apt-get install python3.4 python3.4-dev
+ ;;
+ py3pep8)
+ sudo apt-get install python3.3 python3.3-dev
+ ;;
+ pypy)
+ sudo apt-get install --force-yes pypy pypy-dev
+ ;;
+ docs)
+ sudo apt-get install libenchant-dev
+ ;;
esac
- sudo pip install virtualenv
fi
+sudo pip install virtualenv
virtualenv ~/.venv
source ~/.venv/bin/activate
pip install tox coveralls