# Require $prefix, $workdir, $numpy_src
install_numpy()
(
  python3 -c "import numpy" &> /dev/null && return

  [[ "$workdir" = */hscpipe_build_dir ]] || exit 1
  rm -rf "$workdir"; mkdir -p "$workdir"; pushd "$workdir"

  curl -L "$numpy_src" | tar -xzf -

  cd *

  cat > site.cfg << __eof__
[openblas]
libraries = openblas
library_dirs = $prefix/lib
include_dirs = $prefix/include
runtime_library_dirs = $prefix/lib
__eof__

  python3 setup.py build
  python3 setup.py install
)
