Hi,

Attached is a patch to add py3 support back.

-- 
t
From 521a9da2120655d60bfaae0ea67871865ec546ad Mon Sep 17 00:00:00 2001
From: Timo Aaltonen <tjaal...@debian.org>
Date: Fri, 25 May 2018 14:58:09 +0300
Subject: [PATCH] Add py3 support back

---
 debian/control                              | 25 ++++++++++++++++++++-
 debian/patches/series                       |  1 +
 debian/python3-talloc-dev.install           |  4 ++++
 debian/python3-talloc-dev.lintian-overrides |  1 +
 debian/python3-talloc.install               |  2 ++
 debian/python3-talloc.lintian-overrides     |  1 +
 debian/python3-talloc.symbols               | 24 ++++++++++++++++++++
 debian/rules                                |  6 +++--
 8 files changed, 61 insertions(+), 3 deletions(-)
 create mode 100644 debian/patches/series
 create mode 100755 debian/python3-talloc-dev.install
 create mode 100644 debian/python3-talloc-dev.lintian-overrides
 create mode 100644 debian/python3-talloc.install
 create mode 100644 debian/python3-talloc.lintian-overrides
 create mode 100644 debian/python3-talloc.symbols

diff --git a/debian/control b/debian/control
index e19e5c3..060a51d 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,8 @@ Build-Depends: debhelper (>= 11),
   dh-exec,
   dh-python,
   libpopt-dev,
-  python-dev (>= 2.6.6-3)
+  python-dev (>= 2.6.6-3),
+  python3-dev,
 Standards-Version: 4.1.3
 Vcs-Browser: https://salsa.debian.org/samba-team/talloc
 Vcs-Git: https://salsa.debian.org/samba-team/talloc.git
@@ -56,3 +57,25 @@ Description: talloc Python bindings - development files
  reference counting to determine when memory should be freed.
  .
  This package contains the development files for the Python bindings.
+
+Package: python3-talloc
+Pre-Depends: ${misc:Pre-Depends}
+Architecture: any
+Section: python
+Provides: ${python3:Provides}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}
+Description: hierarchical pool based memory allocator - Python3 bindings
+ A hierarchical pool based memory allocator with destructors. It uses
+ reference counting to determine when memory should be freed.
+ .
+ This package contains the Python3 bindings.
+
+Package: python3-talloc-dev
+Architecture: any
+Section: libdevel
+Depends: python3-talloc (= ${binary:Version}), ${misc:Depends}, pkg-config
+Description: talloc Python3 bindings - development files
+ A hierarchical pool based memory allocator with destructors. It uses
+ reference counting to determine when memory should be freed.
+ .
+ This package contains the development files for the Python3 bindings.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..08a8758
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+pytalloc-util-name.diff
diff --git a/debian/python3-talloc-dev.install b/debian/python3-talloc-dev.install
new file mode 100755
index 0000000..3c4f02d
--- /dev/null
+++ b/debian/python3-talloc-dev.install
@@ -0,0 +1,4 @@
+#! /usr/bin/dh-exec
+usr/include/pytalloc.h ${DEB_PY3_INCDIR}
+usr/lib/*/pkgconfig/pytalloc-util.cpython-*.pc
+usr/lib/*/libpytalloc-util.cpython*.so
diff --git a/debian/python3-talloc-dev.lintian-overrides b/debian/python3-talloc-dev.lintian-overrides
new file mode 100644
index 0000000..ed4653d
--- /dev/null
+++ b/debian/python3-talloc-dev.lintian-overrides
@@ -0,0 +1 @@
+python-talloc-dev binary: wrong-section-according-to-package-name python-talloc-dev => python
diff --git a/debian/python3-talloc.install b/debian/python3-talloc.install
new file mode 100644
index 0000000..34ab764
--- /dev/null
+++ b/debian/python3-talloc.install
@@ -0,0 +1,2 @@
+usr/lib/python3/dist-packages/talloc.cpython*.so
+usr/lib/*/libpytalloc-util.cpython*.so.*
diff --git a/debian/python3-talloc.lintian-overrides b/debian/python3-talloc.lintian-overrides
new file mode 100644
index 0000000..e4d2d79
--- /dev/null
+++ b/debian/python3-talloc.lintian-overrides
@@ -0,0 +1 @@
+python3-talloc binary: package-name-doesnt-match-sonames
diff --git a/debian/python3-talloc.symbols b/debian/python3-talloc.symbols
new file mode 100644
index 0000000..0424e9b
--- /dev/null
+++ b/debian/python3-talloc.symbols
@@ -0,0 +1,24 @@
+libpytalloc-util.cpython-36m-x86-64-linux-gnu.so.2 python3-talloc #MINVER#
+ PYTALLOC_UTIL.CPYTHON_36M_X86_64_LINUX_GNU_2.1.11@PYTALLOC_UTIL.CPYTHON_36M_X86_64_LINUX_GNU_2.1.11 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.10@PYTALLOC_UTIL.PY3_2.1.10 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.11@PYTALLOC_UTIL.PY3_2.1.11 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.5@PYTALLOC_UTIL.PY3_2.1.5 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.6@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.7@PYTALLOC_UTIL.PY3_2.1.7 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.8@PYTALLOC_UTIL.PY3_2.1.8 2.1.11
+ PYTALLOC_UTIL.PY3_2.1.9@PYTALLOC_UTIL.PY3_2.1.9 2.1.11
+ _pytalloc_check_type@PYTALLOC_UTIL.PY3_2.1.9 2.1.11
+ _pytalloc_get_mem_ctx@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ _pytalloc_get_ptr@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ _pytalloc_get_type@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ pytalloc_BaseObject_PyType_Ready@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ pytalloc_BaseObject_check@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ pytalloc_BaseObject_size@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ pytalloc_Check@PYTALLOC_UTIL.PY3_2.1.5 2.1.11
+ pytalloc_GenericObject_reference_ex@PYTALLOC_UTIL.PY3_2.1.9 2.1.11
+ pytalloc_GenericObject_steal_ex@PYTALLOC_UTIL.PY3_2.1.9 2.1.11
+ pytalloc_GetBaseObjectType@PYTALLOC_UTIL.PY3_2.1.6 2.1.11
+ pytalloc_GetObjectType@PYTALLOC_UTIL.PY3_2.1.5 2.1.11
+ pytalloc_reference_ex@PYTALLOC_UTIL.PY3_2.1.5 2.1.11
+ pytalloc_steal@PYTALLOC_UTIL.PY3_2.1.5 2.1.11
+ pytalloc_steal_ex@PYTALLOC_UTIL.PY3_2.1.5 2.1.11
diff --git a/debian/rules b/debian/rules
index ca125b4..358aa96 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,12 +17,13 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 conf_args = --prefix=/usr --disable-rpath-install --disable-rpath --bundled-libraries=NONE
 conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 conf_args += --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
+conf_args += --extra-python=python3
 conf_args += -v
 
 export PYTHON="$(shell which `pyversions -d`)"
 
 %:
-	dh $* --with python2
+	dh $* --with python2,python3
 
 override_dh_python2:
 	dh_python2 --no-guessing-versions
@@ -40,6 +41,7 @@ endif
 
 override_dh_install:
 	DEB_PY2_INCDIR=$(shell python-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
+	DEB_PY3_INCDIR=$(shell python3-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
 		dh_install --list-missing
 
 get-packaged-orig-source:
@@ -68,4 +70,4 @@ override_dh_strip:
 
 override_dh_makeshlibs:
 	dh_makeshlibs -plibtalloc2 -- -c4
-	dh_makeshlibs -ppython-talloc -Xtalloc. -- -c3
+	dh_makeshlibs -ppython-talloc -ppython3-talloc -Xtalloc. -- -c3
-- 
2.17.0

Reply via email to