Zope 3 installation layouts (Re: [Zope3-dev] ex zopeproducts directory
in CookBook)
Jim Fulton
jim at zope.com
Thu Apr 22 11:33:03 EDT 2004
Paolo Invernizzi wrote:
> Hi all,
>
> I'm rereading (again) excellent Stephan's recipes, trying to assimilate
> more and more zope concepts faster, and in the meantime trying to
> fix-out the old or refactored stuff that my limited knowledge can found.
>
> In the 'Writing a new Content Object', Stephan starts the build of a
> MessageBoard content type, and he introduce the concept of
> 'zopeproducts' directory.
>
> I've understood that, now, we need a 'messageboard-configure.zcml' in
> the 'package-includes' directory, but I've not understood the actual
> policy about 'where' to create the package itself.
>
> Should I consider Zope3/src/messageboard a suitable location?
Are you asking about where things should go in the Zope CVS? Or where people
should plan to install 3rd-party packages in Zope installations?
For packages included in the Zope CVS:
- If a package is meant to be an example, it should be a top-level
package in src. The package name should reflect the demon-ness,
as in buddydemo. It should be a top-level package because that's simplest
and what many developers will do. It should have a name with "demo" in it
to make it's purpose clear and to get a flaw in Python's packaging system. :)
- If a package is simply a useful add on, it should go in zope.app. This reflects
it's dependence on Zope and arranges that it will be tested along with
"core" packages.
For 3rd-party packages, the answer will depend on how we finally decide to
organize Zope installations. Here's what we are thinking:
- When you install a Zope distribution, the software will be installed
into some location via:
$ configure
$ make
$ make install
as is done for Zope 2.
We will still call this the software home.
Note that this will have a lib/python directory rather than a src directory. This
is to be consistent with distutil's notion of "home" directories.
We may change the CVS repository to use lib/python too.
- After installing the software, you'll be able to create instance homes, just
like you can with Zope 2. Instance homes too will be arranged according to
distutils' expectations of home directories. So, for example, instance homes will
have lib/python directories
3rd-party packages will be distutils-based packages build with a tool that Fred Drake
is working on. You will istall these like any other distutils packages. In particular:
- By default, they will install into your Python installation (site-packages)
A problem with this option is that the zcml include file can't be created.
We'll need to give some though to this.
- You will be able to supply a --home option to install the packages into a software
home or an instance home.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list