Python3 support has been added upstream in 3.0.0b*. The attached diff
updates the packaging for the latest release, 3.0.0b3.

diff --git a/debian/changelog b/debian/changelog
index 1555050..37c286f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-ldap (3.0.0~b3-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+    - drop 01_setup_cfg.diff, obsolete
+  * Package python3-ldap. (Closes: #884882)
+
+ -- Timo Aaltonen <[email protected]>  Thu, 21 Dec 2017 00:31:37 +0200
+
 python-ldap (2.5.2-1) unstable; urgency=low
 
   * New maintainer (Closes: #868690).
diff --git a/debian/control b/debian/control
index e13137c..7a83e06 100644
--- a/debian/control
+++ b/debian/control
@@ -4,11 +4,18 @@ Priority: optional
 Maintainer: Willem van den Akker <[email protected]>
 Standards-Version: 4.1.1
 Build-Depends: debhelper (>= 10), python-all-dev (>= 2.6.6-3~), python-all-dbg,
- libldap2-dev, libsasl2-dev, dh-python
+ libldap2-dev, libsasl2-dev, dh-python,
+ python3-all-dev,
+ python3-all-dbg,
+ python-setuptools,
+ python3-setuptools,
+ python-pyasn1-modules,
+ python3-pyasn1-modules,
 Homepage: https://www.python-ldap.org
 Vcs-Browser: 
https://anonscm.debian.org/cgit/users/wvdakker-guest/python-ldap.git
 Vcs-Git: git://anonscm.debian.org/users/wvdakker-guest/python-ldap.git
 X-Python-Version: >= 2.3
+X-Python3-Version: >= 3.3
 
 Package: python-ldap
 Architecture: any
@@ -21,6 +28,15 @@ Description: LDAP interface module for Python
  This module provides a Python interface to the OpenLDAP client library
  (LDAP is the Lightweight Directory Access Protocol).
 
+Package: python3-ldap
+Architecture: any
+Depends: ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends}
+Provides: ${python3:Provides}
+Suggests: python-ldap-doc, python3-pyasn1
+Description: LDAP interface module for Python3
+ This module provides a Python3 interface to the OpenLDAP client library
+ (LDAP is the Lightweight Directory Access Protocol).
+
 Package: python-ldap-dbg
 Section: debug
 Priority: optional
@@ -32,3 +48,15 @@ Description: LDAP interface module for Python (debug 
extension)
  (LDAP is the Lightweight Directory Access Protocol).
  .
  This package contains the extension built for the Python debug interpreter.
+
+Package: python3-ldap-dbg
+Section: debug
+Priority: optional
+Architecture: any
+Depends: python3-ldap (= ${binary:Version}), python3-dbg, ${python3:Depends}, 
${misc:Depends}, ${shlibs:Depends}
+Provides: ${python3:Provides}
+Description: LDAP interface module for Python3 (debug extension)
+ This module provides a Python3 interface to the OpenLDAP client library
+ (LDAP is the Lightweight Directory Access Protocol).
+ .
+ This package contains the extension built for the Python debug interpreter.
diff --git a/debian/patches/01_setup_cfg.diff b/debian/patches/01_setup_cfg.diff
deleted file mode 100644
index 8412614..0000000
--- a/debian/patches/01_setup_cfg.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Adjust paths and libraries in setup.cfg
-Forwarded: non-needed
-Author: Matej Vela <[email protected]>
-Last-Update: 2011-04-30
-
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -1,5 +1,5 @@
- [_ldap]
--library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
-+library_dirs =
- include_dirs = /usr/include /usr/include/sasl /usr/local/include 
/usr/local/include/sasl
- defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
- extra_compile_args = 
diff --git a/debian/patches/series b/debian/patches/series
index 66c910f..a82d1b4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-01_setup_cfg.diff
+#placeholder
diff --git a/debian/python-ldap-dbg.install b/debian/python-ldap-dbg.install
deleted file mode 100644
index 9402eb7..0000000
--- a/debian/python-ldap-dbg.install
+++ /dev/null
@@ -1 +0,0 @@
-debian/tmp/usr/lib/python*/*-packages/_ldap_d.so
diff --git a/debian/python-ldap.install b/debian/python-ldap.install
deleted file mode 100644
index 96b7ca4..0000000
--- a/debian/python-ldap.install
+++ /dev/null
@@ -1,4 +0,0 @@
-debian/tmp/usr/lib/python*/*-packages/_ldap.so
-debian/tmp/usr/lib/python*/*-packages/*.egg-info
-debian/tmp/usr/lib/python*/*-packages/*.py
-debian/tmp/usr/lib/python*/*-packages/*/
diff --git a/debian/rules b/debian/rules
index 5bd7444..6516fb4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,15 @@
 #!/usr/bin/make -f
 
+export PYBUILD_NAME = ldap
+
 %:
-       dh $@ --with python2
+       dh $@ --with python2,python3 --buildsystem=pybuild
 
 override_dh_installdocs:
        dh_installdocs --link-doc=python-ldap
 
 override_dh_strip:
-       dh_strip --dbg-package=python-ldap-dbg
+       dh_strip -ppython-ldap --dbg-package=python-ldap-dbg
+       dh_strip -ppython3-ldap --dbg-package=python3-ldap-dbg
+
+#override_dh_auto_test:

Reply via email to