How to package a Zope3 application tarball in 3 easy steps

Assumptions:

  • You don’t have root/admin account on the system.
  • You are a clueless Zope3 newbie.

Step 1: Install zc.buildout, zopeproject and zc.sourcerelease.

  • download http://svn.colorstudy.com/virtualenv/trunk/virtualenv.py
  • $ python2.4 virtalenv.py my_sandbox
  • $ cd my_sandbox
  • $ bin/easy_install zc.sourcerelease zc.buildout zopeproject

Step 2: Create a Zope3 application.

I do the –no-buildout thing because I want to modify the default buildout.cfg to use KGS before building the thing.

  • $ bin/zopeproject zcontact --no-buildout
Enter user (Name of an initial administrator user): manager
Enter passwd (Password for the initial administrator user): zcontact
Enter eggs_dir (Location where zc.buildout will look for and place packages)
  ['/home/ignas/buildout-eggs']: eggs
  • now, to fix the buildout.cfg so it would not use site-packages from your system to get Improved Reliability™, add
[virtualpython]
recipe = tl.buildout_virtual_python
headers = true
executable-name = vp
  • make [buildout] section look like this:
[buildout]
index = http://download.zope.org/zope3.4
develop = .
parts = virtualpython app test
newest = false
eggs-directory = eggs
  • and finally add this line to both [test] and [app] blocks:
python = virtualpython

Step 3: Package the thing.

  • $ bin/buildout-source-release file:///home/ignas/src/zcontact buildout.cfg

You’ll get a zcontact.tgz in the current directory. Your users can
download it, extract and run python2.4 install.py to get a working
application.

Leave a Reply