Homebrew [ http://brew.sh/ ]
It all begins with Homebrew. This setup uses Homebrew for almost everything, including things your Mac ships with, like Python.
Managing everything in Homebrew lets us use the most up-to-date packages available, and means we are not subject to any customizations, however small, Apple makes to their packaged software.
First, either install the latest version of Xcode, or, if you don't want the full bloat of Xcode, you can just install Apple's Command Line Tools standalone. Either way - just make sure you have Command Line Tools - Homebrew will tell you if you don't have it.
Then, get Homebrew.
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Now we have Homebrew, let's build out our development environment.
First, always make sure that Homebrew is up-to-date.
brew update brew upgrade
brew install python --framework # and, if you additionally want Python 3 brew install python3 --framework
brew install node
brew install leiningen
brew install git git-flow mercurial svn
A basic set of tools covering data storage, serving, and testing.
brew install redis postgresql mongodb nginx phantomjs casperjs
At some point in time around the time that postgres 9.3 came out, I had to make more changes for postgres to work. I think this was related to upgrading to a new version of postgres. I had to do this:
initdb /usr/local/var/postgres -E utf8
And below, I'm going to install Salt Stack, which is an awesome tool for server deployment and remote execution. Salt requires some system dependencies, so install these to use Salt.
brew install swig zeromq
I regularly do projects that require internationalization and localization. In one way or another, tools higher up in the chain all require gettext.
brew install gettext
We need some libraries to work with images in python code.
brew install libjpg libpng
I only use Emacs for audio synthesis programming with Clojure, using the emacs-live configuration.
brew install emacs
And then follow here for configuring Emacs Live: http://overtone.github.io/emacs-live/doc-installation.html
These requirements should be ignored if you are not doing audio synthesis programming.
brew install jack portaudio portmidi libsndfile liblo
pip is a Python package manager, and it should be preferred to other ways of managing Python dependencies.
In general, each Python project should have its own virtual environment, and inside, its own particular dependencies. To support this, we do need to install a couple of Python packages globally.
pip install virtualenv virtualenvwrapper
Now that virtualenv and virtualenvwrapper are installed with our global Python, the shell session needs to know about it.
Add the following to your User's .bash_profile.
# this goes in ~/.bash_profile export PYTHONIOENCODING=utf-8 export WORKON_HOME="/Users/<YOUR_USERNAME>/code/environments" export PROJECT_HOME="/Users/<YOUR_USERNAME>/code/projects" source /usr/local/bin/virtualenvwrapper.sh export PIP_VIRTUAL_ENV_BASE=$WORKON_HOME
Save those changes, and then to pick them up in your current shell seesion, you need to source the file.
source ~/.bash_profile
Now, we'll create some directories to support this virtualenv configuration.
mkdir ~/code mkdir ~/code/projects mkdir ~/code/environments
If you get any returned errors up to here, something is wrong with the virtualenv configuration.
It is sometimes useful to have some remote execution tools with our global Python.
I am currently using Fabric.
pip install fabric
Interactive Python is also nice. Even though I don't really use it much for web development, I like to have it around, as I hope to give iPython Notebooks a try to data analysis projects one day.
pip install ipython
npm is the node package manager.
Less is a CSS pre-compiler. I think it is amazing.
npm install -g less
Using npm, a package manager, to install other package managers.
npm install -g volo bower
npm -g install closurecompiler uglify-js
https://developers.google.com/cloud/sdk/
Vagrant is for configuring whole development environments, OS and all, for development and production.
Once Vagrant is running on your system, install the Salt plugin for Vagrant.
vagrant plugin install vagrant-salt
Vagrant uses Virtual Box.