Skip to content

Commit

Permalink
[travis] disable shell script for py installation on osx ...
Browse files Browse the repository at this point in the history
move stuff to main script.
  • Loading branch information
jgrewe authored and JuliaSprenger committed Mar 15, 2018
1 parent 7bae3af commit 962f661
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ matrix:
# env:
# - OSXENV=2.7

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash resources/install_osx_virtualenv.sh; fi

install:
- export PYVER=${TRAVIS_PYTHON_VERSION:0:1}
- if [ $PYVER = 3 ]; then
Expand All @@ -43,10 +40,18 @@ install:
fi;

- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
which $PYCMD;
source venv/bin/activate;
brew upgrade python;
which $PYCMD;
if [[ "$OSXENV" == "2.7" ]]; then
brew install python@2;
virtualenv venv -p python;
source venv/bin/activate;
export PYCMD=python;
export PIPCMD=pip;
else
brew upgrade python;
source venv/bin/activate;
export PYCMD=python3;
export PIPCMD=pip3;
fi;
fi;

- $PIPCMD install lxml enum34 pyyaml rdflib
Expand Down
9 changes: 8 additions & 1 deletion resources/install_osx_virtualenv.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
#!/bin/bash

echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
echo Running install_osx_virtalenv.sh
python --version;
echo travis python version: $TRAVIS_PYTHON_VERSION
echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then

brew update;

if [[ "$OSXENV" == "2.7" ]]; then
echo python 2.7
brew install python;
virtualenv venv -p python;
source venv/bin/activate;
else
echo some other version
brew install python3;
virtualenv venv -p python3;
source venv/bin/activate;
export PYCMD=python3;
export PIPCMD=pip3;
fi
fi

Expand Down

0 comments on commit 962f661

Please # to comment.