Reputation: 3918
I am trying to install the basic ldap python module under cygwin. The following is failing:
%easy_install ldap
Searching for ldap...
..
No local packages or download links found for ldap
I am using cherrypy for an app which is running fine in Ubuntu, and planning to port it to cygwin so I can run the app under my Win7 lapop.
(I could install a Django-specific module django-auth-ldap, and tried to import that as ldap, but this does not seem to have an initialize method that the basic ldap module has.)
PS: I forgot to mention trying python-ldap, but 'easy_install python-ldap' fails due to some compilation errors:
.....
.....
Modules/constants.c: In function `LDAPinit_constants':
Modules/constants.c:153:1: error: `LDAP_OPT_DIAGNOSTIC_MESSAGE' undeclared (first use in this function)
Modules/constants.c:153:1: note: each undeclared identifier is reported only once for each function it appears in
Modules/constants.c:363:29: error: `LDAP_CONTROL_RELAX' undeclared (first use in this function)
error: Setup script exited with error: command 'gcc' failed with exit status 1
Upvotes: 2
Views: 3277
Reputation: 3918
Another stackoverflow page came to rescue: python-ldap OS X 10.6 and Python 2.6
The final solution:
pip install python-ldap==2.3.13
Noting it here so people facing this in cygwin can use this post.
Upvotes: 9
Reputation: 269
Are you sure it's not easy_install python-ldap
you want?
The Django LDAP authorization middleware is middleware - which is to say that it can't be used in the same manner as a Python module. It is designed to wrap a WSGI application.
See the Django Middleware documentation for more information.
Upvotes: 0