Skip to content

Commit 807be5d

Browse files
committed
[travis] manually install py3 via brew on macOS
Copy of commit 189099c, was not able to cherry-pick it.
1 parent 4067d4a commit 807be5d

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

.travis.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,35 @@ before_install:
3030

3131
install:
3232
- export PYVER=${TRAVIS_PYTHON_VERSION:0:1}
33+
- if [ $PYVER = 3 ]; then
34+
export PYCMD=python3;
35+
export PIPCMD=pip3;
36+
else
37+
export PYCMD=python;
38+
export PIPCMD=pip;
39+
fi;
40+
3341
- if [ $COVERALLS = 1 ]; then
34-
pip install --upgrade coveralls;
42+
$PIPCMD install --upgrade coveralls;
3543
fi;
44+
3645
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
37-
which python;
46+
which $PYCMD;
3847
source venv/bin/activate;
39-
which python;
40-
fi
41-
- pip install lxml enum34 pyyaml
48+
brew upgrade python;
49+
which $PYCMD;
50+
fi;
51+
52+
- $PIPCMD install lxml enum34 pyyaml rdflib
4253

4354
script:
44-
- which python
45-
- python setup.py build
55+
- which $PYCMD
56+
- $PYCMD setup.py build
4657
- if [ $COVERALLS = 1 ]; then
4758
coverage${PYVER} run --source=odml setup.py test && coverage${PYVER} report -m;
4859
else
49-
python setup.py test;
60+
$PYCMD setup.py test;
5061
fi;
5162

5263
after_success:
53-
- if [ $COVERALLS = 1 ]; then coveralls; fi;
64+
- if [ $COVERALLS = 1 ]; then coveralls; fi;

0 commit comments

Comments
 (0)