Personal tools
You are here: Home Reinout van Rees' weblog Getting python-ldap running on osx (fink)

Getting python-ldap running on osx (fink)

by Reinout van Rees — last modified Oct 08, 2007 05:57 PM
Filed Under:

It took me quite a lot of time to get python ldap to compile on osx (to use it for testing Plone's LDAPUserFolder). I needed to compile it from source as I'm using a local build of python instead of the standard fink or osx python. In the end it turned out to be not too difficult, if you know the magic incantations.

In fink, install the following:

  • openldap23
  • openldap23-dev
  • openldap23-shlibs
  • cyrus-sasl2
  • cyrus-sasl2-dev
  • cyrus-sasl2-shlibs

Then download python ldap and edit its setup.cfg file's library_dirs and include_dirs lines:

 library_dirs = /sw/lib /sw/lib/sasl2 
 include_dirs = /sw/include /sw/include/sasl 

Then you should be able to run sudo python setup.py install just fine.

Document Actions

That worked!

Posted by Bendy at Apr 10, 2007 06:43 PM
Thanks, though here I am a year later, and with the libraries that fink loaded, I had to simlink one of them to get python to successfully <pre>import ldap</pre>

<pre>sudo ln -s libdb-4.4.dylib libdb-4.3.dylib</pre>