Skip to content

Commit 4e4eeb7

Browse files
committed
[travis] fix mac osx virtualenv
1 parent c29db39 commit 4e4eeb7

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.travis.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ matrix:
1818
- os: osx
1919
language: generic
2020
env:
21-
- OSXENV=3.5
21+
- OSXENV=3.5.0
2222
- os: osx
2323
language: generic
2424
env:
25-
- OSXENV=3.6
25+
- OSXENV=3.6.0
2626
- os: osx
2727
language: generic
2828
env:
29-
- OSXENV=2.7
29+
- OSXENV=2.7.14
3030

3131
install:
3232
- export PYVER=${TRAVIS_PYTHON_VERSION:0:1}
@@ -43,18 +43,20 @@ install:
4343
fi;
4444

4545
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
46-
if [[ "$OSXENV" == "2.7" ]]; then
47-
brew install python@2;
48-
virtualenv venv -p python;
49-
source venv/bin/activate;
50-
export PYCMD=python;
51-
export PIPCMD=pip;
52-
else
53-
brew upgrade python;
54-
source venv/bin/activate;
55-
export PYCMD=python3;
56-
export PIPCMD=pip3;
57-
fi;
46+
brew update;
47+
brew install pyenv;
48+
brew upgrade pyenv;
49+
brew install pyenv-virtualenv;
50+
eval "$(pyenv init -)";
51+
eval "$(pyenv virtualenv-init -)";
52+
pyenv install $OSXENV;
53+
pyenv virtualenv $OSXENV venv;
54+
pyenv activate venv;
55+
which python;
56+
python --version;
57+
which pip;
58+
export PYCMD=python;
59+
export PIPCMD=pip;
5860
fi;
5961

6062
- $PIPCMD install lxml enum34 pyyaml rdflib

0 commit comments

Comments
 (0)