package/libiio: add support for Python 3.x bindings

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>
This commit is contained in:
Béla Becker 2017-10-05 13:33:25 +02:00 committed by Thomas Petazzoni
parent ae531565f0
commit 6c4b027f9d
2 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,7 @@ config BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP
config BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON config BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
bool "Install Python bindings" bool "Install Python bindings"
depends on BR2_PACKAGE_PYTHON depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
help help
Install the Python bindings. Install the Python bindings.

View File

@ -60,7 +60,11 @@ LIBIIO_DEPENDENCIES += avahi
endif endif
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y) ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
ifeq ($(BR2_PACKAGE_PYTHON),y)
LIBIIO_DEPENDENCIES += python LIBIIO_DEPENDENCIES += python
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
LIBIIO_DEPENDENCIES += python3
endif
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
else else
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF