package/libiio: add support for Python 3.x bindings
authorBéla Becker <bela.becker@pcbdesign.hu>
Thu, 5 Oct 2017 11:33:25 +0000 (13:33 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 7 Oct 2017 21:13:26 +0000 (23:13 +0200)
Python3 support was added to libiio in version 0.10.
This commit adds the option to compile libiio bindings if python3 was
selected instead of python.

Signed-off-by: Béla Becker <bela.becker@pcbdesign.hu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libiio/Config.in
package/libiio/libiio.mk

index 75f6f3a8471ba29049655785e49eb16eadc959de..baa163126a0dddec6e0c3b9d50074226976b8fbe 100644 (file)
@@ -96,7 +96,7 @@ config BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP
 
 config BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
        bool "Install Python bindings"
-       depends on BR2_PACKAGE_PYTHON
+       depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
        help
          Install the Python bindings.
 
index d066ae0314e7a8e3701cc30533f9f618432bcb2b..0b13064085db3f89fb2e8aa9193cbc2ca18a21fc 100644 (file)
@@ -60,7 +60,11 @@ LIBIIO_DEPENDENCIES += avahi
 endif
 
 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
+ifeq ($(BR2_PACKAGE_PYTHON),y)
 LIBIIO_DEPENDENCIES += python
+else ifeq ($(BR2_PACKAGE_PYTHON3),y)
+LIBIIO_DEPENDENCIES += python3
+endif
 LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
 else
 LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF