Hello.

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:

/usr/pkg/share/zope3/bin/zconfig
/usr/pkg/share/zope3/bin/zconfig_schema2html
/usr/pkg/share/zope3/bin/zdctl.py
/usr/pkg/share/zope3/bin/zdrun.py

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

/usr/pkg/share/zope3/bin/mkzeoinstance
/usr/pkg/share/zope3/bin/mkzopeinstance
/usr/pkg/share/zope3/bin/zopetest

# 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)
       break

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

Regards,
--
Yoshito Komatsu <[EMAIL PROTECTED]>

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

Reply via email to