[Zope3-dev] Package organization quandry

Patrick K. O'Brien pobrien@orbtech.com
Fri, 17 May 2002 12:12:26 -0500


[Barry A. Warsaw]
> But, referring back to the spaghetti thread (!), if the PageTemplate
> package is to be usable outside of Zope, I really want to see that
> spelled:
>
>     from PageTemplate.PageTemplateFile import PageTemplateFile
>
> IOW, code that uses PageTemplate should not have to prepend it with a
> Zope package prefix.  You accomplish this by developing the
> PageTemplate package as a distutils package outside of any Zope
> context.  Then Zope's build procedure uses "setup.py install" with
> some magic options <wink> to install that in a directory that Zope
> guarantees is on sys.path before site-packages, e.g. lib/python in
> Zopespeak.
>
> Note that this approach means that "Zope" (whatever that ends up
> meaning, probably the sumo tarball distribution) has its own blessed
> copies of independent packages, never installs them in site-packages,
> and actually never cares if someone else on the machine /has/
> installed them independently in site-packages because Zope's never
> gonna look there.

+10

Especially as it relates to zodb, btrees, indexing and catalogues and other
goodies that I am interested in using outside of Zope. Even better is if I
can CVS each of these independently into my "code" directory (which is on
the python path) as python packages and start using them without having to
install them with distutils or move them or modify my pythonpath.

---
Patrick K. O'Brien
Orbtech