cd src

# Ensure FreeBSD build finds new, local math.h and complex.h
if [ "$UNAME" = FreeBSD ]; then
    export CPPFLAGS="$CPPFLAGS -I$SAGE_LOCAL/include"
fi

sdh_pip_install .

if [ "x$SAGE_SPKG_INSTALL_DOCS" = xyes ] ; then
   cd doc
   # checking to see if there is previously installed documentation.
   if [ -d $SAGE_LOCAL/share/doc/cvxopt/html ] ; then
      rm -rf $SAGE_LOCAL/share/doc/cvxopt/html
   fi
   mkdir -p "${SAGE_DESTDIR}${SAGE_LOCAL}/share/doc/cvxopt/html"
   cp -r html/* "${SAGE_DESTDIR}${SAGE_LOCAL}/share/doc/cvxopt/html/"
fi

