[Zope-Checkins] SVN: Zope/trunk/ Removed the specification of `SOFTWARE_HOME` and `ZOPE_HOME` from the standard instance scripts.
Hanno Schlichting
plone at hannosch.info
Fri Feb 20 10:09:36 EST 2009
Log message for revision 96821:
Removed the specification of `SOFTWARE_HOME` and `ZOPE_HOME` from the standard instance scripts.
Changed:
_U Zope/trunk/
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/src/Zope2/utilities/mkzopeinstance.py
U Zope/trunk/src/Zope2/utilities/skel/bin/runzope.bat.in
U Zope/trunk/src/Zope2/utilities/skel/bin/runzope.in
U Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.bat.in
U Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in
U Zope/trunk/src/Zope2/utilities/skel/bin/zopeservice.py.in
U Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in
U Zope/trunk/src/nt_svcutils/service.py
-=-
Property changes on: Zope/trunk
___________________________________________________________________
Modified: svn:ignore
- access
bin
build
import
include
inituser
ZODBTests.fs*
makefile
Products
etc
lib
log
build-base
testing.log
var
develop-eggs
eggs
parts
.installed.cfg
+ bin
build
dist
include
inituser
ZODBTests.fs*
makefile
lib
build-base
testing.log
develop-eggs
eggs
parts
.installed.cfg
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/doc/CHANGES.txt 2009-02-20 15:09:35 UTC (rev 96821)
@@ -23,6 +23,10 @@
Restructuring
+++++++++++++
+- Removed the specification of `SOFTWARE_HOME` and `ZOPE_HOME` from the
+ standard instance scripts.
+ [hannosch]
+
- Made the specification of `SOFTWARE_HOME` and `ZOPE_HOME` optional. In
addition `INSTANCE_HOME` is no longer required to run the tests of a
source checkout of Zope.
Modified: Zope/trunk/src/Zope2/utilities/mkzopeinstance.py
===================================================================
--- Zope/trunk/src/Zope2/utilities/mkzopeinstance.py 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/mkzopeinstance.py 2009-02-20 15:09:35 UTC (rev 96821)
@@ -29,7 +29,6 @@
import getopt
import os
-import shutil
import sys
import copyzopeskel
@@ -81,8 +80,6 @@
)
instancehome = skeltarget
- zopehome = os.path.dirname(os.path.dirname(script))
- softwarehome = os.path.join(zopehome, "src")
configfile = os.path.join(instancehome, 'etc', 'zope.conf')
if skelsrc is None:
# default to using stock Zope skeleton source
@@ -113,12 +110,14 @@
# we're on UNIX or we have a nonstandard Windows setup
PYTHON = PYTHONW = sys.executable
+ import Zope2
+ zope2path = os.path.realpath(os.path.dirname(Zope2.__file__))
+
kw = {
"PYTHON":PYTHON,
"PYTHONW":PYTHONW,
"INSTANCE_HOME": instancehome,
- "SOFTWARE_HOME": softwarehome,
- "ZOPE_HOME": zopehome,
+ "ZOPE2PATH": zope2path,
}
copyzopeskel.copyskel(skelsrc, skeltarget, None, None, **kw)
Modified: Zope/trunk/src/Zope2/utilities/skel/bin/runzope.bat.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/bin/runzope.bat.in 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/skel/bin/runzope.bat.in 2009-02-20 15:09:35 UTC (rev 96821)
@@ -1,8 +1,5 @@
- at set ZOPE_HOME=<<ZOPE_HOME>>
+ at set PYTHON=<<PYTHON>>
@set INSTANCE_HOME=<<INSTANCE_HOME>>
- at set PYTHON=%ZOPE_HOME%\bin\python.exe
- at set SOFTWARE_HOME=%ZOPE_HOME%\lib\python
@set CONFIG_FILE=%INSTANCE_HOME%\etc\zope.conf
- at set PYTHONPATH=%SOFTWARE_HOME%
- at set ZOPE_RUN=%SOFTWARE_HOME%\Zope2\Startup\run.py
+ at set ZOPE_RUN=<<ZOPE2PATH>>\Zope2\Startup\run.py
"%PYTHON%" "%ZOPE_RUN%" -C "%CONFIG_FILE%" %1 %2 %3 %4 %5 %6 %7
Modified: Zope/trunk/src/Zope2/utilities/skel/bin/runzope.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/bin/runzope.in 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/skel/bin/runzope.in 2009-02-20 15:09:35 UTC (rev 96821)
@@ -1,14 +1,10 @@
#! /bin/sh
PYTHON="<<PYTHON>>"
-ZOPE_HOME="<<ZOPE_HOME>>"
INSTANCE_HOME="<<INSTANCE_HOME>>"
CONFIG_FILE="<<INSTANCE_HOME>>/etc/zope.conf"
-SOFTWARE_HOME="<<SOFTWARE_HOME>>"
-PYTHONPATH="$SOFTWARE_HOME:$PYTHONPATH"
-export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME
+export INSTANCE_HOME
-ZOPE2PATH=`${PYTHON} -c "import os, Zope2; print os.path.dirname(Zope2.__file__)" `
-ZOPE_RUN="$ZOPE2PATH/Startup/run.py"
+ZOPE_RUN="<<ZOPE2PATH>>/Startup/run.py"
exec "$PYTHON" "$ZOPE_RUN" -C "$CONFIG_FILE" "$@"
Modified: Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.bat.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.bat.in 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.bat.in 2009-02-20 15:09:35 UTC (rev 96821)
@@ -1,8 +1,5 @@
- at set ZOPE_HOME=<<ZOPE_HOME>>
+ at set PYTHON=<<PYTHON>>
@set INSTANCE_HOME=<<INSTANCE_HOME>>
- at set PYTHON=%ZOPE_HOME%\bin\python.exe
- at set SOFTWARE_HOME=%ZOPE_HOME%\lib\python
@set CONFIG_FILE=%INSTANCE_HOME%\etc\zope.conf
- at set PYTHONPATH=%SOFTWARE_HOME%
- at set ZDCTL=%SOFTWARE_HOME%\Zope2\Startup\zopectl.py
+ at set ZDCTL=<<ZOPE2PATH>>\Zope2\Startup\zopectl.py
"%PYTHON%" "%ZDCTL%" -C "%CONFIG_FILE%" %1 %2 %3 %4 %5 %6 %7
Modified: Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in 2009-02-20 15:09:35 UTC (rev 96821)
@@ -1,14 +1,10 @@
#! /bin/sh
PYTHON="<<PYTHON>>"
-ZOPE_HOME="<<ZOPE_HOME>>"
INSTANCE_HOME="<<INSTANCE_HOME>>"
CONFIG_FILE="<<INSTANCE_HOME>>/etc/zope.conf"
-SOFTWARE_HOME="<<SOFTWARE_HOME>>"
-PYTHONPATH="$SOFTWARE_HOME:$PYTHONPATH"
-export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME
+export INSTANCE_HOME
-ZOPE2PATH=`${PYTHON} -c "import os, Zope2; print os.path.dirname(Zope2.__file__)" `
-ZDCTL="$ZOPE2PATH/Startup/zopectl.py"
+ZDCTL="<<ZOPE2PATH>>/Startup/zopectl.py"
exec "$PYTHON" "$ZDCTL" -C "$CONFIG_FILE" "$@"
Modified: Zope/trunk/src/Zope2/utilities/skel/bin/zopeservice.py.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/bin/zopeservice.py.in 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/skel/bin/zopeservice.py.in 2009-02-20 15:09:35 UTC (rev 96821)
@@ -82,33 +82,14 @@
# these are replacements from mkzopeinstance
PYTHON = r'<<PYTHON>>'
-SOFTWARE_HOME=r'<<SOFTWARE_HOME>>'
INSTANCE_HOME = r'<<INSTANCE_HOME>>'
-ZOPE_HOME = r'<<ZOPE_HOME>>'
-ZOPE_RUN = r'%s\Zope2\Startup\run.py' % SOFTWARE_HOME
+ZOPE_RUN = r'<<ZOPE2PATH>>\Zope2\Startup\run.py'
CONFIG_FILE= os.path.join(INSTANCE_HOME, 'etc', 'zope.conf')
PYTHONSERVICE_EXE=r'%s\bin\PythonService.exe' % ZOPE_HOME
-# Setup the environment, so sub-processes see these variables
-for check_dir in (os.path.join(SOFTWARE_HOME, 'third_party', 'docutils', 'extras'),
- os.path.join(SOFTWARE_HOME, 'third_party', 'docutils'),
- SOFTWARE_HOME,
- ):
- parts = os.environ.get("PYTHONPATH", "").split(os.pathsep)
- if check_dir not in parts:
- parts = filter(None, [check_dir] + parts)
- os.environ["PYTHONPATH"] = os.pathsep.join(parts)
-
os.environ["INSTANCE_HOME"] = INSTANCE_HOME
-# Ensure SOFTWARE_HOME is on our current sys.path so we can import the
-# nt_svcutils package. Note we don't need the docutils dirs in sys.path, as
-# only Zope itself (our child process) uses it, and that happens via
-# PYTHONPATH
-if SOFTWARE_HOME not in sys.path:
- sys.path.insert(0, SOFTWARE_HOME)
-
from nt_svcutils.service import Service
servicename = 'Zope_%s' % str(hash(INSTANCE_HOME.lower()))
Modified: Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in 2009-02-20 15:09:35 UTC (rev 96821)
@@ -23,7 +23,6 @@
# ZConfig "defines" used for later textual substitution
%define INSTANCE <<INSTANCE_HOME>>
-%define ZOPE <<ZOPE_HOME>>
# Directive: instancehome
#
Modified: Zope/trunk/src/nt_svcutils/service.py
===================================================================
--- Zope/trunk/src/nt_svcutils/service.py 2009-02-20 15:05:39 UTC (rev 96820)
+++ Zope/trunk/src/nt_svcutils/service.py 2009-02-20 15:09:35 UTC (rev 96821)
@@ -372,5 +372,5 @@
# Real __main__ bootstrap code is in the instance's service module.
if __name__ == '__main__':
print "This is a framework module - you don't run it directly."
- print "See your $SOFTWARE_HOME\bin directory for the service script."
+ print "See your installation directory for the service script."
sys.exit(1)
More information about the Zope-Checkins
mailing list