From patchwork Wed Jun 13 14:28:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Dohl X-Patchwork-Id: 928901 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=wh2.tu-dresden.de Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 415Tpb0w8hz9s19 for ; Thu, 14 Jun 2018 00:36:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4B7A18AA26; Wed, 13 Jun 2018 14:36:36 +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 ymyCnh0AVeft; Wed, 13 Jun 2018 14:36:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 485918A833; Wed, 13 Jun 2018 14:36:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 70EF91C0A7F for ; Wed, 13 Jun 2018 14:36:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4CB0C87A2B for ; Wed, 13 Jun 2018 14:36:13 +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 9FTlfFFACwxU for ; Wed, 13 Jun 2018 14:36:10 +0000 (UTC) X-Greylist: delayed 00:07:35 by SQLgrey-1.7.6 Received: from mx1.agdsn.tu-dresden.de (mx1.agdsn.tu-dresden.de [141.76.119.136]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 719A5879D5 for ; Wed, 13 Jun 2018 14:36:10 +0000 (UTC) Received: from atlantis.agdsn.tu-dresden.de (atlantis.agdsn.tu-dresden.de [141.30.228.39]) by mx1.agdsn.tu-dresden.de (Postfix) with ESMTP id 715AF1436C; Wed, 13 Jun 2018 16:28:32 +0200 (CEST) Received: from zynqr.office.airrays.com (ip-176-52-202-235.static.reverse.dsi.net [176.52.202.235]) by atlantis.agdsn.tu-dresden.de (Postfix) with ESMTPSA id 33373842145; Wed, 13 Jun 2018 14:28:32 +0000 (UTC) From: Jan Dohl To: buildroot@buildroot.org Date: Wed, 13 Jun 2018 16:28:16 +0200 Message-Id: <20180613142816.19691-1-polygon@wh2.tu-dresden.de> X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH 1/1] Python Tornado bumped to version 5.0.2 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Dohl , Ryan Barnett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Tornado got a requirement on the SSL module in version 5.0.2 which is also checked in the setup.py script before installing. Since the check in buildroot runs against the host-python which is built without SSL support, these checks fail. In my opinion, adding OpenSSL support to host-python does not make sense since the Python on the target will be a different one. Instead, remove the checks (which, according to the source code comments essentially check for Python >= 2.7.9 / Python3 >= 3.4 which is true for current Buildroot) and select the SSL option of Python/Python3 when Tornado is selected. Signed-off-by: Jan Dohl --- .../0001-remove-ssl-checks-on-install.patch | 28 ++++++++++++++++++++++ package/python-tornado/Config.in | 2 ++ package/python-tornado/python-tornado.hash | 6 ++--- package/python-tornado/python-tornado.mk | 5 ++-- 4 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 package/python-tornado/0001-remove-ssl-checks-on-install.patch diff --git a/package/python-tornado/0001-remove-ssl-checks-on-install.patch b/package/python-tornado/0001-remove-ssl-checks-on-install.patch new file mode 100644 index 0000000000..9bf858bbaa --- /dev/null +++ b/package/python-tornado/0001-remove-ssl-checks-on-install.patch @@ -0,0 +1,28 @@ +diff -Naur python-tornado-5.0.2-orig/setup.py python-tornado-5.0.2/setup.py +--- python-tornado-5.0.2-orig/setup.py 2018-04-08 02:31:24.000000000 +0200 ++++ python-tornado-5.0.2/setup.py 2018-06-13 13:27:50.990071928 +0200 +@@ -15,7 +15,6 @@ + + import os + import platform +-import ssl + import sys + import warnings + +@@ -137,16 +136,6 @@ + python_requires = '>= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, != 3.3.*' + kwargs['python_requires'] = python_requires + +-# Verify that the SSL module has all the modern upgrades. Check for several +-# names individually since they were introduced at different versions, +-# although they should all be present by Python 3.4 or 2.7.9. +-if (not hasattr(ssl, 'SSLContext') or +- not hasattr(ssl, 'create_default_context') or +- not hasattr(ssl, 'match_hostname')): +- raise ImportError("Tornado requires an up-to-date SSL module. This means " +- "Python 2.7.9+ or 3.4+ (although some distributions have " +- "backported the necessary changes to older versions).") +- + setup( + name="tornado", + version=version, diff --git a/package/python-tornado/Config.in b/package/python-tornado/Config.in index a0ee78fb7a..1afbdc5729 100644 --- a/package/python-tornado/Config.in +++ b/package/python-tornado/Config.in @@ -2,6 +2,8 @@ config BR2_PACKAGE_PYTHON_TORNADO bool "python-tornado" select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_SSL if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_SSL if BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_SINGLEDISPATCH if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON_BACKPORTS_ABC if BR2_PACKAGE_PYTHON # runtime select BR2_PACKAGE_PYTHON_CERTIFI if BR2_PACKAGE_PYTHON # runtime diff --git a/package/python-tornado/python-tornado.hash b/package/python-tornado/python-tornado.hash index 662db6f258..c64e537eed 100644 --- a/package/python-tornado/python-tornado.hash +++ b/package/python-tornado/python-tornado.hash @@ -1,3 +1,3 @@ -# md5 from https://pypi.python.org/pypi/tornado/json, sha256 locally computed -md5 838687d20923360af5ab59f101e9e02e tornado-4.5.1.tar.gz -sha256 db0904a28253cfe53e7dedc765c71596f3c53bb8a866ae50123320ec1a7b73fd tornado-4.5.1.tar.gz +# md5, sha256 from https://pypi.python.org/pypi/tornado/json +md5 e5e24ce1c8a4e6442dc38d470172f59e tornado-5.0.2.tar.gz +sha256 1b83d5c10550f2653380b4c77331d6f8850f287c4f67d7ce1e1c639d9222fbc7 tornado-5.0.2.tar.gz diff --git a/package/python-tornado/python-tornado.mk b/package/python-tornado/python-tornado.mk index 6e6167564f..ed3a61fcf8 100644 --- a/package/python-tornado/python-tornado.mk +++ b/package/python-tornado/python-tornado.mk @@ -4,10 +4,11 @@ # ################################################################################ -PYTHON_TORNADO_VERSION = 4.5.1 +PYTHON_TORNADO_VERSION = 5.0.2 PYTHON_TORNADO_SOURCE = tornado-$(PYTHON_TORNADO_VERSION).tar.gz -PYTHON_TORNADO_SITE = https://pypi.python.org/packages/df/42/a180ee540e12e2ec1007ac82a42b09dd92e5461e09c98bf465e98646d187 +PYTHON_TORNADO_SITE = https://pypi.python.org/packages/cf/d1/3be271ae5eba9fb59df63c9891fdc7d8044b999e8ac145994cdbfd2ae66a PYTHON_TORNADO_LICENSE = Apache-2.0 +PYTHON_TORNADO_LICENSE_FILES = LICENSE PYTHON_TORNADO_SETUP_TYPE = setuptools $(eval $(python-package))