Palladion Software
user icon Guest

Eggifying Zope

Building on Nathan Yergler's work from PyCon, I have just finished a big pile of eggs for both ZopeX3.0.0 and Zope 3.2.0.

Created by tseaver. Last modified 2006-04-05 19:04:42.


Part of the work I did was to reverse-engineer at least a minimal changelog for each of the packages (given the ZopeX3.0.0 version as "first release"). Please have a look:

A couple of notes on the process (summarized from my reply to Martijn Faassen earlier today):

Kickstarting a Package

There is some support for "kickstarting" an eggifying project. E.g.:

    $ export ZSVN=svn+ssh://
    $ svn cp -m "Eggify" $ZSVN/productsupport/trunk/project-template \

The top-level zope.foopackage will have a skeleton trunk, plus empty branches and 'tags':

    $ svn co $ZSVN/zope.foopackage/trunk zope.foopackage-trunk
    $ cd zope.foopackage-trunk
    $ ls -1

The text files are templates, and should be edited to fit.

The script will set up a local bin and lib directory inside your checkout, and try to install dependencies as specified in and setup.cfg (which it copies from It also jams the Zope egg URL into setup.cfg.

I usually run develop afterwards, as it is better at finding all the dependencies:

    $ PYTHONPATH=lib /path/to/your/python develop

The zope.testing package is supposed to be pulled in during that bootstrapping, but often seems missed (I haven't yet figured out why). Running the local easy_install does the trick:

    $ PYTHONPATH=lib /path/to/your/python bin/easy_install \

The src/zope directory is intended to contain a svn:externals pointer to the "canonical" location of the source (we may eventually reverse this, and make the main Zope tree point out at the top-level package directories). E.g.:

    $ svn propedit svn:externals src/zope
    #... add your external here
    $ svn up
    # ... fetches your external.

That src/zope directory also contains "setuptools / pkgutil" boilerplat namespace

    $ cat src/zope/
    # namespace package boilerplate
    except ImportError, e:
        from pkgutil import extend_path
        __path__ = extend_path(__path__, __name__)

The needs to be edited to point to your package. At that point, you should have all your package's dependencies installed (assuming that you named them in, and should be able to run the tests using your local eggs:

    $ PYTHONPATH=lib /path/to/your/python

Notes from the Road

Observations I jotted down while running through this process a dozen or so times:

Test Driving It

Give a dependency-driven install of a pile of packages a spin. E.g.:

    $ mkdir aside
    $ PYTHONPATH=aside \
      /path/to/setuptools/enabled/python /path/to/easy_install \
      --install-dir=aside \
      --find-links= \

That command kicks off an interesting process:


  1. Chris McDonough made a start on the ZODB-related packages. Investigate and merge:
    • BTrees
    • persistent
    • transaction
    • ThreadedAsync
    • ZEO
    • ZODB
    • ZConfig
    • zdaemon
  2. Build a meta-package which depends on all the ZODB and related stuff, and supplies the scripts to create storage server instances.
  3. Eggify packages which were not part of in 3.0.0 / 3.2.0 (avoidg because detangling the dependencies inside that beast is too painful to think about):
    • docutils (we should be able to use a stock one from the Cheese Shop, I think)
    • zope.cachedescriptors
    • zope.configuration
    • zope.dependencytool
    • zope.hookable
    • zope.importtool
    • zope.modulealias
    • zope.publisher
    • zope.server
  4. Build a meta-package which depends on all that and contains scripts for setting up a minimal Zope3 appserver instance.
  5. Look at packaging, prefereably using some kind of automated tool (maybe the zpkgegg stuff which Nathan prototyped?)
  6. Play with packaging some of the "extras" not present in those releases:
    • bugtracker
    • zwiki
    • zope.formlib
    • zope.contentprovider