Skip to content
nityaoberoi edited this page Apr 11, 2012 · 2 revisions

Before You Begin...

Make sure you have the following installed. If you install something from this list, read all of the instructions or pay the consequences!

  • Command Line Tools for Xcode or Xcode - Available at the Apple Dev Center. Command Line Tools for Xcode is a smaller package but is only available for OS X Lion or higher, if you don't have it, download and install Xcode.
  • Curl - Should come shipped with OS X but do a which curl to make sure.
  • Homebrew - Download and install at http://mxcl.github.com/homebrew. Please follow the instructions carefully and place your Brew directory (/usr/local/bin by default) at the beginning of your $PATH.

Brew packages to install

When you install Brew packages, make sure to read all terminal output to see if there are additional instructions.

  • Python - brew install python (Make sure to add /usr/local/share/python to your $PATH so your easy_install is for this version of Python and /usr/local/lib/python2.7/site-packages to your $PYTHONPATH so you can import the python libs installed from brew)
  • PostGres -- brew install postgres (Make sure to follow the brew caveats and don't set a password, i.e. leave the password field blank)
  • Git - brew install git
  • django autocomplete - brew install bash-completion and then curl https://raw.github.com/django/django/master/extras/django_bash_completion > /usr/local/etc/bash_completion.d/django_bash_completion

Global Python Packages

  • pip - Python package manager. Install with easy_install pip.
  • mercurial - some of our python dependencies at "requirements" files needs mercurial to fetch the packages. Install with pip install mercurial
  • virtualenv - pip install virtualenv

Setting up virtualenv

Create the virtual environment with:

$ mkdir ~/AgOps
$ cd ~/AgOps
$ virtualenv --python=/usr/local/bin/python agops-env

The --python flag ensures that you are using the Homebrew version of Python and not some other version that may be installed.

After creating the virtualenv, go into it and activate it.

$ cd agops-env
$ . bin/activate
$ git clone 
$ cd agops

Setup dev rebasing

$ git config branch.dev.rebase true

Try it out!

If you made it this far, go ahead and run the server.

$ ./manage.py runserver