Fix TravisCI on Mac
@@ -47,20 +47,31 @@ before_install:
- ENERGYPLUS_DOWNLOAD_URL=$ENERGYPLUS_DOWNLOAD_BASE_URL/$ENERGYPLUS_DOWNLOAD_FILENAME.$EXT
- curl -SLO $ENERGYPLUS_DOWNLOAD_URL
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo hdiutil attach $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo installer -pkg /Volumes/$ENERGYPLUS_DOWNLOAD_FILENAME/$ENERGYPLUS_DOWNLOAD_FILENAME.pkg -target /; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo chmod +x $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "y\r" | sudo ./$ENERGYPLUS_DOWNLOAD_FILENAME.$EXT; fi
-
+ - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ sudo hdiutil attach $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT;
+ sudo installer -pkg /Volumes/$ENERGYPLUS_DOWNLOAD_FILENAME/$ENERGYPLUS_DOWNLOAD_FILENAME.pkg -target /;
+ fi
+ - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+ sudo chmod +x $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT;
+ echo "y\r" | sudo ./$ENERGYPLUS_DOWNLOAD_FILENAME.$EXT;
+ fi
- sudo rm $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT
# install python
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $PYTHON == 3* ]]; then brew install python3; fi
- # activate virtual env
- - if [[ $PYTHON == 2* ]]; then virtualenv venv -p python; fi
- - if [[ $PYTHON == 3* ]]; then virtualenv venv -p python3; fi
- - source venv/bin/activate
+ - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ brew update;
+ brew outdated pyenv || brew upgrade pyenv;
+ brew install pyenv-virtualenv;
+ pyenv install $PYTHON;
+ export PYENV_VERSION=$PYTHON;
+ export PATH="/Users/travis/.pyenv/shims:${PATH}";
+ fi
+
+ # actiate venv
+ - if [ "$TRAVIS_OS_NAME" == "osx" ]; then pyenv-virtualenv venv; fi
+ - if [ "$TRAVIS_OS_NAME" == "linux" ]; then virtualenv venv; fi
+ - source venv/bin/activate;
+ - python --version;
# coverage and testing requirements
- pip install --upgrade setuptools
