I have some question about Python search path in Zope 3.

When I install Zope 3 using install.py script
with the "--prefix /usr/pkg/share/zope3" option,
the following scripts cannot find Python modules
of Zope 3 because modules are not installed
in Python search path:


But the following scripts have codes to add
"../lib/python" directory to sys.path
and these scripts can find Python modules of Zope 3:


# Example (mkzeoinstance)
here = os.path.dirname(os.path.realpath(__file__))
swhome = os.path.dirname(here)

for parts in [("src",), ("lib", "python"), ("Lib", "site-packages")]:
   d = os.path.join(swhome, *(parts + ("ZEO",)))
   if os.path.isdir(d):
       d = os.path.join(swhome, *parts)
       sys.path.insert(0, d)

I think that it is worth adding codes like them
to the former scripts.
Are there any problems with adding them?

Yoshito Komatsu <[EMAIL PROTECTED]>

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to