Paul Winkler wrote:
On Thu, Sep 16, 2004 at 11:16:22AM -0300, Rodrigo Dias Arruda Senra wrote:Fortunately it is was not hard at all, it took me one hour to find where to tweak, do it and test it under 2.8.
is the Zope 2.7.4 feature frozen ?
If not, I believe that the patch :
It adds the directive 'extensions' to zope.conf.
If overriden, then the specified directory will be used for ExternalMethods,
instead of the default $INSTANCE/Extensions.
Nice idea. How hard would it be to make it support multiple Extensions directories, just like we can have
multiple Products directories?
And it took *that long* because it was my first excursion under Zope skirts ;o)
Namely, it required three small additions to Extensions.py, zopeschema.xml, and zope.conf.
You can see details below, but that version was coded against 2.8 cvs snapshot.
I believe it will remain mostly the same against 2.7.5, but is better to be safe than sorry.
So I'll test it and re-submit to collector as Andreas suggested previously in this thread,
but this time I'll give it a higher priority since it seems to be useful and easy to add.
cheers, Rod Senra
Index: lib/python/Zope/Startup/zopeschema.xml =================================================================== --- lib/python/Zope/Startup/zopeschema.xml (revision 28473) +++ lib/python/Zope/Startup/zopeschema.xml (working copy) @@ -332,6 +332,14 @@ <metadefault>$instancehome/Products</metadefault> </multikey>
+ <key name="extensions" datatype="existing-directory">
+ This overrides the path to the Extensions directory.
+ <multikey name="path" datatype="string">
This specifies additional paths directories which are inserted into
--- lib/python/App/Extensions.py (revision 28473)
+++ lib/python/App/Extensions.py (working copy)
@@ -87,8 +87,14 @@
r = _getPath(product_dir, os.path.join(p, prefix), n, suffixes)
if r is not None: return r
+ import App.config
cfg = App.config.getConfiguration()
+ if (prefix=="Extensions") and (cfg.extensions is not None):
+ r=_getPath(cfg.extensions, '', name, suffixes)
+ if r is not None: return r
for home in (cfg.instancehome, sw):
r=_getPath(home, prefix, name, suffixes)
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce