Commit 07192256 authored by Tres Seaver's avatar Tres Seaver

- Port s/Zope/ZODB/ from Zope-2_7-branch.

parent 026c3746
...@@ -73,7 +73,7 @@ zeo_conf_template = """\ ...@@ -73,7 +73,7 @@ zeo_conf_template = """\
default-to-interactive true default-to-interactive true
# user zope # user zope
python %(python)s python %(python)s
zdrun %(zope_home)s/zdaemon/zdrun.py zdrun %(zodb3_home)s/zdaemon/zdrun.py
# This logfile should match the one in the %(package)s.conf file. # This logfile should match the one in the %(package)s.conf file.
# It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it.
...@@ -94,14 +94,14 @@ zeoctl_template = """\ ...@@ -94,14 +94,14 @@ zeoctl_template = """\
# description: start a %(PACKAGE)s server # description: start a %(PACKAGE)s server
PYTHON="%(python)s" PYTHON="%(python)s"
ZOPE_HOME="%(zope_home)s" ZODB3_HOME="%(zodb3_home)s"
CONFIG_FILE="%(instance_home)s/etc/%(package)s.conf" CONFIG_FILE="%(instance_home)s/etc/%(package)s.conf"
PYTHONPATH="$ZOPE_HOME" PYTHONPATH="$ZODB3_HOME"
export PYTHONPATH export PYTHONPATH
ZEOCTL="$ZOPE_HOME/ZEO/zeoctl.py" ZEOCTL="$ZODB3_HOME/ZEO/zeoctl.py"
exec "$PYTHON" "$ZEOCTL" -C "$CONFIG_FILE" ${1+"$@"} exec "$PYTHON" "$ZEOCTL" -C "$CONFIG_FILE" ${1+"$@"}
""" """
...@@ -111,14 +111,14 @@ runzeo_template = """\ ...@@ -111,14 +111,14 @@ runzeo_template = """\
# %(PACKAGE)s instance start script # %(PACKAGE)s instance start script
PYTHON="%(python)s" PYTHON="%(python)s"
ZOPE_HOME="%(zope_home)s" ZODB3_HOME="%(zodb3_home)s"
CONFIG_FILE="%(instance_home)s/etc/%(package)s.conf" CONFIG_FILE="%(instance_home)s/etc/%(package)s.conf"
PYTHONPATH="$ZOPE_HOME" PYTHONPATH="$ZODB3_HOME"
export PYTHONPATH export PYTHONPATH
RUNZEO="$ZOPE_HOME/ZEO/runzeo.py" RUNZEO="$ZODB3_HOME/ZEO/runzeo.py"
exec "$PYTHON" "$RUNZEO" -C "$CONFIG_FILE" ${1+"$@"} exec "$PYTHON" "$RUNZEO" -C "$CONFIG_FILE" ${1+"$@"}
""" """
...@@ -149,8 +149,8 @@ class ZEOInstanceBuilder: ...@@ -149,8 +149,8 @@ class ZEOInstanceBuilder:
instance_home = os.path.abspath(instance_home) instance_home = os.path.abspath(instance_home)
for entry in sys.path: for entry in sys.path:
if os.path.exists(os.path.join(entry, 'Zope')): if os.path.exists(os.path.join(entry, 'ZODB')):
zope_home = entry zodb3_home = entry
break break
else: else:
print "Can't find the Zope home (not in sys.path)" print "Can't find the Zope home (not in sys.path)"
...@@ -162,14 +162,14 @@ class ZEOInstanceBuilder: ...@@ -162,14 +162,14 @@ class ZEOInstanceBuilder:
port = 9999 port = 9999
checkport(port) checkport(port)
params = self.get_params(zope_home, instance_home, port) params = self.get_params(zodb3_home, instance_home, port)
self.create(instance_home, params) self.create(instance_home, params)
def get_params(self, zope_home, instance_home, port): def get_params(self, zodb3_home, instance_home, port):
return { return {
"package": "zeo", "package": "zeo",
"PACKAGE": "ZEO", "PACKAGE": "ZEO",
"zope_home": zope_home, "zodb3_home": zodb3_home,
"instance_home": instance_home, "instance_home": instance_home,
"port": port, "port": port,
"python": sys.executable, "python": sys.executable,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment