Browse Source

python-uvloop: new package

Fast implementation of asyncio event loop on top of libuv.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
[Arnout: change order of 'depends on' lines]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Asaf Kahlon 6 years ago
parent
commit
2f2ef15d35

+ 1 - 0
package/Config.in

@@ -1047,6 +1047,7 @@ menu "External python modules"
 	source "package/python-ujson/Config.in"
 	source "package/python-urllib3/Config.in"
 	source "package/python-urwid/Config.in"
+	source "package/python-uvloop/Config.in"
 	source "package/python-validators/Config.in"
 	source "package/python-versiontools/Config.in"
 	source "package/python-visitor/Config.in"

+ 18 - 0
package/python-uvloop/Config.in

@@ -0,0 +1,18 @@
+config BR2_PACKAGE_PYTHON_UVLOOP
+	bool "python-uvloop"
+	depends on BR2_PACKAGE_PYTHON3
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
+	depends on BR2_USE_MMU # libuv
+	depends on !BR2_STATIC_LIBS # libuv
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
+	select BR2_PACKAGE_LIBUV
+	select BR2_PACKAGE_PYTHON3_SSL
+	help
+	  Fast implementation of asyncio event loop on top of libuv.
+
+	  http://github.com/MagicStack/uvloop
+
+comment "python-uvloop needs a toolchain w/ NPTL, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+	depends on BR2_USE_MMU

+ 6 - 0
package/python-uvloop/python-uvloop.hash

@@ -0,0 +1,6 @@
+# md5, sha256 from https://pypi.org/pypi/uvloop/json
+md5	7d509d78b18a5863cc06697ccfd835ad  uvloop-0.11.2.tar.gz
+sha256	a97bd62ebbdf7e6e84bf44afe439d9b24ce4d8661a29a639626a8c03748f6f98  uvloop-0.11.2.tar.gz
+# Locally computed sha256 checksums
+sha256	2fdc436a67077941295c58647f521fbef8f50e46db0970552fa1a4dd8ae261c6  LICENSE-APACHE
+sha256	9185f3c77e9f6ef8859a6ba4c94128ac1329876be3e813aad32d7645e51ae409  LICENSE-MIT

+ 17 - 0
package/python-uvloop/python-uvloop.mk

@@ -0,0 +1,17 @@
+################################################################################
+#
+# python-uvloop
+#
+################################################################################
+
+PYTHON_UVLOOP_VERSION = 0.11.2
+PYTHON_UVLOOP_SOURCE = uvloop-$(PYTHON_UVLOOP_VERSION).tar.gz
+PYTHON_UVLOOP_SITE = https://files.pythonhosted.org/packages/5c/37/6daa39aac42b2deda6ee77f408bec0419b600e27b89b374b0d440af32b10
+PYTHON_UVLOOP_SETUP_TYPE = setuptools
+PYTHON_UVLOOP_LICENSE = Apache-2.0, MIT
+PYTHON_UVLOOP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
+PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --use-system-libuv
+PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --use-system-libuv
+PYTHON_UVLOOP_DEPENDENCIES = libuv
+
+$(eval $(python-package))