hi all,

in Zope's testrunner, the SOFTWARE_HOME is explicitly added to the front of
the python package lookup path, like so:

sys.path.insert(0, shome)

this doesn't happen in the same manner when you're actually starting a Zope
server.  as a result, the test runner will not work in certain environments
where Zope itself is purring happily along.

specifically, i've got a setup where Zope 2.10 is installed into a virtualenv
using the traditional Zope install mechanisms.  i want to use ZODB BLOB
storage, however, so i've got ZODB 3.8 eggs installed.  setuptools gives eggs
precedence over non-egg packages, so this works well, except when using
test.py, where the explicit insertion of SOFTWARE_HOME at the very
beginning of sys.path trumps the egg installation.

i'd like to put a check in there so that SOFTWARE_HOME is only added to the
package lookup if the Zope2 package isn't already available:

     import Zope2
except ImportError:
     sys.path.insert(0, shome)

in other words, if the environment is already set up, don't mess with it.

anyone have a problem w/ me making this change on trunk and the 2.10 and 2.11 


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to