if [ "`uname -s`" == "Darwin" ] ; then
  CONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk
fi

#Apply patches
git apply -v --whitespace=nowarn ${RECIPE_DIR}/patches/*.patch
#Ignore the changes when setting the version
# We only ignore files that were CHANGED by the patches, not any CREATED by the patches
for CIAO_IGNORE in "setup.cfg setup.py sherpa/__init__.py sherpa/astro/utils/src/_region.cc"
do
  git update-index --assume-unchanged ${CIAO_IGNORE}
done

#Build and install
python setup.py build
python setup.py install --prefix=$PREFIX

#Copy sherpa.t into the test directory
#Used in the CIAO regression system
mkdir -p ${PREFIX}/test/bin
cp ${RECIPE_DIR}/test/* ${PREFIX}/test/bin
