How do I set up the environment?
Installing easy_install
easy_install allows you to install python packages from the command line:
# download and install easy_install as root
$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ sudo python2.4 ez_setup.py
Installing virtualenv
This package allows you to have an isolated python environment on which you can work without root privileges:
$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ sudo python2.4 ez_setup
$ sudo easy_install-2.4 virtualenv
Creating the virtual environment
Once installed virtualenv you can create your virtual environment:
$ virtualenv ~/myenv
$ cd ~/myenv
# activate the environment
$ source bin/activate
From now on, every thing we'll do will be done inside ~/myenv after sourcing ~/myenv/bin/activate
Installing zc.buildout
zc.buildout is a program to build python application based in its parts. It leverages you from searching and installing the necessary zope packages for deployment and development:
$ easy_install zc.buildout
Since you'll be using buildout for each instance you deploy and each package you develop, it is convenient to configure it to download all their dependencies in the same folder, so each project can share the pieces it have already downloaded:
$ mkdir ~/.buildout
$ touch ~/.buildout/default.cfg
The content of ~/.buildout/default.cfg is:
[buildout]
eggs-directory = /home/myhome/myenv/lib/python2.4/site-packages/
