repoze in Development Mode
The repoze.project helper application makes setting up a
sandbox environment for a repoze-based application easy.
For instance, the following commands creat a repoze.plone
sandbox, including Plone 3.0.1 and all its dependencies.
If you have already installed
setuptools in your Python environment, you can just do:
$ bin/easy_install -f http://dist.repoze.org repoze.project
$ bin/repozeproject repoze.plone --path=/tmp/plone
Otherwise, on UNIX machine that has the capability of compiling Python software (e.g. gcc is installed and working and Python development libraries are installed):
$ wget http://dist.repoze.org/repoze.project-0.0.4.tar.gz
$ tar xzf repoze.project-0.0.4.tar.gz
$ cd repoze.project-0.0.4/
$ /path/to/bin/python setup.py install
$ /path/to/bin/repozeproject repoze.plone --path=/tmp/plone
The actions that are taken when this command is issued are as follows:
- a "virtual Python" will be installed within the "/tmp/plone"
directory. Packages installed to this virtual Python's
site-packagesdirectory will not conflict with packages installed into your "normal" Python'ssite-packagesdirectory. - The
setuptoolsandvirtualenvpackages (dependencies) will be downloaded and installed to your new virtual Python's site-packages directory, as willrepoze.projectitself. - All packages required by repoze.plone will be downloaded,
compiled, and installed as Python eggs in the virtual Python's
site-packagesdirectory. The "repoze.plone" package will be installed into the virtual Python's site-packages directory as a "development egg". -
Products,logs,var, andetcdirectories will be created inside the sandbox directory.Productsis where non-egg 3rd party Zope products should be installed.logsis where Zope logs will go,varis where ZODB data files will go,etcis where config files are placed. - A sample set of configuration files will be installed into the
sandbox directory's
etcsubdirectory. These include:-
zope2.ini, a Paste configuration file used to establish the Paste (WSGI) pipeline which defines the deployment environment. -
zope.conf, a classic Zope 2 configuration file which can be used to adjust Zope settings. -
site.zcml, a boilerplate site.zcml that should be used to control ZCML processing.
-
Once the sandbox command is finished processing, you may run the derived server by executing:
$ cd /tmp/plone
$ bin/addzope2user admin admin
$ bin/paster serve etc/zope2.ini
It's likely that warnings will be shown after the addzope2user and paster command are executed, ignore these. A server will eventually be started on port 8080. If you visit the "http://localhost:8080/" URL, you will see the Zope QuickStart page. You can log into the ZMI as the admin user (password admin), and create a Plone Site by selecting it from the ZMI "Add" list dropdown. When that's done, you should be able to use the Plone site as like any other.

The important deviations from the standard Zope/Plone installment and deployment process are as follows:
- A virtual Python environment is created, based on the python
used to execute the setup.py sandbox command. Its
site-packagesdirectory is pristine. - All Python packages are packaged and deployed as Python eggs and
placed into the virtual Python's
site-packages. - Zope is being served up via a WSGI server (currently the reimplemented ZServer wsgihttpserver in zope3).
- A middleware pipeline is configured to include: error handling, a transaction manager, retry middleware, and virtual hosting middleware "in front" of Zope and Plone (see etc/zope2.ini).
- ZPublisher is not publishing Zope 2. Instead
repoze.zope2emulates ZPublisher's publishing machinery and publishes Zope. The only ZPublisher code used byrepoze.zope2is the Zope 2 HTTPRequest and HTTPResponse classes.
