forked from stan-dev/pystan-wheels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
30 lines (28 loc) · 937 Bytes
/
config.sh
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
# 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.
if [ -n "$IS_OSX" ]; then
export CC=clang
export CXX=clang++
fi
echo "IN pre_build!"
SRC_DIR=pystan
pip install -r $SRC_DIR/requirements.txt
}
function run_tests {
SRC_DIR=../pystan
echo "sanity checks"
python -c "import sys; print('\n'.join(sys.path))"
python -c "import pystan"
pip install -r $SRC_DIR/requirements.txt
pip install -r $SRC_DIR/test-requirements.txt
if [ -n "$IS_OSX" ]; then
# bug affects certain combinations of numpy and scipy on os x
pip install -U numpy scipy
fi
echo "testing"
# only run one test to avoid exceeding travis time limit
JOBLIB_MULTIPROCESSING=0 python -m unittest pystan.tests.test_basic_array
}