Getting python-ldap running on osx (fink)ΒΆ

Tags: plone

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 install just fine.

(Old imported comments)
"That worked!" by Bendy on 2007-04-10 18:43:54
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> logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):