Hello guys. I have a question regarding product importing in zope 2.7.x, as since zope 2.7 this part is way more flexible then it was before. I'd like to accomplish the next situation : - A Zope base installation has Product X installed in /lib/python/Products which I want to change or develop further - x instances of Zope use the produtc from this base install. - At one instance I want to test and develop, without breaking the other instances. - Copying the Product X folder to the <instance_home>/Products folder is not an option, as import conflict errors occure if you do not remove the product from the base installation. - Copying a local version in all 4 instances is a solution, but to manage that will cost alot of work, especially if you have alot of instances. - What I really want is that you can copy the Product X folder to the Products (or "CustomProducts" for example) of an zope instance, and that zope will figure out itself that it should import that version of the product instead of the copy in the base installation. 'Overriding' base products is the name you could give this situation. I tried alot myself, for example checking in the __init__.py if there is a copy of this product in <instance_home>/CustomProducts and then importing that product instead of my own, but I always get into trouble : AttributeError: 'module' object has no attribute '<Classname>' It doesn't have to work for all products, only for some of the products that we are developing ourselfs. We also have a different structure than normal products as following : Main Product - Sub product X - Sub product Y In the __init__.py of Main product we import and initialize the subproducts. The idea is to put one of those subproducts in a zope instance/CustomProducts folder for further development and that the other instances of zope still uses the base version of the subproduct. I hope you can help, thanks in advance for your time. Kind regards, -- Martijn Jacobs East Site | Postbus 642 | 6800 AP Arnhem t: +31 (0) 26 35 14 295 | f: +31 (0) 26 44 20 432 @: mart@eastsite.nl | w: www.eastsite.nl
Martijn Jacobs wrote:
Hello guys.
I have a question regarding product importing in zope 2.7.x, as since zope 2.7 this part is way more flexible then it was before. I'd like to accomplish the next situation :
Look for PRODUCTS_PATH or its zope.conf equivalent... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Tue, 15 Mar 2005 19:49:01 +0100, Martijn Jacobs wrote:
Hello guys.
I have a question regarding product importing in zope 2.7.x, as since zope 2.7 this part is way more flexible then it was before. I'd like to accomplish the next situation :
- A Zope base installation has Product X installed in /lib/python/Products which I want to change or develop further - x instances of Zope use the produtc from this base install. - At one instance I want to test and develop, without breaking the other instances. -
My approach would be one of the following: 1) Do the dev and test on a different (non-production) machine. 2) Install a second copy of zope for that dev/test instance. Both of these will avoid any interactions between your production setup and your dev/test work. HTH, -D -- Microsoft has argued that open source is bad for business, but you have to ask, "Whose business? Theirs, or yours?" --Tim O'Reilly www: http://dman13.dyndns.org/~dman/ jabber: dman@dman13.dyndns.org
participants (3)
-
Chris Withers -
Derrick Hudson -
Martijn Jacobs