Skip to content

Commit 8bf9302

Browse files
Update .travis.yml
1 parent da64663 commit 8bf9302

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.travis.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,38 @@ addons:
2121

2222
before_install:
2323
- |
24+
PIP=pip
25+
PY=python
2426
if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.9 CC=gcc-4.9; fi
25-
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "${PYTHON:0:1}" = "3" ]; then
26-
brew update
27-
brew install python3
28-
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -;
29-
rvm get stable
27+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
28+
brew update
29+
brew install gcc
30+
PIP=pip2
31+
PY=python2
32+
if [ "${PYTHON:0:1}" = "3" ]; then
33+
brew upgrade python
34+
brew install sashkab/python/python$PYTHON
35+
PIP=pip3
36+
PY=python3
37+
fi
3038
fi
31-
pip install --user --upgrade pip virtualenv
32-
virtualenv -p python venv
39+
$PIP install --user virtualenv
40+
virtualenv -p $PY venv
3341
source venv/bin/activate
42+
$PIP install --upgrade pip
3443
3544
install:
3645
- |
37-
travis_wait travis_retry pip install -r python_bindings/requirements.txt
38-
travis_retry cd python_bindings && python setup.py build install && cd ..
46+
travis_wait travis_retry $PIP install -r python_bindings/requirements.txt
47+
travis_retry cd python_bindings && $PY setup.py build install && cd ..
3948
4049
script:
50+
- $PY --version
51+
- $PIP --version
4152
- |
4253
set -e
4354
cd python_bindings
44-
python setup.py test
55+
$PY setup.py test
4556
cd ..
4657
4758
cache:

0 commit comments

Comments
 (0)