[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - handlers.py:1.5 zopeschema.xml:1.5
Fred L. Drake, Jr.
fred@zope.com
Thu, 20 Mar 2003 18:13:01 -0500
Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv29338/lib/python/Zope/Startup
Modified Files:
handlers.py zopeschema.xml
Log Message:
Allow a site admin to specify additional directories for products as part of
the Zope configuration file. There is no magical search for
INSTANCE_HOME/Products; it is included as part of the instance skeleton,
but can be controlled simply changing the configuration.
=== Zope/lib/python/Zope/Startup/handlers.py 1.4 => 1.5 ===
--- Zope/lib/python/Zope/Startup/handlers.py:1.4 Tue Mar 18 16:37:49 2003
+++ Zope/lib/python/Zope/Startup/handlers.py Thu Mar 20 18:13:00 2003
@@ -101,6 +101,16 @@
fixups of values that require knowledge about configuration
values outside of their context. """
+ # Add any product directories not already in Products.__path__.
+ # Directories are added in the order
+ if config.products:
+ import Products
+ L = []
+ for d in config.products + Products.__path__:
+ if d not in L:
+ L.append(d)
+ Products.__path__[:] = L
+
# if no servers are defined, create default http server and ftp server
if not config.servers:
import ZServer.datatypes
=== Zope/lib/python/Zope/Startup/zopeschema.xml 1.4 => 1.5 ===
--- Zope/lib/python/Zope/Startup/zopeschema.xml:1.4 Tue Mar 18 16:37:49 2003
+++ Zope/lib/python/Zope/Startup/zopeschema.xml Thu Mar 20 18:13:00 2003
@@ -179,6 +179,14 @@
</description>
</key>
+ <multikey name="products" datatype="existing-directory">
+ <description>
+ This specifies additional product directories which are added to
+ Products.__path__. Directories are added in the order in which
+ they are specified.
+ </description>
+ </multikey>
+
<key name="structured-text-header-level" datatype="integer" default="3"
handler="structured_text_header_level"/>