[zpkg] Packaging a standalone zope3 package
Fred Drake
fred at zope.com
Mon Oct 24 10:20:34 EDT 2005
On Monday 24 October 2005 07:33, Lennart Regebro wrote:
> Maybe this test might help. At least, that's the point. :-)
>
> http://blogs.nuxeo.com/sections/blogs/lennart_regebro/2005_10_12_using-zpkg
I'd not seen this. :-)
Yes, zpkg can be quite complicated, because the problem domain is pretty
complicated. And the documentation certainly needs help (patches accepted!).
On the other hand, you made things more complicated than necessary for
yourself.
Instead of naming every package separately in your resource map, you could
have handled the zope package tree like this:
zope svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0/src/zope
zope.* svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0/src/zope/
That would take care of the entire package tree. It will also remove the
warning you got about the "zope" package not being locatable.
The reason it wants the zope package is simple: For any package, the
containing package is an implicit dependency; if you don't have it, you can't
import the sub-package. That doesn't mean you have to include it in the same
distribution, but the dependency is real.
Now, on the topic of the "zope" package itself: your blog contains a bit of
misinformation on that. The "zope" package is very small; it contains only a
README.txt, __init__.py, and some zpkg metadata. When zpkg constructs your
distribution, that's all it'll use for the zope package. When you install a
distribution built with zope.interface and friends (sub-packages of zope),
but not the zope package itself, none of those other packages can be
imported; an application using that installation will either fail with an
import error, or find some other zope package tree on sys.path and
potentially use an incompatible version.
I hope this actually helps. If you'd like to make clarifications to the
documentation, I'd certainly be interested in patches or specific
suggestions, and you're welcome to commit directly as well if you like.
-Fred
--
Fred L. Drake, Jr. <fred at zope.com>
Zope Corporation
More information about the zpkg
mailing list