[Zope3-Users] How to organize common code for Z2 and Z3

Andreas Jung lists at andreas-jung.com
Wed Apr 13 12:07:19 EDT 2005



--On Mittwoch, 13. April 2005 17:59 Uhr +0200 Lennart Regebro 
<regebro at gmail.com> wrote:

>> I think the trick would be to write code for Zope 3 and put it
>> in a top-level package, like "textindexng". Inside this package you add a
>> package "TextIndexNG" that is expected to be added to Zope 2's
>> lib/python/Products.
>
> Seems reasonable. But my gut reaction is to have this type of cvs/svn
> layout:
>
> TextIndexNG/
> TextIndexNG/setup.py # distutils stuff
> TextIndexNG/TextIndexNG # for Zope2
> TextIndexNG/src
> TextIndexNG/src/textindexng
>
> That way you just check it out and tar it for distrubution.
>
> You install it for zope3 with "python setup.py". setup.py will be
> constructed to completely ignores everything in
> TextIndexNG/TextIndexNG.
>
> You install it for Zope2 by copying TextIndexNG/TextIndexNG to
> Products and running distutils again.
>
> If src/textindexng is all python and no C or other funny business you
> could actually copy it to Products/TextIndexNG/ as well. If that is
> the case, as Zope2 distribution with that layout could be provided as
> well.
>
> Anything bad with this?
>

This looks perfectly to me.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20050413/06a9ee5d/attachment.bin


More information about the Zope3-users mailing list