File: config.sh

package info (click to toggle)
compreffor 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 416 kB
  • sloc: python: 1,832; cpp: 1,065; makefile: 34; sh: 13
file content (26 lines) | stat: -rw-r--r-- 792 bytes parent folder | download | duplicates (2)
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
# Define custom utilities
# Test for OSX with [ -n "$IS_OSX" ]

function pre_build {
    # Any stuff that you need to do before you start building the wheels
    # Runs in the root directory of this repository.
    :
}

function run_tests {
    # The function is called from an empty temporary directory.
    # Get absolute path to the pre-compiled wheel
    wheelhouse=$(abspath ../wheelhouse)
    wheel=`ls ${wheelhouse}/compreffor*.whl | head -n 1`
    if [ ! -e "${wheel}" ]; then
        echo "error: can't find wheel in ${wheelhouse} folder" 1>&2
        exit 1
    fi

    # select tox environment based on the current python version
    # E.g.: '2.7' -> 'py27-cov'
    TOXENV="py${MB_PYTHON_VERSION//\./}"

    # Runs tests on installed wheel
    tox --installpkg $wheel -e $TOXENV
}