[Zope-Checkins] CVS: Zope/bin - mkzeoinstance:1.1.2.1
Fred L. Drake, Jr.
fred@zope.com
Mon, 17 Mar 2003 16:51:51 -0500
Update of /cvs-repository/Zope/bin
In directory cvs.zope.org:/tmp/cvs-serv3515
Added Files:
Tag: new-install-branch
mkzeoinstance
Log Message:
New script to create a ZEO instance bound to this software home.
=== Added File Zope/bin/mkzeoinstance ===
#!python
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import os
import sys
mydir = os.path.dirname(os.path.abspath(sys.argv[0]))
zopehome = os.path.dirname(mydir)
softwarehome = os.path.join(zopehome, "lib", "python")
if softwarehome not in sys.path:
sys.path.append(softwarehome)
from ZEO.mkzeoinst import ZEOInstanceBuilder
class InstanceBuilder(ZEOInstanceBuilder):
def get_params(self, *args, **kw):
params = ZEOInstanceBuilder.get_params(self, *args, **kw)
sw = os.path.join(softwarehome, "lib", "python")
params["server"] = os.path.join(sw, "ZEO", "runzeo.py")
params["zdrun"] = os.path.join(sw, "zdaemon", "zdrun.py")
params["zdctl"] = os.path.join(sw, "zdaemon", "zdctl.py")
return params
if __name__ == "__main__":
InstanceBuilder().run()