Re: Errors running CMFPlone/Extensions/setupSite.py with Zope 2.7
alan runyan <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.installers |
|---|---|
| Message-ID | <[email protected]> |
> Hasn't import Zope; app = Zope.app() been a pretty useful and > desirable feature for Zope in general for a long time? > sure. > Is Zope 2.7 so drastically different that simplicity is no longer > reasonable to expect? If for no other reason than backwards > compatibility??? Or am I being unreasonably unpatient waiting for a > fix? (it would suck if 2.7 shipped broken like this) > Sorry for not following it. I am CC'ing chrism. I do not believe I ever import Zope Zope.app() - I typically use ZEO or bootstrap a Data.fs by hand w/ FileStorage. alan > Jim > > On Sunday, December 14, 2003, at 10:37 PM, Andy McKay wrote: > >>> See this URL for information about the above error message: >>> http://mail.zope.org/pipermail/zope-dev/2003-August/020274.html >> >> Following that thread through Eric seemed to have a solution. I made >> some minor hacks and setupSite.py works just fine. Of course I have a >> load of other 2.7 problems to get through - but hey this is one more >> done ;) >> >> Im not sure what this dropPrivileges is about, but it looks ok so far. >> >> $ diff -u ~/cvs/CMFPlone-2/Extensions/setupSite.py setupSite.py >> --- /home/andy/cvs/CMFPlone-2/Extensions/setupSite.py 2003-11-25 >> 15:52:40.000000000 -0800 >> +++ setupSite.py 2003-12-14 22:34:57.000000000 -0800 >> @@ -13,9 +13,22 @@ >> os.environ['SOFTWARE_HOME'] = swhome >> sys.path.insert(0, '%s' % swhome) >> >> - # have to set up env first >> - from App import FindHomes >> + # have to set up env first >> import Zope >> + >> + from App import FindHomes >> + from Zope.Startup.options import ZopeOptions >> + from Zope.Startup import handlers as h >> + from App import config >> + opts = ZopeOptions() >> + opts.configfile = os.path.join(swhome,'etc/zope.conf') >> + sys.argv = sys.argv[:1] # gotta love this ;) >> + opts.realize() >> + h.handleConfig(opts.configroot,opts.confighandlers) >> + config.setConfiguration(opts.configroot) >> + >> + #from Zope.Startup import dropPrivileges >> + #dropPrivileges(opts.configroot) >> >> app = Zope.app() >> >> >> -- >> Andy McKay >> ClearWind Consulting >> http://www.clearwind.ca >> >> > > -- > Jim Roepcke > Tyrell Software Corp <http://www.tyrell.com/> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Plone-installers mailing list > Plone-installers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/plone-installers ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/