Skip to content

Instantly share code, notes, and snippets.

@binarymatt
Created July 26, 2012 19:17
Show Gist options
  • Save binarymatt/3183924 to your computer and use it in GitHub Desktop.
Save binarymatt/3183924 to your computer and use it in GitHub Desktop.
Developer Setup

Developer Setup

  1. Download Xcode from the mac app store

  2. Setup homebrew_:

    /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
    

    Then:

    brew tap homebrew/versions
    
  3. Install git:

    brew install git
    
  4. Install python2.7:

    brew install python
    
  5. Make sure that brew installed python is first in path (see here_)

    Prepend the following to the PATH variable in your .bashrc or .zshrc:

    /usr/local/share/python
    
  6. Install distribute:

    curl -O http://python-distribute.org/distribute_setup.py
    python distribute_setup.py
    
  7. Install pip:

    easy_install pip
    
  8. Install virtualenv:

    pip install virtualenv
    
  9. Install virtualenvwrapper:

    pip install virtualenvwrapper
    
  10. Make sure virtualenvwrapper is sourced by your shell environment, place the following into your .profile, .bashrc, or .zshrc:

    source /usr/local/bin/virtualenvwrapper.sh
    
  11. Install required libraries:

    easy_install numpy
    

    Then:

    brew install geos proj gdal postgresql postgis15
    
  12. Initialize a DB:

    initdb /usr/local/var/postgres
    
  13. May need to start postgres manually:

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
    

    Or stop:

    pg_ctl -D /usr/local/var/postgres stop -s -m fast
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment