#!/bin/bash

if [[ (`uname` == Darwin) && ($NOMKL == 0) ]]; then
    export ATLAS=1
    export LDFLAGS="-headerpad_max_install_names $LDFLAGS"
fi

if [ `uname` == Darwin ]; then
    source /localdisk/tools/intel/compilers_and_libraries_16.0.3/mac/bin/compilervars.sh intel64
    export MACOSX_DEPLOYMENT_TARGET=10.10
fi


$PYTHON setup.py config --compiler=intelem install 
if [ `uname` == Linux ]; then
    intel-libpatch.sh
fi
$PYTHON setup.py bdist_wheel
cp dist/scikit_learn*.whl ../../

rm -rf $SP_DIR/scikits
