Skip to content

Instantly share code, notes, and snippets.

@fyaconiello
Created February 9, 2012 17:22
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fyaconiello/1781374 to your computer and use it in GitHub Desktop.
Save fyaconiello/1781374 to your computer and use it in GitHub Desktop.
Django Lion Setup
Step 1 - download and install macosx pkgs
  • download and install xcode
  • XCode and enable Command Line Tools
  • download and install mysql-server
Step 2
nano ~/.bash_profile

add the following

export ARCHFLAGS="-arch x86_64"
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql/lib
export PATH=$PATH:/usr/local/mysql/bin
Step 3: install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
install GIT, required to update brew
brew install git
brew update
brew install bash-completion byobu ssh-copy-id wget
install pip + virtualenv
sudo easy_install pip
sudo pip install virtualenv
Install libjpeg (PIL req)
curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar -xvzf jpegsrc.v8c.tar.gz
cd jpeg-8c
./configure
make
sudo make install
cd ../
install freetype (more PIL requirements)
curl -O http://ftp.igh.cnrs.fr/pub/nongnu/freetype/freetype-2.4.5.tar.gz
tar -xvzf freetype-2.4.5.tar.gz
cd freetype-2.4.5
./configure
make
sudo make install
cd ../
Step 4: setup git
setup the public key
ssh-keygen -t rsa -C "user@teamcolab.com"
pbcopy < /User/user/.ssh/id_rsa.pub

log into http://github.com and paste from your clipboard into SSH Keys on GitHub.

ssh -T git@github.com
git config --global user.name "Bob Builder"
git config --global user.email "user@teamcolab.com"
git config --global core.autocrlf input
Step 5: setup first virtualenv

Create the first environment

mkdir ~/Sites/environments
cd ~/Sites/environments
virtualenv liftcaregiving

enter your new environment

source ~/Sites/environments/liftcaregiving/bin/activate

clone the lift repo and satisfy the requirements of that repo

cd ../Sites
git clone git@github.com:teamcolab/Lift--Caregiving.git
pip install -r ~/Sites/Lift--Caregiving/requirements.txt

You are up and running in magical land of v-envs!!

@jbscarbrough
Copy link

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" command changed

@eoleary
Copy link

eoleary commented Mar 10, 2013

+1 on Josh's comment

@fyaconiello
Copy link
Author

If you install sublime, run ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl to get the subl command line functionality

@eoleary
Copy link

eoleary commented Nov 8, 2013

In 10.9:

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11

@ralpheweotto
Copy link

Homebrew install url now:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@yohoGDES
Copy link

yohoGDES commented Oct 6, 2014

New Homebrew install:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@yohoGDES
Copy link

yohoGDES commented Oct 9, 2014

xcode-select --install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment