summaryrefslogtreecommitdiff
path: root/tools/travis/osx_install.sh
blob: e5f13bcc1ee93e88a051a9f953f73b61f2410a72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
set -ex

# set up Miniconda on OSX
if [[ "${OSX_PKG_ENV}" == miniconda ]]; then
    wget https://repo.continuum.io/miniconda/Miniconda3-4.3.21-MacOSX-x86_64.sh -O miniconda.sh
    bash miniconda.sh -b -p $HOME/miniconda
    export PATH="$HOME/miniconda/bin:$PATH"
    hash -r
    conda config --set always_yes yes --set changeps1 no
    conda update -q conda
    # Useful for debugging any issues with conda
    conda info -a

    conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION decorator
    source activate testenv
else
    # set up Python and virtualenv on OSX
    git clone https://github.com/matthew-brett/multibuild
    source multibuild/osx_utils.sh
    get_macpython_environment $TRAVIS_PYTHON_VERSION venv
fi

if [[ "${OPTIONAL_DEPS}" == 1 ]]; then
    if [[ "${OSX_PKG_ENV}" == miniconda ]]; then
        conda install graphviz=2.38
        export PKG_CONFIG_PATH=/Users/travis/miniconda/envs/testenv/lib/pkgconfig
    else
        brew install graphviz
    fi
    dot -V
    sed -i "" 's/^gdal.*/gdal==2.3.0/' requirements/extras.txt
fi

set +ex