Skip to content

Setting up your dev environment

OptimusCrime edited this page Sep 19, 2013 · 33 revisions

Install python-setuptools

sudo apt-get install python-setuptools

Install python-dev

sudo apt-get install libpq-dev python-dev

Install and initialize a virtual python environment

sudo pip install virtualenv || sudo apt-get install python-virtualenv

sudo pip install virtualenvwrapper || sudo apt-get install virtualenvwrapper

Add the following to your bashrc/zshrc file

export WORKON_HOME=~/.environments

source /usr/local/bin/virtualenvwrapper.sh

You might need to specify the python binary, and virtualenv's path might also be different. On ArchLinux I had to add the following:

export WORKON_HOME=~/.environments

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2

source /usr/bin/virtualenvwrapper.sh

Source your shell's configuration file

source ~/.zshrc || source ~/.bashrc

Continune in shell ...

mkvirtualenv onlineweb4

Clone the Onlineweb4 repo at a location of your choosing

git clone [email protected]:dotKom/onlineweb4.git

cd onlineweb4

pip install -r requirements.txt

If you want a node.js installation specific to your virtualenv

pip install nodeenv

Install node using nodeenv

nodeenv -v -p -v: Verbose, so you see stuff is happening. -p: Install inside activated virtualenv.

Reactivate your virtualenv

Install django-compressor's node modules

npm install -g less

If you want node.js globally available

Install node-js via your package manager (typically named nodejs)

Install the node module less via npm

npm install -g less

Run tests

nosetests tests/