aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-10-30 08:38:12 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-10-30 08:38:12 -0500
commit142abb566e63e9e15de8afe64be254e91e93c298 (patch)
tree3883310bd86f5898c5b83cc56c58dd97c1704ebd
parent0ed7f56596bae285e8dd845b6646b44cc73a1609 (diff)
parentc69fa6e6d68ff23cd1be2d8281c74fa46a349fdd (diff)
downloadcryptography-142abb566e63e9e15de8afe64be254e91e93c298.tar.gz
cryptography-142abb566e63e9e15de8afe64be254e91e93c298.tar.bz2
cryptography-142abb566e63e9e15de8afe64be254e91e93c298.zip
Merge pull request #1443 from Ayrx/refactor-install-script
Refactor .travis/install.sh.
-rwxr-xr-x.travis/install.sh73
1 files changed, 31 insertions, 42 deletions
diff --git a/.travis/install.sh b/.travis/install.sh
index af4d8704..51d3097c 100755
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -9,30 +9,13 @@ 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
+ if [[ "${OPENSSL}" != "0.9.8" ]]; then
+ brew upgrade openssl
fi
-fi
-if [[ "$DARWIN" = true ]]; then
if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi
@@ -41,53 +24,58 @@ if [[ "$DARWIN" = true ]]; then
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
+ ;;
+ 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
- sudo pip install virtualenv
;;
esac
pyenv rehash
+
else
- # add mega-python ppa
sudo add-apt-repository -y ppa:fkrull/deadsnakes
+
+ if [[ "${TOX_ENV}" == "pypy" ]]; then
+ sudo add-apt-repository -y ppa:pypy/ppa
+ fi
+
+ if [[ "${OPENSSL}" == "0.9.8" ]]; then
+ sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ lucid main"
+ fi
+
sudo apt-get -y update
+ if [[ "${OPENSSL}" == "0.9.8" ]]; then
+ sudo apt-get install -y --force-yes libssl-dev/lucid
+ fi
+
case "${TOX_ENV}" in
py26)
sudo apt-get install python2.6 python2.6-dev
@@ -105,14 +93,15 @@ else
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
+ 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