package/gnuradio: add python3 support
authorGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Fri, 17 Jan 2020 11:02:30 +0000 (12:02 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 3 Feb 2020 22:43:33 +0000 (23:43 +0100)
gnuradio 3.8.0.0 support both python2 and python3.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/gnuradio/Config.in
package/gnuradio/gnuradio.mk

index 72458f09614cc99d817a14b0bdc7d2c690da893b..6d438bcd6f19249836fd72763a93447435a1c323 100644 (file)
@@ -1,6 +1,5 @@
 comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
        depends on BR2_USE_MMU
-       depends on !BR2_PACKAGE_PYTHON3
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
                !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
 
@@ -14,7 +13,6 @@ config BR2_PACKAGE_GNURADIO
        depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
        depends on BR2_USE_MMU # use fork()
        depends on BR2_USE_WCHAR # boost
-       depends on !BR2_PACKAGE_PYTHON3
        depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
        select BR2_PACKAGE_BOOST
        select BR2_PACKAGE_BOOST_ATOMIC
@@ -65,7 +63,7 @@ config BR2_PACKAGE_GNURADIO_FEC
 
 config BR2_PACKAGE_GNURADIO_PYTHON
        bool "python support"
-       depends on BR2_PACKAGE_PYTHON
+       depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
        depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
        depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
        select BR2_PACKAGE_BOOST_PYTHON
index a1dbb78e6eb8ac5639a844cf768b5f1fd8c63d45..41d4619f72415d41c66f76b485ea5a1ca9999d8e 100644 (file)
@@ -13,6 +13,7 @@ GNURADIO_SUPPORTS_IN_SOURCE_BUILD = NO
 
 # host-python-mako and host-python-six are needed for volk to compile
 GNURADIO_DEPENDENCIES = \
+       $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) \
        host-python-mako \
        host-python-six \
        host-swig \
@@ -107,7 +108,7 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y)
-GNURADIO_DEPENDENCIES += python
+GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),python3,python)
 GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
 else
 GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF