Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Feb 26, 2021
2 parents ea4aa73 + 2fb97af commit 45c1dac
Show file tree
Hide file tree
Showing 182 changed files with 40,513 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[run]
branch = True
source =
ldap
ldif
ldapurl
slapdtest

[paths]
source =
Lib/
.tox/*/lib/python*/site-packages/

[report]
ignore_errors = False
precision = 1
exclude_lines =
pragma: no cover
raise NotImplementedError
if 0:
if __name__ == .__main__.:
if PY2
if not PY2

[html]
directory = build/htmlcov
title = python-ldap coverage report
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
If you found a bug in python-ldap, or would request a new feature,
this is the place to let us know.

Please describe the issue and your environment here.

---

Issue description:






Steps to reproduce:



Operating system:

Python version:

python-ldap version:
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Auto-generated
.*.swp
*.pyc
__pycache__/
.tox
.coverage*
!.coveragerc
/.cache
/.pytest_cache

# shared libs installed by 'setup.py test'
/Lib/*.so*
/Lib/*.dylib
/Lib/*.pyd

# Build related
*.egg-info
build/
dist/
PKG-INFO

# generated in the sample workflow
/__venv__/

# test dirs
python-ldap-test-*
31 changes: 31 additions & 0 deletions .indent.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--blank-lines-after-declarations
--blank-lines-after-procedures
--braces-after-func-def-line
--braces-on-if-line
--braces-on-struct-decl-line
--break-after-boolean-operator
--comment-indentation25
--comment-line-length79
--continue-at-parentheses
--dont-cuddle-do-while
--dont-cuddle-else
--indent-level4
--line-length79
--no-space-after-casts
--no-space-after-function-call-names
--no-space-after-parentheses
--no-tabs
--procnames-start-lines
--space-after-for
--space-after-if
--space-after-while
--swallow-optional-blank-lines
-T PyCFunction
-T PyObject
-T PyMethodDef
-T LDAP
-T LDAPMod
-T LDAPMessage
-T LDAPControl
-T LDAPObject
-T sasl_interact_t
75 changes: 75 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
language: python
group: travis_latest

cache: pip

addons:
apt:
packages:
- ldap-utils
- slapd
- enchant

# Note: when updating Python versions, also change setup.py and tox.ini
matrix:
include:
- os: osx
osx_image: xcode11.4
language: minimal
env:
- TOXENV=macos
- CFLAGS_warnings="-Wall -Werror=declaration-after-statement"
- CFLAGS_std="-std=c99"
- python: 3.6
env:
- TOXENV=py36
- WITH_GCOV=1
- python: pypy3
env:
- TOXENV=pypy3
- CFLAGS_std="-std=c99"
- python: 3.7
env:
- TOXENV=py37
- CFLAGS_std="-std=c99"
- WITH_GCOV=1
- python: 3.8
env:
- TOXENV=py38
- CFLAGS_std="-std=c99"
- WITH_GCOV=1
- python: 3.9
env:
- TOXENV=py39
- CFLAGS_std="-std=c99"
- WITH_GCOV=1
- python: 3.6
env:
- TOXENV=py3-nosasltls
- WITH_GCOV=1
- python: 3.6
env:
- TOXENV=py3-trace
- python: 3.6
env: TOXENV=doc
allow_failures:
- env:
- TOXENV=pypy3

env:
global:
# -Wno-int-in-bool-context: don't complain about PyMem_MALLOC()
# -Werror: turn all warnings into fatal errors
# -Werror=declaration-after-statement: strict ISO C90
- CFLAGS_warnings="-Wno-int-in-bool-context -Werror -Werror=declaration-after-statement"
# Keep C90 compatibility where possible.
# (Python 3.8+ headers use C99 features, so this needs to be overridable.)
- CFLAGS_std="-std=c90"
# pass CFLAGS, CI (for Travis CI) and WITH_GCOV to tox tasks
- TOX_TESTENV_PASSENV="CFLAGS CI WITH_GCOV"

install:
- python3 -m pip install "pip>=7.1.0"
- python3 -m pip install tox-travis tox codecov

script: CFLAGS="$CFLAGS_warnings $CFLAGS_std" python3 -m tox
29 changes: 29 additions & 0 deletions Build/build-openbsd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
WRKDIST= ${.CURDIR}/../..
VERSION!= sh ${WRKDIST}/Build/version.sh

PKGNAME= python-ldap-${VERSION}
RUN_DEPENDS= python:lang/python
CATEGORIES= misc
MAINTAINER= leonard@users.sourceforge.net
HOMEPAGE= https://www.python-ldap.org/

FAKE= Yes
CONFIGURE_STYLE= gnu
SEPARATE_BUILD= Yes
EXTRACT_ONLY=

CONFIGURE_ARGS+= --with-ldap=${LOCALBASE}

do-fetch:;

#-- put package on sourceforge ftp server
export-ftp: ${PKGFILE}
scp ${PKGFILE} python-ldap.sourceforge.net:/home/groups/ftp/pub/python-ldap/${PKGNAME}-${OPSYS}-${ARCH}${PKG_SUFX}

post-build:
sed -e 's,^${PREFIX}/,,' <${WRKBUILD}/filelist >${WRKBUILD}/filelist2

SED_PLIST+= |sed -e '/^%%filelist/r${WRKBUILD}/filelist2' -e '//d'
ALL_TARGET= build filelist

.include <bsd.port.mk>
1 change: 1 addition & 0 deletions Build/build-openbsd/pkg/COMMENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Python interface to LDAP
2 changes: 2 additions & 0 deletions Build/build-openbsd/pkg/DESCR
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This Python library provides access to the LDAP (Lightweight Directory Access
Protocol) RFC1823 C interface.
3 changes: 3 additions & 0 deletions Build/build-openbsd/pkg/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@comment $OpenBSD$
%%filelist
@dirrm lib/python1.6/site-packages/python-ldap
33 changes: 33 additions & 0 deletions Build/setup.cfg.mingw
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Win32 setup.cfg
# You have to edit this file to reflect your system configuration

# Section for compiling the C extension module
# for wrapping OpenLDAP 2 libs

# Platform: Win32
# Compile environment: MinGW
[_ldap]
class = OpenLDAP2
maintainer = Mauro Cicognini
defines = WIN32

# modify these to fit your local configuration
library_dirs = C:/msys/1.0/home/mcicogni/openldap-mingw-build-4/openldap-2.2.18/libraries/libldap_r/.libs C:/msys/1.0/home/mcicogni/openldap-mingw-build-4/openldap-2.2.18/libraries/liblber/.libs C:\msys\1.0\home\mcicogni\openldap-mingw-build-4\openssl-0.9.7e
include_dirs = C:/msys/1.0/home/mcicogni/openldap-mingw-build-4/openldap-2.2.18/include

extra_compile_args =
extra_objects =

libs = ldap_r lber ssl crypto ws2_32 gdi32

[build]
compiler = mingw32

# Installation options
[install]
compile = 1
optimize = 1
record = python-ldap_install.log

[bdist_wininst]
target_version = 2.4
32 changes: 32 additions & 0 deletions Build/setup.cfg.suse-linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Example for setup.cfg
# You have to edit this file to reflect your system configuation

[_ldap]
# Section for compiling the C extension module
# for wrapping OpenLDAP 2 libs

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

extra_compile_args =
extra_objects =

# Example for full-featured SuSE build:
# 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

[install]
# Installation options
compile = 1
optimize = 1

# For SuSE Linux 8.2
[bdist_rpm]
provides = python-ldap
requires = python openldap2-client openssl cyrus-sasl2
distribution_name = SuSE Linux 8.2
release = 1
packager = Michael Stroeder <michael@stroeder.com>
doc_files = CHANGES README INSTALL TODO Demo/
33 changes: 33 additions & 0 deletions Build/setup.cfg.win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Section for compiling the C extension module
# for wrapping OpenLDAP 2 libs

# Platform: Win32
# Compile environment: Microsoft Visual Studio .NET 2003
[_ldap]
class = OpenLDAP2
defines = WIN32

# Cannot have SSL/TLS support under Win32 for the moment
# (OpenLDAP 2.x port is incomplete)
libs = olber32 oldap_r ws2_32 libsasl

# Set these to your correct Openldap and Cyrus-sasl paths
library_dirs = ../openldap/openldap-2.1.22/Release ../openldap/cyrus-sasl/lib
include_dirs = ../openldap/openldap-2.1.22/include ../openldap/cyrus-sasl/include

# Needs to compile as /MT ("MS libs to use: multithreaded statically-linked")
# instead of /MD ("MS libs to use: multithreaded DLL") which is distutils' default
# because OpenLDAP libs compile that way, too
# This may change, however
extra_compile_args = /MT
extra_link_args = /NODEFAULTLIB:msvcrt.lib

# Pull in SASL DLL as a convenience to end-user (which almost never will have it)
# Destination path is a rather crude hack, but site-packages would be created anyway
# Set source path to your Cyrus-sasl lib path
extra_files = Lib/site-packages:../openldap/cyrus-sasl/lib/libsasl.dll

# Installation options
[install]
compile = 1
record = python-ldap_install.log
Loading

0 comments on commit 45c1dac

Please sign in to comment.