From patchwork Thu Sep 5 13:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1158470 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=trabucayre.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46PMyt2xNnz9sNk for ; Fri, 6 Sep 2019 00:10:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 658D486BBC; Thu, 5 Sep 2019 14:10:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CvagUVetDcM8; Thu, 5 Sep 2019 14:10:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2A99C85775; Thu, 5 Sep 2019 14:10:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0C63D1BF29C for ; Thu, 5 Sep 2019 14:08:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0889387CBE for ; Thu, 5 Sep 2019 14:08:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HdRaK6i3atpP for ; Thu, 5 Sep 2019 14:08:10 +0000 (UTC) X-Greylist: delayed 00:07:00 by SQLgrey-1.7.6 Received: from mail (kmf.trabucayre.com [91.121.117.161]) by whitealder.osuosl.org (Postfix) with ESMTP id 9EEC787CB6 for ; Thu, 5 Sep 2019 14:08:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by mail (Postfix) with ESMTP id E283E3985C; Thu, 5 Sep 2019 15:40:44 +0200 (CEST) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Thu, 5 Sep 2019 15:40:42 +0200 Message-Id: <1567690842-33954-3-git-send-email-gwenj@trabucayre.com> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1567690842-33954-2-git-send-email-gwenj@trabucayre.com> References: <1567690842-33954-1-git-send-email-gwenj@trabucayre.com> <1567690842-33954-2-git-send-email-gwenj@trabucayre.com> Subject: [Buildroot] [PATCH] package:gnuradio: move to python3 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gwenhael Goavec-Merou MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou gnuradio 3.8.0.0 support both python2 and python3 but python2 is EOL, so move explicitly to python3. - depends on python3 to avoid issues with mako at the build time - add full path to python3 interpreter - by default gnuradio install python libraries in dist-packages. To force installation in site-packages add GR_PYTHON_DIR in CONF_OPTS - when python support is enabled python-six is mandatory at runtime Signed-off-by: Gwenhael Goavec-Merou --- package/gnuradio/Config.in | 7 ++++--- package/gnuradio/gnuradio.mk | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in index f07bd3d976..85728fa870 100644 --- a/package/gnuradio/Config.in +++ b/package/gnuradio/Config.in @@ -1,6 +1,6 @@ comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library" depends on BR2_USE_MMU - depends on !BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS @@ -11,7 +11,7 @@ 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_PACKAGE_PYTHON select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_ATOMIC select BR2_PACKAGE_BOOST_DATE_TIME @@ -61,11 +61,12 @@ config BR2_PACKAGE_GNURADIO_FEC config BR2_PACKAGE_GNURADIO_PYTHON bool "python support" - depends on BR2_PACKAGE_PYTHON + depends on 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 select BR2_PACKAGE_PYTHON_NUMPY # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime help Enable python component diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk index 162d0c0311..9bdc7dd5fb 100644 --- a/package/gnuradio/gnuradio.mk +++ b/package/gnuradio/gnuradio.mk @@ -25,6 +25,7 @@ GNURADIO_DEPENDENCIES += orc endif GNURADIO_CONF_OPTS = \ + -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR)m \ -DENABLE_DEFAULT=OFF \ -DENABLE_VOLK=ON \ -DENABLE_GNURADIO_RUNTIME=ON \ @@ -118,8 +119,9 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF endif ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) -GNURADIO_DEPENDENCIES += python +GNURADIO_DEPENDENCIES += python3 python-six GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON +GNURADIO_CONF_OPTS += -DGR_PYTHON_DIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages else GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF endif