Stephan Richter wrote:
Hello everyone,

I am going to fix the LDAP authentication adapter for PAU. Florent, Dylan and Roger have all expressed interest to put the module into the Zope 3 source tree, like ``Zope3/src/ldapauth`` (note the name change to a more neutral one). The problem with that is, of course, that this authentication package requires the ``ldap`` module, which does not ship with the standard Python. Thus Zope 3 would not start up and tests would fail, if someone does not have ``ldap`` installed.

However, in light of recent developments I think we can overcome the problem.

(1) Tests

We only run the ``ldap``-specific tests when the module is installed. The pattern to do this is well-established and should be no problem.

I really don't like this, but I can live with it for now. We has a lot of pain doing something like this for ZODB.

I really want to get to a packing based solution to this sort of

(2) ZCML

We only want to load the configuration, when the ``ldap`` package is installed. Unfortunately, the ZCML-condition verb "have" is insufficient, since the ``ldap`` package does not come with a ZCML file that defines a feature. I thus propose to implement a second verb called "have-package" or "have-module" that will check whether a particular module is importable. For example::

    zcml:condition="have-package ldap"> ...

I am open to alternative solutions. For example, we could also have a special "have" verb case where the feature "package" is specially treated:
``have package ldap``

How about: "have-module"? Is there any reason to limit this to packages?


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation
Zope3-dev mailing list

Reply via email to