Initial import of py-ldap 2.0.0pre14

python-ldap provides an object-oriented API to access LDAP
directory servers from Python programs. Mainly it wraps the
OpenLDAP 2.x libs for that purpose.

Additionally the package contains modules for other LDAP-related
stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.).

Not included: Direct BER support

WWW: http://python-ldap.sourceforge.net/

from Marc Balmer <marc@msys.ch>
This commit is contained in:
sturm 2003-11-01 15:24:06 +00:00
parent 5ca5b87a7b
commit 5564337ce6
7 changed files with 165 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# $OpenBSD: Makefile,v 1.1.1.1 2003/11/01 15:24:06 sturm Exp $
COMMENT= "LDAP client API for Python"
VERSION= 2.0.0pre14
DISTNAME= python-ldap-${VERSION}
PKGNAME= py-ldap-${VERSION}
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=python-ldap/}
HOMEPAGE= http://python-ldap.sourceforge.net/
MAINTAINER= Marc Balmer <marc@msys.ch>
# Python
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
FLAVORS= 2.1 2.2
FLAVOR?= 2.1
MODULES= python
.if ${FLAVOR} == "2.1" || ${FLAVOR} == "2.2"
MODPY_VERSION= ${FLAVOR}
.elif ${FLAVOR:M2.1} && ${FLAVOR:M2.2}
ERRORS+= "Fatal: these flavors are mutually exclusive: ${FLAVOR}"
.endif
LIB_DEPENDS= ldap,lber::databases/openldap
NO_REGRESS= Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (python-ldap-2.0.0pre14.tar.gz) = 9137589e39438e446a200b486d18d0b4
RMD160 (python-ldap-2.0.0pre14.tar.gz) = 9f59ef688cc920b8e40c5cbfd6ef8db7594b934e
SHA1 (python-ldap-2.0.0pre14.tar.gz) = 2a38e73876ebb4aff66341732703a23fe420d926

View File

@ -0,0 +1,23 @@
--- Modules/ldapmodule.c.orig Tue Jul 2 20:00:00 2002
+++ Modules/ldapmodule.c Tue Sep 23 06:44:49 2003
@@ -13,6 +13,8 @@
#include "LDAPObject.h"
+#include <dlfcn.h>
+
DL_EXPORT(void) init_ldap(void);
/* dummy module methods */
@@ -27,6 +29,11 @@
init_ldap()
{
PyObject *m, *d;
+
+ /* Force loading of LDAP and LBER libraries */
+
+ dlopen("liblber.so", DL_LAZY);
+ dlopen("libldap_r.so", DL_LAZY);
#if defined(WIN32) || defined(__CYGWIN__)
/* See http://www.python.org/doc/FAQ.html#3.24 */

View File

@ -0,0 +1,23 @@
--- setup.cfg.orig Thu Aug 14 12:31:34 2003
+++ setup.cfg Thu Oct 9 21:31:54 2003
@@ -7,8 +7,8 @@
# for wrapping OpenLDAP 2 libs
[_ldap]
-library_dirs = /usr/local/openldap-REL_ENG_2_1/lib
-include_dirs = /usr/local/openldap-REL_ENG_2_1/include /usr/include/sasl
+#library_dirs = /usr/local/openldap-REL_ENG_2_1/lib
+#include_dirs = /usr/local/openldap-REL_ENG_2_1/include /usr/include/sasl
extra_compile_args =
extra_objects =
@@ -25,7 +25,8 @@
# Support for StartTLS/LDAPS, SASL bind and reentrant libldap_r.
# This needs recent OpenLDAP 2.0.26+ or 2.1.3+ built with
# ./configure --with-cyrus-sasl --with-tls
-libs = ldap_r lber sasl2 ssl crypto
+#libs = ldap_r lber sasl2 ssl crypto
+libs = ldap_r lber
# Installation options
[install]

View File

@ -0,0 +1,18 @@
--- setup.py.orig Wed Aug 20 22:27:10 2003
+++ setup.py Thu Oct 9 21:34:56 2003
@@ -27,8 +27,13 @@
#-- A class describing the features and requirements of OpenLDAP 2.0
class OpenLDAP2:
- library_dirs = []
- include_dirs = []
+ localbase = os.getenv('LOCALBASE')
+ if localbase == None:
+ localbase = '/usr/local'
+
+ library_dirs = ['%s/lib' % localbase]
+ include_dirs = ['%s/include' % localbase]
+
extra_compile_args = []
extra_link_args = []
extra_objects = []

View File

@ -0,0 +1,15 @@
python-ldap provides an object-oriented API to access LDAP
directory servers from Python programs. Mainly it wraps the
OpenLDAP 2.x libs for that purpose.
Additionally the package contains modules for other LDAP-related
stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.).
Not included: Direct BER support
Quick usage example:
import ldap
l = ldap.open("my_ldap_server.my_domain")
l.simple_bind_s("","")
l.search_s("o=My Organisation, c=AU", ldap.SCOPE_SUBTREE, "objectclass=*")

View File

@ -0,0 +1,48 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/11/01 15:24:06 sturm Exp $
@option no-default-conflict
@pkgcfl py-ldap-*-${MODPY_VERSION}
lib/python${MODPY_VERSION}/site-packages/_ldap.so
lib/python${MODPY_VERSION}/site-packages/dsml.py
lib/python${MODPY_VERSION}/site-packages/dsml.pyc
lib/python${MODPY_VERSION}/site-packages/dsml.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/__init__.py
lib/python${MODPY_VERSION}/site-packages/ldap/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/__init__.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/async.py
lib/python${MODPY_VERSION}/site-packages/ldap/async.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/async.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/cidict.py
lib/python${MODPY_VERSION}/site-packages/ldap/cidict.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/cidict.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/functions.py
lib/python${MODPY_VERSION}/site-packages/ldap/functions.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/functions.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.py
lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/ldapobject.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/modlist.py
lib/python${MODPY_VERSION}/site-packages/ldap/modlist.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/modlist.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/sasl.py
lib/python${MODPY_VERSION}/site-packages/ldap/sasl.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/sasl.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.py
lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/schema/__init__.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.py
lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/schema/models.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.py
lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/schema/subentry.pyo
lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.py
lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.pyc
lib/python${MODPY_VERSION}/site-packages/ldap/schema/tokenizer.pyo
lib/python${MODPY_VERSION}/site-packages/ldapurl.py
lib/python${MODPY_VERSION}/site-packages/ldapurl.pyc
lib/python${MODPY_VERSION}/site-packages/ldapurl.pyo
lib/python${MODPY_VERSION}/site-packages/ldif.py
lib/python${MODPY_VERSION}/site-packages/ldif.pyc
lib/python${MODPY_VERSION}/site-packages/ldif.pyo
@dirrm lib/python${MODPY_VERSION}/site-packages/ldap/schema
@dirrm lib/python${MODPY_VERSION}/site-packages/ldap