From patchwork Mon Feb 6 19:36:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 724661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vHHm13FSlz9s1y for ; Tue, 7 Feb 2017 06:36:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OxQyNhst"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3E39530987; Mon, 6 Feb 2017 19:36:47 +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 whrPITmZzgfY; Mon, 6 Feb 2017 19:36:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 81F303096D; Mon, 6 Feb 2017 19:36:44 +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 614121C0349 for ; Mon, 6 Feb 2017 19:36:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 576993096D for ; Mon, 6 Feb 2017 19:36:43 +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 cgJLwtEwOFGs for ; Mon, 6 Feb 2017 19:36:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by silver.osuosl.org (Postfix) with ESMTPS id 7408D30964 for ; Mon, 6 Feb 2017 19:36:42 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id u63so23856664wmu.2 for ; Mon, 06 Feb 2017 11:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=cMero3eo2lyW3h5hBfExseJPcBQsvHlj3ezrs56kQV8=; b=OxQyNhsttwIcOGmeheRrqt+yzAi2aaEW4PDqIDwd2E2nua4YQNrDiwh4nLp9KqRzzE ls2ALaYf/msJVAzwsffj6MAnpx9EV71gdc7T41Cic8vSp7A/UIPOqpkPxrVODcH59vbV uPCZ6j2hMglDEGvQt2dC+s0oBE6IUQP6vgrPIvVCFc7VnmTxF6Ty7IrPGfv1aXrECe+2 FYTy94I4Y5RZTV0lmzayQWGHJ54+op/7bvv2azGrg4qDMouiAvYr+NXicPlPlBTV4h9A Ymu42Z7ublRnsSMeSt00VkcWDmsSYg0xydTZtxAJU0a/oGfoE3Hio5baiYqxNR2hhGgX em6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cMero3eo2lyW3h5hBfExseJPcBQsvHlj3ezrs56kQV8=; b=Lys/vLKl2eVHgMIYNxi2isIGGM83Vi86OgXPHUKruHRAhpkIcTDBG+F8Y1UivVccWn lYub8pnbmzMzA8D3maPATwMb9sC5R4tIzfGEqJ1/d6ffTcaLpbiZu58fyY4ntQr0AeFr QMww+nyJH+/p76GjXxfM57KIbMqrCxTdKmewR0poOA/Cd8nx6CKCJ1Y+yd/x9BjbwTES tBWVAqLWv9nUr762/GAD/4igaois2Dgama4brfbI75wG9vOXjs6LlroUKqpBFta8YcHV YK9/iTkBvXJoCb0T0T0EQCSdiVG/16cTFySnO8Ks2V+rft6YjGANmbasRMHGUb+5wC8e yerg== X-Gm-Message-State: AMke39lHw5mzhMEhNO8RaNuoDzP8vdC7sSd/cg/LGMWnaqI4SZniDS+xG57Qf4QUEUajzQ== X-Received: by 10.28.8.130 with SMTP id 124mr9460252wmi.65.1486409801023; Mon, 06 Feb 2017 11:36:41 -0800 (PST) Received: from cerise.lan ([2a02:a03f:140d:bb00:b8a1:e6f2:161a:54c8]) by smtp.gmail.com with ESMTPSA id v102sm3226714wrb.11.2017.02.06.11.36.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 11:36:39 -0800 (PST) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Mon, 6 Feb 2017 20:36:31 +0100 Message-Id: <20170206193631.12382-1-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH] python-gunicorn: fix build issues X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix: http://autobuild.buildroot.org/results/b2d/b2d43dd3c52cc9f586009a10a40f97b07548322d/build-end.log The issue arise from the fact that we compile all *.py files but the _gaiohttp.py file is using Python3 ("yield from") syntax which causes an error. So we are using Python2, delete this file as it won't ever be imported anyway as it is checked by gunicorn in the __init__.py file of the worker module. Signed-off-by: Maxime Hadjinlian --- package/python-gunicorn/python-gunicorn.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/package/python-gunicorn/python-gunicorn.mk b/package/python-gunicorn/python-gunicorn.mk index 426e809730..cfb7da110c 100644 --- a/package/python-gunicorn/python-gunicorn.mk +++ b/package/python-gunicorn/python-gunicorn.mk @@ -11,4 +11,16 @@ PYTHON_GUNICORN_SETUP_TYPE = setuptools PYTHON_GUNICORN_LICENSE = MIT PYTHON_GUNICORN_LICENSE_FILES = LICENSE +# At the end of the build, we try to compile all py files using the host python +# that has been built. +# The GAIO HTTP Worker is only compatible with Python3.4.2 and up. So don't try +# to compile it with python 2.x +ifeq ($(BR2_PACKAGE_PYTHON),y) +define PYTHON_GUNICORN_REMOVE_GAIO_WORKER + find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ \ + -name "_gaiohttp.py" -exec rm -f {} \; +endef +PYTHON_GUNICORN_POST_INSTALL_TARGET_HOOKS += PYTHON_GUNICORN_REMOVE_GAIO_WORKER +endif + $(eval $(python-package))