travis_osx_steps.sh 1.22 KB
Newer Older
1
#!/bin/bash
2
# Wheel build, install, run test steps on OSX
3
4
5
set -e

# Get needed utilities
6
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
7
MB_PYTHON_VERSION=${MB_PYTHON_VERSION:-$TRAVIS_PYTHON_VERSION}
8
9
ENV_VARS_PATH=${ENV_VARS_PATH:-env_vars.sh}

10
# These load common_utils.sh
Matthew Brett's avatar
Matthew Brett committed
11
source $MULTIBUILD_DIR/osx_utils.sh
12
# osx_utils defines MACPYTHON_DEFAULT_OSX
Rob Buckley's avatar
Rob Buckley committed
13
MB_PYTHON_OSX_VER=${$MB_PYTHON_OSX_VER:-$MACPYTHON_DEFAULT_OSX}
14
if [ -r "$ENV_VARS_PATH" ]; then source "$ENV_VARS_PATH"; fi
15
source $MULTIBUILD_DIR/configure_build.sh
16
source $MULTIBUILD_DIR/library_builders.sh
17

18
19
# NB - config.sh sourced at end of this function.
# config.sh can override any function defined here.
20
21

function before_install {
22
23
    # Uninstall oclint. See Travis-CI gh-8826
    brew cask uninstall oclint || true    
24
25
    export CC=clang
    export CXX=clang++
26
    get_macpython_environment $MB_PYTHON_VERSION $MB_PYTHON_OSX_VER venv
27
28
29
30
    source venv/bin/activate
    pip install --upgrade pip wheel
}

31
# build_wheel function defined in common_utils (via osx_utils)
32
# install_run function defined in common_utils
33
34

# Local configuration may define custom pre-build, source patching.
35
# It can also overwrite the functions above.
36
37
CONFIG_PATH=${CONFIG_PATH:-config.sh}
source "$CONFIG_PATH"