Stephan Richter <[EMAIL PROTECTED]> wrote:
> 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.
Great, thanks for that. Note that the code is very rough still, and that
it requires a second package, "ldapadapter".
> 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.
> (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
> 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``
> Thoughts? Comments?
Personally I have no strong feelings on the naming. Your second "have
package ldap" syntax seems more readable of course.
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
Zope3-dev mailing list