Skip to contentSkip to conversation

python-tornado: fix runtime dependencies

PATCH New yegorslists at googlemail.com 2 participants 5 messages Jun 29, 2016 – Jul 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python-tornado: fix runtime dependencies

From: Yegor Yefremov <[email protected]>

According to setup.py tornado requires backports.ssl_match_hostname for Python < 3.2 and certifi for Python < 3.4.

Actually both requirements are optional and tornado alone can work without them, but Python packages like python-circus check requirements at runtime and though they don't use this funtionality, they insist on having these packages installed.

An upstream patch fixes backports.ssl_match_hostname dependency and selecting python-certifi for Python 2 fixes certifi dependency till this is fixed upstream.

---
 ...re-backports.ssl_match_hostname-on-Python.patch | 37 ++++++++++++++++++++++
 package/python-tornado/Config.in                   |  5 +--
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 package/python-tornado/0001-Don-t-require-backports.ssl_match_hostname-on-Python.patch
package/python-tornado/0001-Don-t-require-backports.ssl_match_hostname-on-Python.patch new file +37 -0
new file mode 100644
index 0000000..d5702e8
@@ -0,0 +1,37 @@
+From 785fe675d5602e51a559b06861d543c7d37a380c Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <[email protected]>
+Date: Wed, 4 May 2016 09:26:22 +0200
+Subject: [PATCH] Don't require backports.ssl_match_hostname on Python 2.7.9
+ and newer
+
+As Python 3.2 support was dropped one can check 2.7.x dependency only.
+
+Tornado running on Python 2.7.9+ doesn't need this backported package,
+but some Python packages like circus check package dependencies at
+runtime and insist on having backports.ssl_match_hostname installed,
+though they don't even use this particular feature.
+
+So checking for exact version makes life of package maintainer easier
+especially on embedded Linux distributions like Buildroot.
+
+Signed-off-by: Yegor Yefremov <[email protected]>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c13eeed..0c24e70 100644
+--- a/setup.py
++++ b/setup.py
+@@ -129,7 +129,7 @@ if setuptools is not None:
+     if sys.version_info < (2, 7):
+         # Only needed indirectly, for singledispatch.
+         install_requires.append('ordereddict')
+-    if sys.version_info < (3, 2):
++    if sys.version_info < (2, 7, 9):
+         install_requires.append('backports.ssl_match_hostname')
+     if sys.version_info < (3, 4):
+         install_requires.append('singledispatch')
+-- 
+2.8.1
+
package/python-tornado/Config.in +3 -2
index 3ead2af..a0ee78f 100644
@@ -1,9 +1,10 @@
 config BR2_PACKAGE_PYTHON_TORNADO
 	bool "python-tornado"
-	select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime
-	select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime
+	select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_PYTHON3_ZLIB 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
 	help
 	  Tornado is a Python web framework and asynchronous networking
 	  library, originally developed@FriendFeed.
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/2 python-circus: new package

From: Yegor Yefremov <[email protected]>

---
 package/Config.in                        |  1 +
 package/python-circus/Config.in          | 20 ++++++++++++++++++++
 package/python-circus/python-circus.hash |  4 ++++
 package/python-circus/python-circus.mk   | 14 ++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/python-circus/Config.in
 create mode 100644 package/python-circus/python-circus.hash
 create mode 100644 package/python-circus/python-circus.mk
package/Config.in +1 -0
index e5ddc3e..413ba26 100644
@@ -647,6 +647,7 @@ menu "External python modules"
 	source "package/python-characteristic/Config.in"
 	source "package/python-cheetah/Config.in"
 	source "package/python-cherrypy/Config.in"
+	source "package/python-circus/Config.in"
 	source "package/python-click/Config.in"
 	source "package/python-coherence/Config.in"
 	source "package/python-configobj/Config.in"
package/python-circus/Config.in new file +20 -0
new file mode 100644
index 0000000..ba4da5c
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_CIRCUS
+	bool "python-circus"
+	depends on BR2_USE_WCHAR # zeromq
+	depends on BR2_INSTALL_LIBSTDCPP # zeromq
+	depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq
+	select BR2_PACKAGE_PYTHON_IOWAIT # runtime
+	select BR2_PACKAGE_PYTHON_PSUTIL # runtime
+	select BR2_PACKAGE_PYTHON_PYZMQ # runtime
+	select BR2_PACKAGE_PYTHON_TORNADO # runtime
+	select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
+	help
+	  Circus is a program that will let you run and watch multiple
+	  processes and sockets.
+
+	  https://circus.readthedocs.org/en/latest/
+
+comment "python-circus needs a toolchain w/ C++, wchar, threads"
+	depends on BR2_PACKAGE_PYTHON
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \
+		BR2_TOOLCHAIN_HAS_THREADS)
package/python-circus/python-circus.hash new file +4 -0
new file mode 100644
index 0000000..01994f4
@@ -0,0 +1,4 @@
+# md5 from https://pypi.python.org/pypi/circus/json
+md5	cddd4a8844907d8b6b402ca9c713d176  circus-0.13.0.tar.gz
+# sha256 calculated by scanpypi
+sha256	6201800a5fb05144b5e6c5ac9eb901b914305e8beaeb01f8edf54ab6ab1a295a  circus-0.13.0.tar.gz
package/python-circus/python-circus.mk new file +14 -0
new file mode 100644
index 0000000..9e5391e
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-circus
+#
+################################################################################
+
+PYTHON_CIRCUS_VERSION = 0.13.0
+PYTHON_CIRCUS_SOURCE = circus-$(PYTHON_CIRCUS_VERSION).tar.gz
+PYTHON_CIRCUS_SITE = https://pypi.python.org/packages/source/c/circus
+PYTHON_CIRCUS_SETUP_TYPE = setuptools
+PYTHON_CIRCUS_LICENSE = Apache-2.0
+PYTHON_CIRCUS_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
Signature · 1 line
2.8.1
#2 lore raw

PATCH 2/2 python-circus: new package

Quoted 36 lines · On Wed, Jun 29, 2016 at 10:01 AM, <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

---
 package/Config.in                        |  1 +
 package/python-circus/Config.in          | 20 ++++++++++++++++++++
 package/python-circus/python-circus.hash |  4 ++++
 package/python-circus/python-circus.mk   | 14 ++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/python-circus/Config.in
 create mode 100644 package/python-circus/python-circus.hash
 create mode 100644 package/python-circus/python-circus.mk
package/Config.in +1 -0
index e5ddc3e..413ba26 100644
@@ -647,6 +647,7 @@ menu "External python modules"
        source "package/python-characteristic/Config.in"
        source "package/python-cheetah/Config.in"
        source "package/python-cherrypy/Config.in"
+       source "package/python-circus/Config.in"
        source "package/python-click/Config.in"
        source "package/python-coherence/Config.in"
        source "package/python-configobj/Config.in"
package/python-circus/Config.in new file +5 -0
new file mode 100644
index 0000000..ba4da5c
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PYTHON_CIRCUS
+       bool "python-circus"
+       depends on BR2_USE_WCHAR # zeromq
+       depends on BR2_INSTALL_LIBSTDCPP # zeromq
+       depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq

package/python-circus/Config.in line 15

Quoted 10 lines
package/python-circus/Config.in new file +10 -0
+       select BR2_PACKAGE_PYTHON_IOWAIT # runtime
+       select BR2_PACKAGE_PYTHON_PSUTIL # runtime
+       select BR2_PACKAGE_PYTHON_PYZMQ # runtime
+       select BR2_PACKAGE_PYTHON_TORNADO # runtime
+       select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
+       help
+         Circus is a program that will let you run and watch multiple
+         processes and sockets.
+
+         https://circus.readthedocs.org/en/latest/

Actually circus is just an alternative to supervisor. I'll rename it to circus and move to "System Tools". What do you think?

Quoted 37 lines
package/python-circus/Config.in new file +4 -0
+comment "python-circus needs a toolchain w/ C++, wchar, threads"
+       depends on BR2_PACKAGE_PYTHON
+       depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \
+               BR2_TOOLCHAIN_HAS_THREADS)
package/python-circus/python-circus.hash new file +4 -0
new file mode 100644
index 0000000..01994f4
@@ -0,0 +1,4 @@
+# md5 from https://pypi.python.org/pypi/circus/json
+md5    cddd4a8844907d8b6b402ca9c713d176  circus-0.13.0.tar.gz
+# sha256 calculated by scanpypi
+sha256 6201800a5fb05144b5e6c5ac9eb901b914305e8beaeb01f8edf54ab6ab1a295a  circus-0.13.0.tar.gz
package/python-circus/python-circus.mk new file +14 -1
new file mode 100644
index 0000000..9e5391e
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-circus
+#
+################################################################################
+
+PYTHON_CIRCUS_VERSION = 0.13.0
+PYTHON_CIRCUS_SOURCE = circus-$(PYTHON_CIRCUS_VERSION).tar.gz
+PYTHON_CIRCUS_SITE = https://pypi.python.org/packages/source/c/circus
+PYTHON_CIRCUS_SETUP_TYPE = setuptools
+PYTHON_CIRCUS_LICENSE = Apache-2.0
+PYTHON_CIRCUS_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
--

2.8.1

#3 lore raw

PATCH 2/2 python-circus: new package

Hello,

Quoted 2 lines · Yegor Yefremov

Actually circus is just an alternative to supervisor. I'll rename it to circus and move to "System Tools". What do you think?

Sounds good. I'll wait for your new iteration then, and mark this version as Changes Requested in the mean time.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/2 python-tornado: fix runtime dependencies

In reply to yegorslists at googlemail.com

Hello,

Quoted 14 lines · yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

According to setup.py tornado requires backports.ssl_match_hostname for Python < 3.2 and certifi for Python < 3.4.

Actually both requirements are optional and tornado alone can work without them, but Python packages like python-circus check requirements at runtime and though they don't use this funtionality, they insist on having these packages installed.

An upstream patch fixes backports.ssl_match_hostname dependency and selecting python-certifi for Python 2 fixes certifi dependency till this is fixed upstream.

Quoted 6 lines
---
 ...re-backports.ssl_match_hostname-on-Python.patch | 37 ++++++++++++++++++++++
 package/python-tornado/Config.in                   |  5 +--
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 package/python-tornado/0001-Don-t-require-backports.ssl_match_hostname-on-Python.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com