Created
June 5, 2013 01:25
-
-
Save mprentice/5710992 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Currently works for Mac OS X 10.8: Mountain Lion | |
set -e | |
venvbin="`which virtualenv`" | |
if [ "$venvbin" = "" ] ; then | |
echo "Aborting (cannot find virtualenv)" >&2 | |
exit 1; | |
fi | |
brewbin="`which brew`" | |
swigbin="`which swig`" | |
if [ "$swigbin" = "" ] ; then | |
if [ "$brewbin" = "" ] ; then | |
echo "Aborting (cannot find swig or homebrew)" >&2 | |
exit 1; | |
fi | |
"$brewbin" install swig | |
fi | |
fortranbin="`which gfortran`" || true | |
fortranver="`\"$fortranbin\" --version | head -1`" | |
if [[ ! "$fortranver" =~ " 4\\.2" ]] ; then | |
if [ "$brewbin" = "" ] ; then | |
echo "Aborting (cannot find homebrew)" >&2 | |
exit 1; | |
fi | |
gforver="4.2.4-5666.3" | |
echo "Switching to gfortran $gforver for scipy ..." | |
"$brewbin" switch gfortran $gforver | |
fi | |
if [ ! -d VIRT ] ; then | |
"$venvbin" VIRT | |
fi | |
source VIRT/bin/activate | |
pip install numpy | |
pip install Cython | |
pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev | |
pip install git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev | |
easy_install readline | |
pip install ipython |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment