Commit b182b6e4 by Calen Pennington

Merge pull request #823 from MITx/hotfix/rocha/create-dev-for-os-x-10.8

Fix create-dev-env script for Mac OS 10.8 and latest stable rvm
parents 5b79352a 2c5047fd
......@@ -244,14 +244,18 @@ EO
brew install $pkg
}
done
# paths where brew likes to install python scripts
PATH=/usr/local/share/python:/usr/local/bin:$PATH
command -v pip &>/dev/null || {
output "Installing pip"
sudo easy_install pip
easy_install pip
}
if ! grep -Eq ^1.7 <(virtualenv --version 2>/dev/null); then
output "Installing virtualenv >1.7"
sudo pip install 'virtualenv>1.7' virtualenvwrapper
pip install 'virtualenv>1.7' virtualenvwrapper
fi
command -v coffee &>/dev/null || {
......@@ -267,18 +271,10 @@ EO
esac
output "Installing rvm and ruby"
curl -sL get.rvm.io | bash -s stable
curl -sL get.rvm.io | bash -s -- --version 1.15.7
source $RUBY_DIR/scripts/rvm
# skip the intro
LESS="-E" rvm install $RUBY_VER
if [[ $systempkgs ]]; then
virtualenv --system-site-packages "$PYTHON_DIR"
else
# default behavior for virtualenv>1.7 is
# --no-site-packages
virtualenv "$PYTHON_DIR"
fi
source $PYTHON_DIR/bin/activate
output "Installing gem bundler"
gem install bundler
output "Installing ruby packages"
......@@ -287,6 +283,16 @@ cd $BASE/mitx || true
bundle install
cd $BASE
if [[ $systempkgs ]]; then
virtualenv --system-site-packages "$PYTHON_DIR"
else
# default behavior for virtualenv>1.7 is
# --no-site-packages
virtualenv "$PYTHON_DIR"
fi
# change to mitx python virtualenv
source $PYTHON_DIR/bin/activate
if [[ -n $compile ]]; then
output "Downloading numpy and scipy"
......@@ -305,6 +311,19 @@ if [[ -n $compile ]]; then
rm -rf numpy-${NUMPY_VER} scipy-${SCIPY_VER}
fi
case `uname -s` in
Darwin)
# on mac os x get the latest distribute and pip
curl http://python-distribute.org/distribute_setup.py | python
pip install -U pip
# need latest pytz before compiling numpy and scipy
pip install -U pytz
pip install numpy
# fixes problem with scipy on 10.8
pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev
;;
esac
output "Installing MITx pre-requirements"
pip install -r mitx/pre-requirements.txt
# Need to be in the mitx dir to get the paths to local modules right
......@@ -354,4 +373,3 @@ cat<<END
END
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment