#!/bin/bash
set -eu

rm -rf install

# On OSX 10.6, gfortran gets installed in /usr/local/gfortran 
export CC="/usr/local/gfortran/bin/gcc"
export CXX="/usr/local/gfortran/bin/g++"

#download numpy first
git clone https://github.com/numpy/numpy.git

#install numpy
cd numpy
python setup.py build
python setup.py install
cd ..
python -c "import numpy; print 'Installed NumPy', numpy.__version__"
python -c "import numpy; numpy.test()"

#to be flagged by jenkins, we create an empty install dir: 
mkdir install
touch install/emptyfile

