Re: [Zope-dev] INSTANCE_HOME and SOFTWARE_HOME still necessary in 2.7 start script?

2004-07-03 Thread Chris Withers
Fred Drake wrote:
On Friday 02 July 2004 02:21 am, Chris Withers wrote:
  Well, the automatically generated runzope still includes INSTANCE_HOME and
  SOFTWARE_HOME, hence my question...
 
  Can those variables be dropped from the template script?
They were dropped, also back when I added App.config.  
I've looked back through the CVS history for both zopectl and runzope, and 
they've both been in them since day 1...

in later.  You should dig through the CVS log for clues as to why, asking the 
committer of that change if the log doesn't say why.
Fred, why? ;-)
You can also rip those variable out of the script and make sure everything 
still works.
I'm going to give it a go.
For what it's worth, I think they should go if at all possible. If 3rd party 
stuff is relying on them, it needs to be changed, I don't see why Zope should 
have confusing cruft (HOW many places do I need to set these variable?!) lying 
around...

THAT said, thinking about it, you need to know where the .conf file is, and 
that's usually off the INSTANCE_HOME, and we need to know where 
run.py/zopectl.py are, and they're off the SOFTWARE_HOME. So these variables are 
kinda needed in the start script in one form or another. Which means, and I know 
how you feel about this, that to get them in one place, we'd need some way of 
telling ZConfig get this value from the environment variable x.

Is it really so bad if ZConfig grew a directive to that effect? I'd certainly 
not want anything magical to happen, but a way to explicitly say, in the .conf 
file, that this value is take from the environment, how about:

%environment INSTANCE
...which would work just like a $define, except getting its value from the 
environment?

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] INSTANCE_HOME and SOFTWARE_HOME still necessary in 2.7 start script?

2004-07-02 Thread Chris Withers
Fred Drake wrote:
On Thursday 01 July 2004 07:42 pm, Chris Withers wrote:
  Is it still necessary to specify INSTANCE_HOME and SOFTWARE_HOME in the
  start script for Zope?
I'm pretty sure I removed that requirement long ago, back when I added the 
App.config module.
Cool :-)
  Or would the following work?
  python /my/path/to/Zope/startup/run.py -C /my/instance/path/zope.conf
Try instead:
/my/instance/path/bin/runzope
Well, the automatically generated runzope still includes INSTANCE_HOME and 
SOFTWARE_HOME, hence my question...

Can those variables be dropped from the template script?
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] INSTANCE_HOME and SOFTWARE_HOME still necessary in 2.7 start script?

2004-07-01 Thread Fred Drake
On Thursday 01 July 2004 07:42 pm, Chris Withers wrote:
  Is it still necessary to specify INSTANCE_HOME and SOFTWARE_HOME in the
  start script for Zope?

I'm pretty sure I removed that requirement long ago, back when I added the 
App.config module.

  Or would the following work?
  python /my/path/to/Zope/startup/run.py -C /my/instance/path/zope.conf

Try instead:

/my/instance/path/bin/runzope


  -Fred

-- 
Fred L. Drake, Jr.  fred at zope.com
Zope Corporation

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] INSTANCE_HOME and Win32

2001-04-02 Thread Andy McKay

Thanks... seem's to work.
--
  Andy McKay.


- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, April 01, 2001 4:20 PM
Subject: Re: [Zope-dev] INSTANCE_HOME and Win32


 Andy McKay wrote:
 
  In 4am's how to on using INSTANCE HOME he says "copy start and stop to
the
  site directory". Whats start and stop?

 start.bat is the closest on Win32.

 Anyway, the short version is, create a folder 'current', copy the var and
 extensions folders of your favourite Zope setup into it, then copy any
products
 you want specific version of into current/Products.

 Then change start.bat so it looks a bit like:
 "E:\Zope\2.3.1\bin\python.exe" "E:\Zope\2.3.1\z2.py"
 INSTANCE_HOME="E:\Zope\current"

 ...that'll start up a Zope instance on port 8080, using the version of
Zope in
 E:\Zope\2.3.1 but the data.fs and other bits from E:\Zope\current\var

 good luck,

 Chris




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] INSTANCE_HOME vs. SOFTWARE_HOME

2001-03-19 Thread Martijn Pieters

On Sun, Mar 18, 2001 at 10:18:52PM +0100, Morten W. Petersen wrote:
 Hi guys,
 
 some people have asked me to use INSTANCE_HOME instead of SOFTWARE_HOME,
 which breaks their products on debian distros.
 
 Now, I'm not sure that won't break other systems if I change it; anyone
 care to share?

What are you using the variable for?

If you want to reach the var, import or Extensions directories, use
INSTANCE_HOME, if you want to reach a Products directory, use both
variables.

On Debian systems, Zope is by default installed as a seperate
INSTANCE_HOME and SOFTWARE_HOME system.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] INSTANCE_HOME vs. SOFTWARE_HOME

2001-03-18 Thread Morten W. Petersen

Hi guys,

some people have asked me to use INSTANCE_HOME instead of SOFTWARE_HOME,
which breaks their products on debian distros.

Now, I'm not sure that won't break other systems if I change it; anyone
care to share?

Thanks,

Morten


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] INSTANCE_HOME, SOFTWARE_HOME and package_home

2000-09-13 Thread Chris Withers

Evan Simpson wrote:
  f=open('%s/Products/%s.dtml' % (SOFTWARE_HOME,file))
  E:\Zope\2.2.0\lib\python/Products/Squishdot/validArticle.dtml

 f=open('%s/Products/%s.dtml' % (INSTANCE_HOME,file))
  'E:\\Zope\\2.2.0/Products/Squishdot/validArticle.dtml'
 
 This looks correct to me.  

Not to me! :-(

Okay, I can understand (but not approve of) having a mixture of \ and /
in a string (I guess python's open takes care of that) but what's with
the \\ in the INSTANCE_HOME case?! Also be my comment on the /lib/python
bit below ;-)

 If no explicit INSTANCE_HOME is set, it defaults
 to SOFTWARE_HOME minus '/lib/python'.

Can you explain why that makes sense please ;-)
Surely it'd be more useful to default to SOFTWARE_HOME including
'/lib/python' so that old code wasn't broken?

 On the other hand, I wonder why you're constructing '%s/Products/' paths
 explicitly like this.  

It was done by Butch ages ago. He probably did it 'cos it worked and the
'correct' way wasn't documented anywhere :P

 If this code is inside the Product to which you would
 like the path, the proper way to get the path is:
 
 from Globals import package_home
 path = package_home(globals())
 # path now probably equals
 'E:\\Zope\\2.2.0\\lib\\python\\Products\\Squishdot' in your example.

And that'll work in INSTANCE_HOME (in either the base or instance parts)
Zope installs as well as non-instance home ones?

 I have no idea if or where this is documented, sadly.  

no comment ;-)

 I'll definitely put
 it in my 'writing INSTANCE_HOME-friendly Products' howto, as soon as I get
 around to writing such a thing :-/ 

Soon, I hope, 'cos it sounds like a great idea

 Or perhaps you could? ;-)

The biggest thing I think is needed is a clear definition of what all of
these _should_ be and what they _are_. This needs to be done by someone
who understands them all and that's clearly not me ;-)

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] INSTANCE_HOME

2000-07-03 Thread Andy Dawkins

does anybody know where REQUEST['INSTANCE_HOME'] disappeared to between Zope
version 2.1.4 and version 2.1.6.

Furthermore is it likely to reappear or has it been succeeded by some other
key.

Cheers,
-Andy Dawkins


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )