Egg on My Face

I mused yesterday that I needed to create eggs for the various ZODB-related packages: I was wrong.

In yesterday's post, I wrote:

Chris McDonough made a start on the ZODB-related packages. Investigate and merge:

  • BTrees

  • persistent

  • transaction

  • ThreadedAsync

  • ZEO

  • ZODB

  • ZConfig

  • zdaemon

Build a meta-package which depends on all the ZODB and related stuff, and supplies the scripts to create storage server instances.

Howver, EasyInstall is smarter than that: if I ask it to install the ZODB sdist tarball, it downloads it, and then creates and installs its own egg. E.g.:

$ mkdir -p zeoserver/bin zeoserver/lib/python
$ PYTHONPATH=zeoserver/lib/python /path/to/easy_install \
  --install-dir zeoserver/lib/python --script-dir zeoserver/bin \
  http://www.zope.org/Products/ZODB3.6/ZODB%203.6.0/ZODB3-3.6.0.tgz
Downloading http://www.zope.org/Products/ZODB3.6/ZODB%203.6.0/ZODB3-3.6.0.tgz
Processing ZODB3-3.6.0.tgz
Running ZODB3-3.6.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QswGXB/ZODB3-3.6.0/egg-dist-tmp-RyI0Ct
...
Installing zdctl.py script to zeoserver/bin
Installing zdrun.py script to zeoserver/bin

Installed /home/tseaver/projects/PyCon2006/eggification/sandbox/zeoserver/lib/python/ZODB3-3.6.0-py2.4-linux-i686.egg
Processing dependencies for ZODB3==3.6.0
$ cd zeoserver
$ mkdir instance
$ PYTHONPATH=lib/python bin/mkzeoinstance.py `pwd`/instance 9000
$ cd instance
$ bin/zeoctl start && tail +0f log/zeo.log
. daemon process started, pid=12744
------
2006-04-06T11:37:45 INFO root daemonizing the process
------
2006-04-06T11:37:45 INFO root set current directory: '/home/tseaver/projects/PyCon2006/eggification/sandbox/zeoserver/instance'
------
2006-04-06T11:37:45 INFO root daemon manager started
------
2006-04-06T11:37:45 INFO root spawned process pid=12744
------
2006-04-06T11:37:46 INFO ZEO.runzeo (12744) created PID file '/home/tseaver/projects/PyCon2006/eggification/sandbox/zeoserver/instance/var/ZEO.pid'
------
2006-04-06T11:37:46 INFO ZEO.runzeo (12744) opening storage '1' using FileStorage
------
2006-04-06T11:37:46 INFO ZEO.StorageServer (12744) StorageServer created RW with storages: 1:RW:/home/tseaver/projects/PyCon2006/eggification/sandbox/zeoserver/instance/var/Data.fs
------
2006-04-06T11:37:46 INFO ZEO.zrpc (12744) listening on ('', 9000)

Phillip Eby rocks!

Chunking the separate packages out into their own eggs is a way lower priority than just being able to add install_requires=['ZODB3 = 3.6.0'] to my meta-packages. Breaking them out would help adoption of those pieces outside of Zope, so it is still worth doing. Meanwhile, we can just drop the appropriate ZODB tarballs inside the distribution directory for each release, and get on with packaging the rest.