This builds a python3 package for libiio
---
 debian/control                | 14 +++++++++++++-
 debian/python3-libiio.install |  2 ++
 debian/rules                  |  8 ++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 debian/python3-libiio.install

diff --git a/debian/control b/debian/control
index 9c595f9..70323d2 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,8 @@ Build-Depends: bison,
               libusb-1.0-0-dev [linux-any],
               libusb2-dev [kfreebsd-any],
               libxml2-dev,
-               python-dev
+               python-dev,
+               python3-dev
 Standards-Version: 4.1.4
 Homepage: https://github.com/analogdevicesinc/libiio
 Vcs-Browser: https://github.com/ev3dev/libiio
@@ -78,6 +79,17 @@ Description: Python bindings for libiio
  .
  This package contains the Python bindings for libiio.
 
+Package: python3-libiio
+Section: python
+Architecture: all
+Depends: libiio0 (>= ${binary:Version}), ${misc:Depends}, ${python3:Depends}
+Description: Python bindings for libiio
+ Libiio is a library that has been conceived to ease the development of
+ applications interfacing Industrial Input/Output (IIO) devices through
+ the IIO subsystem of the Linux kernel.
+ .
+ This package contains the Python bindings for libiio.
+
 Package: libiio0-doc
 Section: doc
 Architecture: all
diff --git a/debian/python3-libiio.install b/debian/python3-libiio.install
new file mode 100644
index 0000000..4755228
--- /dev/null
+++ b/debian/python3-libiio.install
@@ -0,0 +1,2 @@
+usr/lib/python3.5/site-packages/*.egg-info usr/lib/python3/dist-packages
+usr/lib/python3.5/site-packages/*.py usr/lib/python3/dist-packages
diff --git a/debian/rules b/debian/rules
index 8c01998..67010ea 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,14 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture 
-qDEB_HOST_MULTIARCH)
 override_dh_auto_configure:
        dh_auto_configure -- -DINSTALL_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)
 
+override_dh_auto_build:
+       dh_auto_build
+       python3 obj-$(DEB_HOST_MULTIARCH)/bindings/python/setup.py build
+
+override_dh_auto_install:
+       dh_auto_install
+       python3 obj-$(DEB_HOST_MULTIARCH)/bindings/python/setup.py install 
--root=debian/tmp/ --prefix=/usr
+
 override_dh_compress:
        dh_compress -X.c -X.C
 
-- 
2.17.1

Reply via email to