Describing how to setup a development environment on you local computer.
This section is meant for new developers on the eestec.net project. It’s purpose is to guide them through the steps needed to start contributing.
First let’s look at ‘system’ libraries and applications that are normally installed with your OS packet manager, such as apt, aptitude, yum, etc.
Then you’ll also need to install some Python specific tools (if you did not use the Unified installer):
If you experience problems read through the following links as almost all of the above steps are required for a default Plone development environment:
http://plone.org/documentation/tutorial/buildout
http://pypi.python.org/pypi/zc.buildout/
http://pypi.python.org/pypi/setuptools
http://plone.org/documentation/tutorial/installing-plone-3-with-the-unified-installer
Go to your home folder or a folder you use for development and create a new isolated python environment called eestec.
[you@local ~]$ mkdir <work_folder>
[you@local ~]$ virtualenv -p python2.4 --no-site-packages eestec
Now cd into the newly created environment and fetch all code that we need to run the project.
[you@local ~]$ cd eestec
[you@local eestec]$ svn checkout https://svn.plone.org/svn/collective/eestec.buildout/trunk/ .
First check you are really using Python 2.4.
[you@local eestec]$ bin/python -V
Python 2.4.6
The next step bootstrapts all necessary tools in ~/work/eestec/bin.
[you@local eestec]$ bin/python bootstrap.py
Buildout first builds Zope and any other servers we might need, then fetches all dependencies and installs them. Read more about buildout at http://plone.org/documentation/tutorial/buildout.
[you@local eestec]$ bin/buildout -v
Go make some tea. Buildout needs about 10 minutes to finish preparing your development environment.
Download data from http://docs.eestec.net/Data.fs to your local installation so you have a basis to work on.
[you@local eestec]$ wget http://docs.eestec.net/Data.fs.tar.gz
[you@local eestec]$ tar -xzvf Data.fs.tar.gz
[you@local eestec]$ mv Data.fs var/filestorage/
Now let’s start Zope - the application server. There are several ways to start Zope. For development purposes we’ll use the ‘foreground’ mode which starts Zope in console’s foreground so you can immediately see all debug messages and use the Python Debugger to interactively debug your code.
[you@local eestec]$ bin/zope fg
Once Zope has started you can now access our application. Open up your browser and point it to http://localhost:8080/dev. This should give you a local copy of eestec.net. You can play with this in any way you want because it’s running on your local machine and does not effect what is on ETHZ server in Zurich.
Besides the main URL you have the following options of accessing the application:
Password for Zope Manager user (aka. dev user) is available on ETHZ server, in ~/.passwords.txt.
Read and follow http://blog.mfabrik.com/2010/07/16/easily-install-all-python-versions-under-linux-and-osx-using-collective-buildout-python/.
This will compile a separate and isolated Python for you. Now you can use it for your development and be isolated from your system python fuckups.
[you@local ~]$ cd ~/work
[you@local work]$ <path_to_collective.buildout.python_installation>/bin/virtualenv-2.4 --no-site-packages eestec
[you@local eestec]$ cd eestec/
[you@local eestec]$ bin/python -V
Python 2.4.6
If you are using virtualenv and do not have lxml on your system just follow this tutorial: Compiling lxml/libxml2/libxslt for a virtualenv http://digita.la/2010/6/2/compiling-lxml-libxml2-libxslt-for-a-virtualenv