[python-ldap] How to get the python-ldap test suite working in Ubuntu 16.10

Michael Ströder michael at stroeder.com
Mon Jun 5 05:10:35 EDT 2017


Karl,

Karl Kornel wrote:
> I was just working on getting the python-ldap test suite working on an Ubuntu 16.10
> (yakkety) VM, and I wanted to let people know the changes I needed to make, so that the
> test suite would work.

since 2.4.37 you should get it working without path changes and symbolic links by just
setting env vars. At least I got it working on one Ubuntu box one time.

This is not yet documented. But you can easily find out about the env vars used by
looking at how the class attributes of SlapdObject are initially set:

    TMPDIR = os.environ.get('TMP', os.getcwd())
    SBINDIR = os.environ.get('SBIN', '/usr/sbin')
    BINDIR = os.environ.get('BIN', '/usr/bin')
    SCHEMADIR = os.environ.get('SCHEMA', '/etc/openldap/schema')
    INIT_SCHEMA_FILE = os.environ.get('SCHEMA_FILE', 'core.schema')
    INIT_SCHEMA_PATH = os.environ.get('SCHEMA_PATH', os.path.join(SCHEMADIR,
INIT_SCHEMA_FILE))
    PATH_LDAPADD = os.path.join(BINDIR, 'ldapadd')
    PATH_LDAPMODIFY = os.path.join(BINDIR, 'ldapmodify')
    PATH_LDAPWHOAMI = os.path.join(BINDIR, 'ldapwhoami')
    PATH_SLAPD = os.environ.get('SLAPD', os.path.join(SBINDIR, 'slapd'))
    PATH_SLAPTEST = os.path.join(SBINDIR, 'slaptest')

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20170605/114f492b/attachment.bin>


More information about the python-ldap mailing list