The EDRN Public Portal and Knowledge Environment (or more simply, the EDRN Portal), uses LDAP in order to authenticate users and assign them roles. Mac OS X includes LDAP libraries that the portal requires. However, the Python LDAP library expects to find these libraries in a system-specific location (/usr/local/openldap-2.3.3). As a result, when you update your EDRN Portal buildout, the automated installation of the Python LDAP library will fail.

Here's what you'll need to do to get it working on Mac OS X 10.5 "Leopard":

Not on Leopard? See below!

  1. Go ahead and run bin/buildout and let it fail. This will put python-ldap-2.3.8.tar.gzin your download cache (usually ${buildout:directory}/downloads).
  2. Head to /tmp and extract the contents of the python-ldap-2.3.8.tar.gz tarball.
  3. Head into the extracted directory and edit setup.cfg. Change the library_dirs and include_dirs in the [_ldap] section to read as follows:
    library_dirs = /usr/lib
    include_dirs = /usr/include /usr/include/sasl
  4. Run sudo ${PYTHON24}/bin/python2.4 install where ${PYTHON24} is the location of your Python 2.4 installation (usually /Library/Frameworks/Python.framework/Versions/2.4)
  5. Very important: Delete python-ldap-2.3.8.tar.gz from your download cache.

Once that's all done, running bin/buildout should succeed.

Mac OS X Tiger

If you're on Mac OS X 10.4 "Tiger", then you are one sorry pathetic loser ☺. But there's hope for you still. Just do the following:

  1. First, install Cyrus SASL: cyrus-sasl-2.1.23.tar.gz. A simple configure/make/make install is all it takes.
  2. Next, install OpenLDAP: openldap-2.4.16.tgz. For the configuration, specify:
    ./configure --disable-slapd --enable-dynamic --with-cyrus-sasl CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib

    Then make, make depend, and sudo make install.

  3. Finally, return to python-ldap-2.3.8 and edit setup.cfg so that the library/include lines are as follows:
    library_dirs = /usr/local/lib
    include_dirs = /usr/local/include /usr/local/include/sasl
  4. Then run sudo python2.4 install and you're done.