Commit fc36505a authored by Matt Behrens's avatar Matt Behrens

Add support for ZOPE_HOME and a setup.py that is capable of installing

all Zope software, based on the work in the installer branch.

All tests still pass when built with python2.1 setup.py build_ext -i :-)
parent 719cf70f
...@@ -90,6 +90,10 @@ Zope Changes ...@@ -90,6 +90,10 @@ Zope Changes
tree._check() can be used if you suspect such a problem (and if tree._check() can be used if you suspect such a problem (and if
you find one, rebuilding the tree is the best solution for now). you find one, rebuilding the tree is the best solution for now).
- Added support for the ZOPE_HOME environment variable, which
points to the Zope root, where the ZServer package and default
imports may be found.
Zope 2.6.0 alpha 1 Zope 2.6.0 alpha 1
Features Added Features Added
......
...@@ -31,6 +31,12 @@ Zope installation ...@@ -31,6 +31,12 @@ Zope installation
See also: INSTANCE_HOME See also: INSTANCE_HOME
ZOPE_HOME
ZOPE_HOME is the root of the Zope software, where the ZServer
package, z2.py, and the default import directory may be found.
Profiling Profiling
PROFILE_PUBLISHER PROFILE_PUBLISHER
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
__doc__="""System management components""" __doc__="""System management components"""
__version__='$Revision: 1.79 $'[11:-2] __version__='$Revision: 1.80 $'[11:-2]
import sys,os,time,Globals, Acquisition, os, Undo import sys,os,time,Globals, Acquisition, os, Undo
...@@ -416,6 +416,9 @@ class ApplicationManager(Folder,CacheManager): ...@@ -416,6 +416,9 @@ class ApplicationManager(Folder,CacheManager):
def getSOFTWARE_HOME(self): def getSOFTWARE_HOME(self):
return SOFTWARE_HOME return SOFTWARE_HOME
def getZOPE_HOME(self):
return ZOPE_HOME
def getINSTANCE_HOME(self): def getINSTANCE_HOME(self):
return INSTANCE_HOME return INSTANCE_HOME
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"""Commonly used utility functions.""" """Commonly used utility functions."""
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
import os, sys, Products import os, sys, Products
from Common import package_home, realpath from Common import package_home, realpath
...@@ -34,6 +34,13 @@ except: ...@@ -34,6 +34,13 @@ except:
home=realpath(home) home=realpath(home)
sys.modules['__builtin__'].SOFTWARE_HOME=SOFTWARE_HOME=home sys.modules['__builtin__'].SOFTWARE_HOME=SOFTWARE_HOME=home
try: zhome=os.environ['ZOPE_HOME']
except:
zhome=os.path.join(home, '..', '..')
zhome=realpath(zhome)
sys.modules['__builtin__'].ZOPE_HOME=ZOPE_HOME=zhome
try: try:
chome=os.environ['INSTANCE_HOME'] chome=os.environ['INSTANCE_HOME']
chome = realpath(chome) chome = realpath(chome)
......
...@@ -56,6 +56,18 @@ functions such as database and product management. ...@@ -56,6 +56,18 @@ functions such as database and product management.
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
ZOPE_HOME
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-var getZOPE_HOME>
</div>
</td>
</tr>
<tr> <tr>
<td align="left" valign="top"> <td align="left" valign="top">
<div class="form-label"> <div class="form-label">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"""Global definitions""" """Global definitions"""
__version__='$Revision: 1.51 $'[11:-2] __version__='$Revision: 1.52 $'[11:-2]
# Global constants: __replaceable__ flags: # Global constants: __replaceable__ flags:
NOT_REPLACEABLE = 0 NOT_REPLACEABLE = 0
...@@ -23,7 +23,7 @@ UNIQUE = 2 ...@@ -23,7 +23,7 @@ UNIQUE = 2
import Acquisition, ComputedAttribute, App.PersistentExtra, os import Acquisition, ComputedAttribute, App.PersistentExtra, os
import TreeDisplay import TreeDisplay
from App.FindHomes import INSTANCE_HOME, SOFTWARE_HOME from App.FindHomes import INSTANCE_HOME, SOFTWARE_HOME, ZOPE_HOME
from App.Common import package_home, attrget, Dictionary from App.Common import package_home, attrget, Dictionary
from Persistence import Persistent, PersistentMapping from Persistence import Persistent, PersistentMapping
from App.special_dtml import HTML, HTMLFile, DTMLFile from App.special_dtml import HTML, HTMLFile, DTMLFile
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
############################################################################## ##############################################################################
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.184 2002/07/03 18:18:57 chrism Exp $''' $Id: Application.py,v 1.185 2002/07/09 15:14:51 zigg Exp $'''
__version__='$Revision: 1.184 $'[11:-2] __version__='$Revision: 1.185 $'[11:-2]
import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_
import time, traceback, os, Products import time, traceback, os, Products
...@@ -376,8 +376,8 @@ def initialize(app): ...@@ -376,8 +376,8 @@ def initialize(app):
if not hasattr(app, 'Examples') and not \ if not hasattr(app, 'Examples') and not \
hasattr(app, '_Zope25_examples_have_been_added'): hasattr(app, '_Zope25_examples_have_been_added'):
examples_path = os.path.join(Globals.SOFTWARE_HOME, \ examples_path = os.path.join(Globals.ZOPE_HOME, \
'..','..','import', 'Examples.zexp') 'import', 'Examples.zexp')
if os.path.isfile(examples_path): if os.path.isfile(examples_path):
app._importObjectFromFile(examples_path, verify=0) app._importObjectFromFile(examples_path, verify=0)
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
############################################################################## ##############################################################################
__doc__="""Object Manager __doc__="""Object Manager
$Id: ObjectManager.py,v 1.154 2002/07/02 21:00:00 chrism Exp $""" $Id: ObjectManager.py,v 1.155 2002/07/09 15:14:51 zigg Exp $"""
__version__='$Revision: 1.154 $'[11:-2] __version__='$Revision: 1.155 $'[11:-2]
import App.Management, Acquisition, Globals, CopySupport, Products import App.Management, Acquisition, Globals, CopySupport, Products
import os, App.FactoryDispatcher, re, Products import os, App.FactoryDispatcher, re, Products
...@@ -514,10 +514,9 @@ class ObjectManager( ...@@ -514,10 +514,9 @@ class ObjectManager(
raise BadRequestException, 'Invalid file name %s' % file raise BadRequestException, 'Invalid file name %s' % file
instance_home = INSTANCE_HOME instance_home = INSTANCE_HOME
software_home = os.path.join(SOFTWARE_HOME, '..%s..' % os.sep) zope_home = ZOPE_HOME
software_home = os.path.normpath(software_home)
for impath in (instance_home, software_home): for impath in (instance_home, zope_home):
filepath = os.path.join(impath, 'import', file) filepath = os.path.join(impath, 'import', file)
if os.path.exists(filepath): if os.path.exists(filepath):
break break
......
This diff is collapsed.
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