[ZPT] Calling complex product tags from ZPT

J C Lawrence claw@kanga.nu
Sun, 07 Jul 2002 09:30:09 -0700


On Sun, 07 Jul 2002 17:12:23 +0200 
j-david  <ISO-8859-1> wrote:

> I've tried with a new installation, just installed Zope 2.5.1 on a
> Debian system...

FWLIW I'm running Debian/testing here.

> ... Localizer 0.8.1, mxDateTime 0.3, and did a symbolic link from
> <Zope HOME>/lib/python2.1/site-packages/mx to my Debian mx
> installation. It worked.

Ahh, perhaps there's the critical bit.  What symlink and why?

I installed the Egenix Debian mx packages which shoved all their bits
under /usr/lib/python2.1/site-packages/mx:

  $ dpkg --get-selections | fgrep egenix
  python2.1-egenix-mxdatetime                     install
  python2.1-egenix-mxproxy                        install
  python2.1-egenix-mxqueue                        install
  python2.1-egenix-mxstack                        install
  python2.1-egenix-mxtexttools                    install
  python2.1-egenix-mxtools                        install

  $ dpkg -L python2.1-egenix-mxtools | fgrep site-packages
  /usr/lib/python2.1/site-packages
  /usr/lib/python2.1/site-packages/mx
  /usr/lib/python2.1/site-packages/mx/Misc
  /usr/lib/python2.1/site-packages/mx/Misc/Namespace.py
  ...
  /usr/lib/python2.1/site-packages/mx/__init__.py
  ...

Just to check that my Zope installation is running python 2.1:
  
  $ head -1 `which zope-z2`
  #! /usr/bin/python
  $ ls -l /usr/bin/python
  lrwxrwxrwx  1 root root 9 Apr 28 14:42 /usr/bin/python -> python2.1
  $ ls -l /usr/bin/python2.1
  -rwxr-xr-x  1 root root 517864 Apr 20 01:32 /usr/bin/python2.1

There doesn't seem to be a Zope-specific site-packages directory unless
I'm missing something.  /usr/lib/python2.1/site-packages and
/usr/local/lib/python2.1/site-packages are the only site-packages
directory I have on my system outside of XEmacs.

I've cut back my Zope installation to:

  Debian Zope package (2.5.1-1)
  CVS CMF (newer than the Debian package)
  Localizer 0.8.1
  mxDateTime 0.3.0
  NuxWidgets 0.1.0
  and the above listed python2.1-egenix-mx* packages.

I'm passing "-I /var/lib/zope" to zope-z2 (setting of ZOPECTLOPTS in
the init script) and then installing CMF, Localizer, mxDateTime, and
NuxWidgets under /var/lib/zope/Products.  Per the products list in Zope
this works fine.

Still no go here for the ZPT widgets/calendar tag tho.

Stupid question:

  As I understand the docs and how NuxWidgets is trying to hook into ZPT
  I shouldn't have to do anything in my page template other than just
  call widgets/calendar, right?  Specifically I don't have to do a
  use-macro or similar reference to NuxWidgets beforehand...

> I think you should try to debug, try with a new installation as I did.

Arrgh.  Debugging Zope is something I've not done before.  I see several
basic approaches recommended when wandering zope.org.  Recommended
approach?

-- 
J C Lawrence                
---------(*)                Satan, oscillate my metallic sonatas. 
claw@kanga.nu               He lived as a devil, eh?		  
http://www.kanga.nu/~claw/  Evil is a name of a foeman, as I live.