[Zope-Coders] Importing BTrees fails in 2.5 branch

Andreas Jung andreas@andreas-jung.com
Tue, 24 Sep 2002 18:20:07 +0200


Importing BTrees seems to be broken in the 2.5 branch
as the following example shows:

yetix@/develop/DC/sandboxes/Zope-2_5-branch(6)% setenv PYTHONPATH 
$PWD/lib/python
yetix@/develop/DC/sandboxes/Zope-2_5-branch(7)% python2.1 -c "from 
BTrees.IIBTree import IIBTree"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File 
"/empty/develop/DC/sandboxes/Zope-2_5-branch/lib/python/BTrees/IIBTree.py", 
line 16, in ?
    from _IIBTree import *
ImportError: No module named cPersistence

This worked in former Zope 2.5 versions and it still works with the HEAD and
2.6 branch. Adding lib/python/ZODB to PYTHONPATH makes this example work 
again.
Were there any changes in the import mechanism for BTrees lately?

Andreas