Skip to content

Commit

Permalink
Merge pull request #1763 from dstufft/refactor-travis-install
Browse files Browse the repository at this point in the history
Refactor travis install logic to move it into a shell script
  • Loading branch information
dstufft committed Apr 26, 2014
2 parents 5adf82b + 31fc943 commit 7e79099
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
14 changes: 1 addition & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ env:
before_install:
- "[ -d ~/.distlib ] && sudo chown -R travis:travis ~/.distlib || true"

install:
- "if [[ $TOXENV == 'pypy' ]]; then sudo add-apt-repository -y ppa:pypy/ppa; fi"
- "if [[ $TOXENV == 'pypy' ]]; then sudo apt-get -y update && sudo apt-get -y install pypy; fi"
# This is required because we need to get rid of the Travis installed PyPy
# or it'll take precedence over the PPA installed one.
- "if [[ $TOXENV == 'pypy' ]]; then sudo rm -rf /usr/local/pypy/bin; fi"
- "if [[ $TOXENV == 'py34' ]]; then .travis/py34.sh; fi"
- sudo apt-get install subversion bzr mercurial
- echo -e "[web]\ncacerts = /etc/ssl/certs/ca-certificates.crt" >> ~/.hgrc
- git config --global user.email "python-virtualenv@googlegroups.com"
- git config --global user.name "Pip"
- pip install --upgrade setuptools
- pip install tox
install: .travis/install.sh

script: .travis/run.sh

Expand Down
23 changes: 23 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e
set -x

case $TOXENV in
py34)
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.4
;;
pypy)
sudo add-apt-repository -y ppa:pypy/ppa
sudo apt-get -y update
sudo apt-get -y install pypy
;;
esac

git config --global user.email "python-virtualenv@googlegroups.com"
git config --global user.name "Pip"

pip install --upgrade setuptools
pip install tox

0 comments on commit 7e79099

Please sign in to comment.