Jens Vagelpohl wrote:
On 9 Feb 2007, at 11:03, yuppie wrote:
Taking this into account, how should the five.localsitemanager thing be packaged?

Maybe we can use the same pattern as TextIndexNG3: The Python package is shipped in a 'src' subdirectory of the product. The product's __init__ adds 'src' to the sys.path. The code could check if five.localsitemanager already exists (e.g. in a Plone distribution) and modify sys.path only if necessary.

This is a hack, but maybe good enough as a temporary solution for CMF 2.1.

That's certainly good enough for me.

I was about to suggest that: create a "pure" five.localsitemanager package for the "package zealots" and make a product that simply puts it on sys.path.

I don't think resorting to relative imports is an option. I personally think Python 2's import semantics are pretty much fubared and I can only recommend to always use absolute imports.

Also, whatever we create now will have to live under Seaver's law (Persistence means having to say I'm sorry) because five.localsitemanager will obviously have persitent objects (the LocalSiteManager implementation, which is a subclass of PersistentComponents).

Anyway, yay on the consensus for CMF 2.1!

-- -- Professional Zope documentation and training
Next Zope 3 training at Camp5:

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to