mkzopeapp now called zopeproject ================================ After expressing my wish to `kill Zope instances`_ in a recent blog post, I had been discussing these ideas with Jim Fulton and Martijn Faassen. Their valuable feedback had led to some refactorings of ``mkzopeapp``, the tool that would set you up with a Zope development sandbox (which would basically replace instances as a concept). Last week at EuroPython_, I presented my ideas in a lightning talk and a 45-min brainstorming session with quite a few Zope and non-Zope folks. Especially the input from people like `James Gardner`_ of Pylons fame and Ignas Mikalajunas from the SchoolTool project was quite useful. This feedback led to even further refactorings of ``mkzopeapp``. In particular, I dumped ``zope.paste`` for defining the application factory. Instead, each newly created application now contains its own application factory. It is only a few lines long: it processes ``zope.conf``, loads ``site.zcml`` and opens the ZODB databases. The great thing is that developers now have much more control over what happens at startup and how they can configure their application from the PasteDeploy INI file. In particular, it will be much easier to write ZODB-less applications this way. At the sprint after the conference, my main task was to bring Grok over to Zope 3.4 eggs. I subsequently improved ``grokproject``, the sandbox creation tool we had for Grok, and I realized that it shared a lot of infrastructure with ``mkzopeapp``. I therefore factored this common infrastructure out into ``mkzopeapp``, now called zopeproject_. ``grokproject`` (or at least a branch of it, for now) now merely uses ``zopeproject`` for the heavy lifting. .. _kill Zope instances: http://www.z3lab.org/sections/blogs/philipp-weitershausen/2007_07_07_death-to-instances .. _James Gardner: http://www.jimmyg.org .. _EuroPython: http://www.europython.org .. _zopeproject: http://cheeseshop.python.org/pypi/zopeproject From the ``zopeproject`` README: -------------------------------- With ``zopeproject`` you can start a new Zope-based web application from scratch with just a two commands:: $ easy_install zopeproject $ zopeproject MyZopeProj This will ask you the name and password for an initial administrator user. It will also ask you where to put the Python packages ("eggs") that it downloads. This way multiple projects created with ``zopeproject`` can share the same packages and won't have to download them each time. After asking the questions, ``zopeproject`` will download the ``zc.buildout`` package that will be used to build the sandbox, unless ``zc.buildout`` is already installed locally. Then it will invoke ``zc.buildout`` to download Zope and its dependecies. If you're doing this for the first time or not sharing packages between different projects, this may take a while. When ``zopeproject`` is done, you will find a typical Python package development environment in the ``MyZopeProj`` directory: the package itself (``myzopeproj``) and a ``setup.py`` script. There's also a ``bin`` directory that contains scripts, such as ``paster`` which can be used to start the application:: $ cd MyZopeProj $ bin/paster serve deploy.ini