[Zope-Checkins] CVS: Zope/lib/python/App - FindHomes.py:1.11.4.1

Chris McDonough chrism@zope.com
Mon, 2 Sep 2002 03:35:40 -0400


Update of /cvs-repository/Zope/lib/python/App
In directory cvs.zope.org:/tmp/cvs-serv17315/lib/python/App

Modified Files:
      Tag: chrism-install-branch
	FindHomes.py 
Log Message:
Overhaul of installer branch.

z2.py is no longer necessary (nor used in the default config).  
In prior iterations of the installer branch, the "controller" process
(zctl) "front-ended" for z2.py, translating environment variables and
command-line options as necessary to pass in to z2.py.

In this iteration, a new file named "zope.py" is responsible for starting
the Zope process.  It reads configuration directives directly and has
the capability to obtain a configuration from a file or via XML-RPC.
z2.py still exists in the branch, but it's unused.

The zope.py file can be used to start Zope, but a nicer front-end
for it is "zctl", which is a heavily-modified offshoot of Tres'
"zopectl".  The zctl module is now generalized enough that it
*might* be able to run on Windows (I haven't tested it, though).

zctl is still a standalone process.  This is to allow for the fact that
Windows doesn't have os.fork (or zctl would have just imported zope.py
and forked).

In order to maintain cross-platform capability, the "logtail" option
of zctl was removed.  We should create a Python "tail" function
to get around this.

Niceties: zctl is able to tell if its Zope is already running (so you
cant inadvertently start it twice).  The Z2.pid file is cleaned up
when Zope exits, also.

A small bug in FindHomes.py was also fixed (dont add SOFTWARE_HOME to
sys.path if it's already in there).  Additionally, zdaemon was modified
so that if a child Zope process exits with error code 255, the daemon
process does not restart it (not strictly necessary, but nice to have).


=== Zope/lib/python/App/FindHomes.py 1.11 => 1.11.4.1 ===
--- Zope/lib/python/App/FindHomes.py:1.11	Wed Aug 14 17:31:40 2002
+++ Zope/lib/python/App/FindHomes.py	Mon Sep  2 03:35:09 2002
@@ -52,7 +52,7 @@
         if e=='lib': chome=d or os.getcwd()
 else:
     inst_ppath = path_join(chome, 'lib', 'python')
-    if os.path.isdir(inst_ppath):
+    if os.path.isdir(inst_ppath) and inst_ppath not in sys.path:
         sys.path.insert(0, inst_ppath)
 
 sys.modules['__builtin__'].INSTANCE_HOME=INSTANCE_HOME=chome