From patchwork Mon Jun 17 20:08:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1117478 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Hz2TaCGE"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45SMkF1Wwbz9sBr for ; Tue, 18 Jun 2019 06:09:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AiSoEqsFUDukkafPDxVFOG8geFUIglmJqsL/DB+y4rM=; b=Hz2TaCGEIftzZz 8BrUq93nt5SOW5oaa4wRuYmbTu4+JSDPy+02f2siGDMtfB8e4ZV84c60LX7ef7F30mgQrRb6mh/XH UMlxZKxnWJQq/OUC/O+WaV2GIyij5lSx5CdtZwk40ty9mdGPxG1WbGEvJdiOlzqoLCtIRTTywzL/n HtU+rEOjnoU8+V3O9ooRIT3EtA3icjJsUZv+VuJYT8G0aqPYJv5YlVpONx2/Ci4Tm7WBDoC7SH3Ly y8BrkOWE8/LlKqMeGY0UycXuqL5Qb2XQebqDRw3Mjj5mML/62532znU2U+TyWTbmokUNkPzTR2kWl 4mZDA89H52ChYFxZbRnQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hcxwF-0006Jb-I0; Mon, 17 Jun 2019 20:09:11 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hcxwB-0006Hg-9t for openwrt-devel@lists.openwrt.org; Mon, 17 Jun 2019 20:09:09 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 971D24FB6; Mon, 17 Jun 2019 22:09:05 +0200 (CEST) Received: by meh.true.cz (OpenSMTPD) with ESMTP id ea7b0587; Mon, 17 Jun 2019 22:09:04 +0200 (CEST) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Mon, 17 Jun 2019 22:08:54 +0200 Message-Id: <1560802136-4157-5-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1560802136-4157-1-git-send-email-ynezz@true.cz> References: <1560802136-4157-1-git-send-email-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190617_130907_509433_F9182926 X-CRM114-Status: UNSURE ( 8.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH 4/6] tools/scons: switch to Python 3 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Build tested on ath79 with following packages from packages feed which build depends on scons. None of them build anymore as it seems, that the SConscripts are written for Python2. * packages/net/iotivity (KO, doesn't build even with latest 1.3.1 release) SyntaxError: invalid syntax File "/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.2.1/build_common/SConscript", line 40 print "\nError: Current system (%s) isn't supported\n" % host LookupError: unknown encoding: string_escape: File "/home/petr/testing/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.3.1/SConstruct", line 28: SConscript('build_common/SConscript') * packages/net/smartsnmpd (KO, seems dead, no commit since 2015): SyntaxError: Missing parentheses in call to 'print' File "/openwrt/build_dir/target-mips_24kc_musl/smartsnmpd-2014-08-13/SConstruct", line 156 print "Can't find liblua or liblua5.1!" * packages/utils/gpsd (KO, doesn't build even with latest 3.18.1 release): AttributeError: 'list' object has no attribute 'keys': File "/openwrt/build_dir/target-mips_24kc_musl/gpsd-3.18.1/SConstruct", line 1758: all_manpages = list(base_manpages.keys()) + list(python_manpages.keys()) Signed-off-by: Petr Štetiar --- tools/scons/files/pywrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/scons/files/pywrap.sh b/tools/scons/files/pywrap.sh index f62f590e0bce..53910e947209 100755 --- a/tools/scons/files/pywrap.sh +++ b/tools/scons/files/pywrap.sh @@ -5,11 +5,11 @@ case "${0##*/}" in *) arg1="$0.py" ;; esac -for bin in python python2 python2.7 python2.6 python2.5 python2.4; do +for bin in python python3; do case "$($bin -V 2>&1)" in - "Python 2"*) exec $bin $arg1 "$@" ;; + "Python 3"*) exec $bin $arg1 "$@" ;; esac done -echo "Unable to find a Python 2.x interpreter for executing ${arg1:+$arg1 }$@ !" >&2 +echo "Unable to find a Python 3.x interpreter for executing ${arg1:+$arg1 }$@ !" >&2 exit 1