From patchwork Sun Oct 11 08:29:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 1380270 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=korsgaard.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=u1OhBLU4; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C8FNq4HPqz9sTL for ; Sun, 11 Oct 2020 19:30:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 12F2187954; Sun, 11 Oct 2020 08:30:00 +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 MCMZyLtXcWTP; Sun, 11 Oct 2020 08:29:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 848EF871F0; Sun, 11 Oct 2020 08:29:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 386A81BF2A6 for ; Sun, 11 Oct 2020 08:29:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 351FA20242 for ; Sun, 11 Oct 2020 08:29:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JhYYpzi6zFSn for ; Sun, 11 Oct 2020 08:29:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by silver.osuosl.org (Postfix) with ESMTPS id 9E8CF20130 for ; Sun, 11 Oct 2020 08:29:55 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id e22so19049538ejr.4 for ; Sun, 11 Oct 2020 01:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7xSugjYPnM8aBrs54TD/zFtpoCKDb21a1iF2Ilpadtw=; b=u1OhBLU4X3XfrTP52RFem7yIeICLvDUg8l2MFxjjHDfaCTqSaiT7SZY/+5lZkwfaCz EXjH0dGgKHbFzbK8pX2I0EBLulDhI16RobuT+l5sXEKftaQrwNBrPd7jB5TDxYc/QxRO T/ZGACtK1K/HAq6UYa2AhVjsrp2OEPUetQoPb4Xl56mqnQ56YpEOW/PF1ZbDVKQJ/c4/ S1zcVSEZS+v5yczWlZA36tUcEOf+BhMpYApE9L3bEBfc19CFJqLU0NBe0Mc6+/ex2W46 0SgYGTlghBrusamewMS+vZTAFuDsmF1z408mckodLYfJd0QaYtXbyna1IZJgWdx3PqIg aEGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=7xSugjYPnM8aBrs54TD/zFtpoCKDb21a1iF2Ilpadtw=; b=hx12oJ/CoRd9h6YmxZB43RjeRhWo+wA8m4lqo6CHHZO2+XN3XCYrd6fDQiAewGur0l Hp9kJ7I89rNYxG5Yz1l051uKqov/kavFaux84f9SCImAvqOQ0jvrCryLNGBPViGtQnSg 4/b5v8g6B0AsBF83vv8Vea0iGrV2IFUJ+3LOlkMIbm/GaW4MKz+yKBi8FfYwhT0mOR8b p6cS1MmbYmb2DC8yi40FdIb5QwLf+K1z48Woz5H0VHxU4fkVKbgFDElzwL5T2777oa1I /bv7zLy9vBS59umhd35rcG+oZcYPYt8JPXvZdr3LE9mTGEXF6BYKv493dX7IUp8AYvd7 LZIQ== X-Gm-Message-State: AOAM533mE6Huk0uLpx2NX3fMbVWTyM+DX6r945Zc9Kngkj1CTgSdU2ni ctky8rSG2TXODdFPjJpKF0l/VFLRs9I= X-Google-Smtp-Source: ABdhPJzI6Z6Zj9j5fHBL9dSnz/11kVyqqDXp8N3YLIZvZlXTZJhItJADJ12X+FuQZea99D8FIs6FnQ== X-Received: by 2002:a17:906:2e0e:: with SMTP id n14mr22100001eji.120.1602404993604; Sun, 11 Oct 2020 01:29:53 -0700 (PDT) Received: from dell.be.48ers.dk (d51A5BC31.access.telenet.be. [81.165.188.49]) by smtp.gmail.com with ESMTPSA id h26sm2737738edr.71.2020.10.11.01.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 01:29:52 -0700 (PDT) Received: from peko by dell.be.48ers.dk with local (Exim 4.92) (envelope-from ) id 1kRWjo-0002V5-8a; Sun, 11 Oct 2020 10:29:52 +0200 From: Peter Korsgaard To: buildroot@buildroot.org Date: Sun, 11 Oct 2020 10:29:42 +0200 Message-Id: <20201011082943.9561-1-peter@korsgaard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH-2020.02.x] package/python-autobahn: drop asyncio files for python 2.x to fix pycompile issu 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: Peter Korsgaard , Mauro Condarelli , Asaf Kahlon Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: http://autobuild.buildroot.net/results/234/234913f86da45df0708bbe3bf7361169e2398c9f Autobahn contains optional logic using asyncio, which causes pycompile issues when running in python 2.x: pycompile.py --strip-root /srv/storage/autobuild/run/instance-1/output-1/target /srv/storage/autobuild/run/instance-1/output-1/target/usr/lib/python2.7 error: File "/usr/lib/python2.7/site-packages/autobahn/xbr/_blockchain.py", line 97 async def get_market_status(self, market_id): ^ SyntaxError: invalid syntax As a workaround, simply drop the unusable files from TARGET_DIR if building for python 2.x. Signed-off-by: Peter Korsgaard --- Only for 2020.02.x. Newer autobahn versions are python3 only --- package/python-autobahn/python-autobahn.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/python-autobahn/python-autobahn.mk b/package/python-autobahn/python-autobahn.mk index 6c5c608b9a..4b367177a6 100644 --- a/package/python-autobahn/python-autobahn.mk +++ b/package/python-autobahn/python-autobahn.mk @@ -11,4 +11,15 @@ PYTHON_AUTOBAHN_LICENSE = MIT PYTHON_AUTOBAHN_LICENSE_FILES = LICENSE PYTHON_AUTOBAHN_SETUP_TYPE = setuptools +ifeq ($(BR2_PACKAGE_PYTHON),y) +# only needed/valid for python 3.x +define PYTHON_AUTOBAHN_RM_PY3_FILES + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/autobahn/asyncio \ + $(TARGET_DIR)/usr/lib/python*/site-packages/autobahn/xbr \ + $(TARGET_DIR)/usr/lib/python*/site-packages/autobahn/twisted/xbr.py +endef + +PYTHON_AUTOBAHN_POST_INSTALL_TARGET_HOOKS += PYTHON_AUTOBAHN_RM_PY3_FILES +endif + $(eval $(python-package))