[ZODB-Dev] RE: [Zope-Coders] revising layout of ZODB3 checkout

Jeremy Hylton jeremy at alum.mit.edu
Thu Jan 8 23:34:54 EST 2004


On Thu, 2004-01-08 at 22:43, Tim Peters wrote:
> [Jeremy Hylton]
> > Several people have had problems with the current layout of source
> > code within a ZODB3 checkout and, hence, a source distribution.  The
> > problem is the top-level directories that contain packages with
> > cExtensions (like persistent).  If you build using setup.py build and
> > run the tests, all the compiled C extensions are in the build
> > directory.  If you then run python from the same directory and type
> > "import ZODB," it will fail because it picks up the uncompiled source
> > directory.
> 
> OTOH, if you build with
> 
>     setup.py build_ext -i
> 
> then "import ZODB" works fine.  But the *tests* don't run then.  I'd rather
> change that, since "build_ext -i" is the normal way to build Zope from
> source, and there's no apparent reason for Zope and ZODB3 to favor different
> build procedures.

It was convenient when we had to support multiple versions of Python,
because you could have multiple builds from a single checkout.  I still
find that useful, because I use Python 2.3 and CVS Python.  I don't do
that because we need to support CVS Python, but it has been better a
provoking some bugs than 2.3.

I'm also resistant to build_ext -i, because it's not the distutils
default.

> > I think we can fix this by moving all the source code to a top-level
> > src directory.  As a result, a checkout would only have two top-level
> > directories Doc and src.  It would also have setup.py, test.py, and a
> > few other files.
> >
> > This change would not affect a Zope checkout at all.  I would just
> > re-arrange the repolinks for the ZODB3 CVS module.
> 
> Then what ZODB "looks like" would differ between a Zope checkout and a ZODB3
> checkout?  If so, that sounds like a candidate for causing worse confusion
> than we have now.  "OK, that bug is fixed in ZODB 3.3.1 -- just get the
> tarball for that, unzip it, and rearrange the directory structure by hand in
> the obvious ways so it fits in your Zope installation" <0.9 wink>.

ZODB and Zope checkouts don't look anything alike now.  In a Zope
checkout, everything is in a lib/python directory.  (I'm not sure why,
actually.)  In ZODB3, everything is at the top level.  My suggestion is
to change ZODB3 to look like Zope3.  

We're soon going to be supporting Zope2 and Zope3 with ZODB3, and Zope2
and Zope3 don't have the same layout.  I'd rather use the Zope3 layout;
I like it better.

Jeremy





More information about the ZODB-Dev mailing list