Support for Django channels
cover Support for Django channels
From: Adam Duskett <[email protected]>
I was honestly surprised that django-channels hadn't been added yet, as it provides websocket support (umong other things) to Django.
I took the liberty of adding all of the packages that could turn buildroot into a fully funtional django server with full websocket support.
Major packages in this series are:
- Daphne: The official Django websocket server.
- Channels: Brings Websocket/long-poll HTTP, async and task offloading support to Django. It's quite handy!
- Channel-redis: Uses redis as a message broker backend for websocket handling. Also quite handy.
I added the django-enumfields package because my personal project uses it.
Adam Duskett (9):
package/python-django-enumfields: new package
package/python-sqlparse: new package
package/python-hiredis: new package
package/python-daphne: new package
package/python-asgiref: new package
package/python-aioredis: new package
package/python-channels: new package
package/python-channels-redis: new package
DEVELOPERS | 8 ++++++ package/Config.in | 8 ++++++ package/python-aioredis/Config.in | 13 +++++++++ package/python-aioredis/python-aioredis.hash | 5 ++++ package/python-aioredis/python-aioredis.mk | 14 ++++++++++ package/python-asgiref/Config.in | 14 ++++++++++ package/python-asgiref/python-asgiref.hash | 5 ++++ package/python-asgiref/python-asgiref.mk | 14 ++++++++++ package/python-channels-redis/Config.in | 17 ++++++++++++ .../python-channels-redis.hash | 5 ++++ .../python-channels-redis.mk | 15 +++++++++++ package/python-channels/Config.in | 14 ++++++++++ package/python-channels/python-channels.hash | 5 ++++ package/python-channels/python-channels.mk | 14 ++++++++++ ...001-remove-pytest-runner-requirement.patch | 27 +++++++++++++++++++ package/python-daphne/Config.in | 13 +++++++++ package/python-daphne/python-daphne.hash | 5 ++++ package/python-daphne/python-daphne.mk | 14 ++++++++++ package/python-django-enumfields/Config.in | 6 +++++ .../python-django-enumfields.hash | 5 ++++ .../python-django-enumfields.mk | 14 ++++++++++ package/python-hiredis/Config.in | 7 +++++ package/python-hiredis/python-hiredis.hash | 6 +++++ package/python-hiredis/python-hiredis.mk | 14 ++++++++++ package/python-sqlparse/Config.in | 8 ++++++ package/python-sqlparse/python-sqlparse.hash | 5 ++++ package/python-sqlparse/python-sqlparse.mk | 14 ++++++++++ 38 files changed, 314 insertions(+), 24 deletions(-) create mode 100644 package/python-aioredis/Config.in create mode 100644 package/python-aioredis/python-aioredis.hash create mode 100644 package/python-aioredis/python-aioredis.mk create mode 100644 package/python-asgiref/Config.in create mode 100644 package/python-asgiref/python-asgiref.hash create mode 100644 package/python-asgiref/python-asgiref.mk create mode 100644 package/python-channels-redis/Config.in create mode 100644 package/python-channels-redis/python-channels-redis.hash create mode 100644 package/python-channels-redis/python-channels-redis.mk create mode 100644 package/python-channels/Config.in create mode 100644 package/python-channels/python-channels.hash create mode 100644 package/python-channels/python-channels.mk create mode 100644 package/python-daphne/0001-remove-pytest-runner-requirement.patch create mode 100644 package/python-daphne/Config.in create mode 100644 package/python-daphne/python-daphne.hash create mode 100644 package/python-daphne/python-daphne.mk create mode 100644 package/python-django-enumfields/Config.in create mode 100644 package/python-django-enumfields/python-django-enumfields.hash create mode 100644 package/python-django-enumfields/python-django-enumfields.mk create mode 100644 package/python-hiredis/Config.in create mode 100644 package/python-hiredis/python-hiredis.hash create mode 100644 package/python-hiredis/python-hiredis.mk create mode 100644 package/python-sqlparse/Config.in create mode 100644 package/python-sqlparse/python-sqlparse.hash create mode 100644 package/python-sqlparse/python-sqlparse.mk
Signature · 1 line
2.21.0
PATCH 1/8 package/python-django-enumfields: new package
From: Adam Duskett <[email protected]>
This package lets you use real Python (PEP435-style) enums with Django.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-django-enumfields/Config.in | 6 ++++++ .../python-django-enumfields.hash | 5 +++++ .../python-django-enumfields.mk | 14 ++++++++++++++ 5 files changed, 27 insertions(+) create mode 100644 package/python-django-enumfields/Config.in create mode 100644 package/python-django-enumfields/python-django-enumfields.hash create mode 100644 package/python-django-enumfields/python-django-enumfields.mk
DEVELOPERS +1 -0
@@ -57,6 +57,7 @@ F: package/openjdk-bin/ F: package/php/ F: package/policycoreutils/ F: package/python3/ +F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/ F: package/python-mutagen/ F: package/python-pip/
package/Config.in +1 -0
@@ -877,6 +877,7 @@ menu "External python modules" source "package/python-dialog3/Config.in" source "package/python-dicttoxml/Config.in" source "package/python-django/Config.in" + source "package/python-django-enumfields/Config.in" source "package/python-docker/Config.in" source "package/python-docker-pycreds/Config.in" source "package/python-dockerpty/Config.in"
package/python-django-enumfields/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_DJANGO_ENUMFIELDS + bool "python-django-enumfields" + help + Real Python Enums for Django. + + https://github.com/hzdg/django-enumfields
package/python-django-enumfields/python-django-enumfields.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/django-enumfields/json +md5 c9725a2c31ca2949d111815742335279 django-enumfields-1.0.0.tar.gz +sha256 5b0e2dd5973337717ca6bd5a7d9e167e6ae01203c160d4761b88837c4678f219 django-enumfields-1.0.0.tar.gz +# Locally computed sha256 checksums +sha256 5548de8c163dc57bd0a4f5772f1509f2c04f1390251c98ebf060c9d52a223f57 LICENSE
package/python-django-enumfields/python-django-enumfields.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-django-enumfields +# +################################################################################ + +PYTHON_DJANGO_ENUMFIELDS_VERSION = 1.0.0 +PYTHON_DJANGO_ENUMFIELDS_SOURCE = django-enumfields-$(PYTHON_DJANGO_ENUMFIELDS_VERSION).tar.gz +PYTHON_DJANGO_ENUMFIELDS_SITE = https://files.pythonhosted.org/packages/b7/56/3f4e8d8ef6d5577a1b75b3cfae6dff819afd030e3a519a326ec7a7a0b74f +PYTHON_DJANGO_ENUMFIELDS_SETUP_TYPE = setuptools +PYTHON_DJANGO_ENUMFIELDS_LICENSE = MIT +PYTHON_DJANGO_ENUMFIELDS_LICENSE_FILES = LICENSE + +$(eval $(python-package))
Signature · 1 line
2.21.0
PATCH 1/8 package/python-django-enumfields: new package
Quoted 5 lines · On Sat, 3 Aug 2019 21:16:24 -0400 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
This package lets you use real Python (PEP435-style) enums with Django.
Signed-off-by Adam Duskett <[email protected]>
Quoted 10 lines
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-django-enumfields/Config.in | 6 ++++++ .../python-django-enumfields.hash | 5 +++++ .../python-django-enumfields.mk | 14 ++++++++++++++ 5 files changed, 27 insertions(+) create mode 100644 package/python-django-enumfields/Config.in create mode 100644 package/python-django-enumfields/python-django-enumfields.hash create mode 100644 package/python-django-enumfields/python-django-enumfields.mk
The setup.py contains:
extras_require={
":python_version<'3.4'": ['enum34'],
},So, I've added:
+ select BR2_PACKAGE_PYTHON_ENUM34 if BR2_PACKAGE_PYTHON # runtime
to the Config.in file, and applied.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/8 package/python-sqlparse: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
sqlparse is a non-validating SQL parser for Python. It provides support for parsing, splitting and formatting SQL statements.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-sqlparse/Config.in | 8 ++++++++ package/python-sqlparse/python-sqlparse.hash | 5 +++++ package/python-sqlparse/python-sqlparse.mk | 14 ++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 package/python-sqlparse/Config.in create mode 100644 package/python-sqlparse/python-sqlparse.hash create mode 100644 package/python-sqlparse/python-sqlparse.mk
DEVELOPERS +1 -0
@@ -63,6 +63,7 @@ F: package/python-mutagen/ F: package/python-pip/ F: package/python-psycopg2/ F: package/python-sqlalchemy/ +F: package/python-sqlparse/ F: package/python-visitor/ F: package/restorecond/ F: package/refpolicy/
package/Config.in +1 -0
@@ -1076,6 +1076,7 @@ menu "External python modules" source "package/python-sortedcontainers/Config.in" source "package/python-spidev/Config.in" source "package/python-sqlalchemy/Config.in" + source "package/python-sqlparse/Config.in" source "package/python-subprocess32/Config.in" source "package/python-systemd/Config.in" source "package/python-tabledata/Config.in"
package/python-sqlparse/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_SQLPARSE + bool "python-sqlparse" + help + sqlparse is a non-validating SQL parser for Python. + It provides support for parsing, splitting and formatting + SQL statements. + + https://github.com/andialbrecht/sqlparse
package/python-sqlparse/python-sqlparse.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/sqlparse/json +md5 2ce34181d6b7b234c9f3c0ecd1ffb93e sqlparse-0.3.0.tar.gz +sha256 7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873 sqlparse-0.3.0.tar.gz +# Locally computed sha256 checksums +sha256 c1938235b80d39e93138eae89edc3af67e18ecbc40d266529fa57b2dce426310 LICENSE
package/python-sqlparse/python-sqlparse.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-sqlparse +# +################################################################################ + +PYTHON_SQLPARSE_VERSION = 0.3.0 +PYTHON_SQLPARSE_SOURCE = sqlparse-$(PYTHON_SQLPARSE_VERSION).tar.gz +PYTHON_SQLPARSE_SITE = https://files.pythonhosted.org/packages/63/c8/229dfd2d18663b375975d953e2bdc06d0eed714f93dcb7732f39e349c438 +PYTHON_SQLPARSE_SETUP_TYPE = setuptools +PYTHON_SQLPARSE_LICENSE = BSD-3-Clause +PYTHON_SQLPARSE_LICENSE_FILES = LICENSE + +$(eval $(python-package))
Signature · 1 line
2.21.0
Thomas Petazzoni
AppliedPATCH 2/8 package/python-sqlparse: new package
Quoted 6 lines · On Sat, 3 Aug 2019 21:16:25 -0400 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
sqlparse is a non-validating SQL parser for Python. It provides support for parsing, splitting and formatting SQL statements.
Signed-off-by Adam Duskett <[email protected]>
Quoted 10 lines
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-sqlparse/Config.in | 8 ++++++++ package/python-sqlparse/python-sqlparse.hash | 5 +++++ package/python-sqlparse/python-sqlparse.mk | 14 ++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 package/python-sqlparse/Config.in create mode 100644 package/python-sqlparse/python-sqlparse.hash create mode 100644 package/python-sqlparse/python-sqlparse.mk
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 3/8 package/python-hiredis: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
Python extension that wraps protocol parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-hiredis/Config.in | 7 +++++++ package/python-hiredis/python-hiredis.hash | 6 ++++++ package/python-hiredis/python-hiredis.mk | 14 ++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 package/python-hiredis/Config.in create mode 100644 package/python-hiredis/python-hiredis.hash create mode 100644 package/python-hiredis/python-hiredis.mk
DEVELOPERS +1 -0
@@ -59,6 +59,7 @@ F: package/policycoreutils/ F: package/python3/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/ +F: package/python-hiredis/ F: package/python-mutagen/ F: package/python-pip/ F: package/python-psycopg2/
package/Config.in +1 -0
@@ -903,6 +903,7 @@ menu "External python modules" source "package/python-gobject/Config.in" source "package/python-gunicorn/Config.in" source "package/python-h2/Config.in" + source "package/python-hiredis/Config.in" source "package/python-hpack/Config.in" source "package/python-html5lib/Config.in" source "package/python-httplib2/Config.in"
package/python-hiredis/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_HIREDIS + bool "python-hiredis" + help + Python extension that wraps protocol parsing code in hiredis. + It primarily speeds up parsing of multi bulk replies. + + https://github.com/redis/hiredis-py
package/python-hiredis/python-hiredis.hash new file +6 -0
@@ -0,0 +1,6 @@ +# md5, sha256 from https://pypi.org/pypi/hiredis/json +md5 46bc0d51bda994611bae77c044b1398b hiredis-1.0.0.tar.gz +sha256 e97c953f08729900a5e740f1760305434d62db9f281ac351108d6c4b5bf51795 hiredis-1.0.0.tar.gz +# Locally computed sha256 checksums +sha256 70edfa6d3e11f9d7497c2c2f298d06f33b11d10f37f76605102c5ab3b1f28262 COPYING +sha256 dca05ce8fc87a8261783b4aed0deef8becc9350b6aa770bc714d0c1833b896eb vendor/hiredis/COPYING
package/python-hiredis/python-hiredis.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-hiredis +# +################################################################################ + +PYTHON_HIREDIS_VERSION = 1.0.0 +PYTHON_HIREDIS_SOURCE = hiredis-$(PYTHON_HIREDIS_VERSION).tar.gz +PYTHON_HIREDIS_SITE = https://files.pythonhosted.org/packages/9e/e0/c160dbdff032ffe68e4b3c576cba3db22d8ceffc9513ae63368296d1bcc8 +PYTHON_HIREDIS_SETUP_TYPE = setuptools +PYTHON_HIREDIS_LICENSE = BSD-3-Clause, BSD-3-Clause +PYTHON_HIREDIS_LICENSE_FILES = COPYING vendor/hiredis/COPYING + +$(eval $(python-package))
Signature · 1 line
2.21.0
PATCH 3/8 package/python-hiredis: new package
Quoted 74 lines · On Sun, Aug 4, 2019 at 3:16 AM <[email protected]> wrote:
From: Adam Duskett <[email protected]>
Python extension that wraps protocol parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.
Signed-off-by Adam Duskett <[email protected]>--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-hiredis/Config.in | 7 +++++++ package/python-hiredis/python-hiredis.hash | 6 ++++++ package/python-hiredis/python-hiredis.mk | 14 ++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 package/python-hiredis/Config.in create mode 100644 package/python-hiredis/python-hiredis.hash create mode 100644 package/python-hiredis/python-hiredis.mkDEVELOPERS +1
-0@@ -59,6 +59,7 @@ F: package/policycoreutils/ F: package/python3/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/ +F: package/python-hiredis/ F: package/python-mutagen/ F: package/python-pip/ F: package/python-psycopg2/package/Config.in +1
-0@@ -903,6 +903,7 @@ menu "External python modules" source "package/python-gobject/Config.in" source "package/python-gunicorn/Config.in" source "package/python-h2/Config.in" + source "package/python-hiredis/Config.in" source "package/python-hpack/Config.in" source "package/python-html5lib/Config.in" source "package/python-httplib2/Config.in"package/python-hiredis/Config.in new file +7
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_HIREDIS + bool "python-hiredis" + help + Python extension that wraps protocol parsing code in hiredis. + It primarily speeds up parsing of multi bulk replies. + + https://github.com/redis/hiredis-pypackage/python-hiredis/python-hiredis.hash new file +6
-0@@ -0,0 +1,6 @@ +# md5, sha256 from https://pypi.org/pypi/hiredis/json +md5 46bc0d51bda994611bae77c044b1398b hiredis-1.0.0.tar.gz +sha256 e97c953f08729900a5e740f1760305434d62db9f281ac351108d6c4b5bf51795 hiredis-1.0.0.tar.gz +# Locally computed sha256 checksums +sha256 70edfa6d3e11f9d7497c2c2f298d06f33b11d10f37f76605102c5ab3b1f28262 COPYING +sha256 dca05ce8fc87a8261783b4aed0deef8becc9350b6aa770bc714d0c1833b896eb vendor/hiredis/COPYINGpackage/python-hiredis/python-hiredis.mk new file +1
-0@@ -0,0 +1,14 @@ +################################################################################
package/python-hiredis/python-hiredis.mk line 11
Quoted 10 lines
package/python-hiredis/python-hiredis.mk new file +10
-0+# +# python-hiredis +# +################################################################################ + +PYTHON_HIREDIS_VERSION = 1.0.0 +PYTHON_HIREDIS_SOURCE = hiredis-$(PYTHON_HIREDIS_VERSION).tar.gz +PYTHON_HIREDIS_SITE = https://files.pythonhosted.org/packages/9e/e0/c160dbdff032ffe68e4b3c576cba3db22d8ceffc9513ae63368296d1bcc8 +PYTHON_HIREDIS_SETUP_TYPE = setuptools +PYTHON_HIREDIS_LICENSE = BSD-3-Clause, BSD-3-Clause
I think one BSD-3-Clause is enough.
Yegor
Quoted 10 lines
package/python-hiredis/python-hiredis.mk new file +3
-1+PYTHON_HIREDIS_LICENSE_FILES = COPYING vendor/hiredis/COPYING + +$(eval $(python-package)) --2.21.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 3/8 package/python-hiredis: new package
In reply to aduskett at gmail.comQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"aduskett" == aduskett <[email protected]> writes:
From: Adam Duskett <[email protected]>
Python extension that wraps protocol parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.Signed-off-by Adam Duskett <[email protected]>
We already had a very similar patch pending in patchwork:
https://patchwork.ozlabs.org/patch/1057597/
So I applied that one and marked this as superseeded.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/8 package/python-daphne: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP, developed to power Django Channels.
It supports automatic negotiation of protocols; there's no need for URL prefixing to determine WebSocket endpoints versus HTTP endpoints.
In addition, add the patch: remove pytest-runner-requirement.
Setup and runtime work without without pytest-runner as such, it is not actually a requirement for building.
--- DEVELOPERS | 1 + package/Config.in | 1 + ...001-remove-pytest-runner-requirement.patch | 27 +++++++++++++++++++ package/python-daphne/Config.in | 13 +++++++++ package/python-daphne/python-daphne.hash | 5 ++++ package/python-daphne/python-daphne.mk | 14 ++++++++++ 6 files changed, 61 insertions(+) create mode 100644 package/python-daphne/0001-remove-pytest-runner-requirement.patch create mode 100644 package/python-daphne/Config.in create mode 100644 package/python-daphne/python-daphne.hash create mode 100644 package/python-daphne/python-daphne.mk
DEVELOPERS +1 -0
@@ -57,6 +57,7 @@ F: package/openjdk-bin/ F: package/php/ F: package/policycoreutils/ F: package/python3/ +F: package/python-daphne/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/ F: package/python-hiredis/
package/Config.in +1 -0
@@ -870,6 +870,7 @@ menu "External python modules" source "package/python-cycler/Config.in" source "package/python-daemon/Config.in" source "package/python-daemonize/Config.in" + source "package/python-daphne/Config.in" source "package/python-dataproperty/Config.in" source "package/python-dateutil/Config.in" source "package/python-decorator/Config.in"
package/python-daphne/0001-remove-pytest-runner-requirement.patch new file +27 -0
@@ -0,0 +1,27 @@ +From f9d881cc55c89f51240f93308713216cfec793eb Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Sat, 3 Aug 2019 14:23:19 -0400 +Subject: [PATCH] remove pytest-runner requirement + +Setup does not actually require pytest-runner. As such, remove it. + +Signed-off-by: Adam Duskett <[email protected]> +--- + setup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 64e94f1..4e3abb0 100755 +--- a/setup.py ++++ b/setup.py +@@ -23,7 +23,6 @@ setup( + packages=find_packages() + ["twisted.plugins"], + include_package_data=True, + install_requires=["twisted>=18.7", "autobahn>=0.18", "asgiref~=3.0"], +- setup_requires=["pytest-runner"], + extras_require={ + "tests": ["hypothesis~=3.88", "pytest~=3.10", "pytest-asyncio~=0.8"] + }, +-- +2.21.0 +
package/python-daphne/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_DAPHNE + bool "python-daphne" + select BR2_PACKAGE_PYTHON_TWISTED # runtime + select BR2_PACKAGE_PYTHON_AUTOBAHN # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime + help + Daphne is a HTTP, HTTP2 and WebSocket protocol server for + ASGI and ASGI-HTTP, developed to power Django Channels. + It supports automatic negotiation of protocols; there's no + need for URL prefixing to determine WebSocket endpoints + versus HTTP endpoints. + + https://github.com/django/daphne
package/python-daphne/python-daphne.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/daphne/json +md5 cac7352d0ebdde4f0cc245ae0b0682f8 daphne-2.3.0.tar.gz +sha256 2329b7a74b5559f7ea012879c10ba945c3a53df7d8d2b5932a904e3b4c9abcc2 daphne-2.3.0.tar.gz +# Locally computed sha256 +sha256 55d7d6117493d69de1c7c211b947b910a715030366f1b636d28cf6891dfc1f3d PKG-INFO
package/python-daphne/python-daphne.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-daphne +# +################################################################################ + +PYTHON_DAPHNE_VERSION = 2.3.0 +PYTHON_DAPHNE_SOURCE = daphne-$(PYTHON_DAPHNE_VERSION).tar.gz +PYTHON_DAPHNE_SITE = https://files.pythonhosted.org/packages/7b/f1/994f55248e27059e160f9d07bf5d325a9891b99daf1eb775a14110e91e5b +PYTHON_DAPHNE_SETUP_TYPE = setuptools +PYTHON_DAPHNE_LICENSE = BSD +PYTHON_DAPHNE_LICENSE_FILES = PKG-INFO + +$(eval $(python-package))
Signature · 1 line
2.21.0
PATCH 4/8 package/python-daphne: new package
Quoted 121 lines · On Sun, Aug 4, 2019 at 3:16 AM <[email protected]> wrote:
From: Adam Duskett <[email protected]>
Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP, developed to power Django Channels.
It supports automatic negotiation of protocols; there's no need for URL prefixing to determine WebSocket endpoints versus HTTP endpoints.
In addition, add the patch: remove pytest-runner-requirement.
Setup and runtime work without without pytest-runner as such, it is not actually a requirement for building.Signed-off-by Adam Duskett <[email protected]>--- DEVELOPERS | 1 + package/Config.in | 1 + ...001-remove-pytest-runner-requirement.patch | 27 +++++++++++++++++++ package/python-daphne/Config.in | 13 +++++++++ package/python-daphne/python-daphne.hash | 5 ++++ package/python-daphne/python-daphne.mk | 14 ++++++++++ 6 files changed, 61 insertions(+) create mode 100644 package/python-daphne/0001-remove-pytest-runner-requirement.patch create mode 100644 package/python-daphne/Config.in create mode 100644 package/python-daphne/python-daphne.hash create mode 100644 package/python-daphne/python-daphne.mkDEVELOPERS +1
-0@@ -57,6 +57,7 @@ F: package/openjdk-bin/ F: package/php/ F: package/policycoreutils/ F: package/python3/ +F: package/python-daphne/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/ F: package/python-hiredis/package/Config.in +1
-0@@ -870,6 +870,7 @@ menu "External python modules" source "package/python-cycler/Config.in" source "package/python-daemon/Config.in" source "package/python-daemonize/Config.in" + source "package/python-daphne/Config.in" source "package/python-dataproperty/Config.in" source "package/python-dateutil/Config.in" source "package/python-decorator/Config.in"package/python-daphne/0001-remove-pytest-runner-requirement.patch new file +27
-0@@ -0,0 +1,27 @@ +From f9d881cc55c89f51240f93308713216cfec793eb Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Sat, 3 Aug 2019 14:23:19 -0400 +Subject: [PATCH] remove pytest-runner requirement + +Setup does not actually require pytest-runner. As such, remove it. + +Signed-off-by: Adam Duskett <[email protected]> +--- + setup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 64e94f1..4e3abb0 100755 +--- a/setup.py ++++ b/setup.py +@@ -23,7 +23,6 @@ setup( + packages=find_packages() + ["twisted.plugins"], + include_package_data=True, + install_requires=["twisted>=18.7", "autobahn>=0.18", "asgiref~=3.0"], +- setup_requires=["pytest-runner"], + extras_require={ + "tests": ["hypothesis~=3.88", "pytest~=3.10", "pytest-asyncio~=0.8"] + }, +-- +2.21.0 +package/python-daphne/Config.in new file +13
-0@@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_DAPHNE + bool "python-daphne" + select BR2_PACKAGE_PYTHON_TWISTED # runtime + select BR2_PACKAGE_PYTHON_AUTOBAHN # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime + help + Daphne is a HTTP, HTTP2 and WebSocket protocol server for + ASGI and ASGI-HTTP, developed to power Django Channels. + It supports automatic negotiation of protocols; there's no + need for URL prefixing to determine WebSocket endpoints + versus HTTP endpoints. + + https://github.com/django/daphnepackage/python-daphne/python-daphne.hash new file +5
-0@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/daphne/json +md5 cac7352d0ebdde4f0cc245ae0b0682f8 daphne-2.3.0.tar.gz +sha256 2329b7a74b5559f7ea012879c10ba945c3a53df7d8d2b5932a904e3b4c9abcc2 daphne-2.3.0.tar.gz +# Locally computed sha256 +sha256 55d7d6117493d69de1c7c211b947b910a715030366f1b636d28cf6891dfc1f3d PKG-INFOpackage/python-daphne/python-daphne.mk new file +1
-0@@ -0,0 +1,14 @@ +################################################################################
package/python-daphne/python-daphne.mk line 11
Quoted 10 lines
package/python-daphne/python-daphne.mk new file +10
-0+# +# python-daphne +# +################################################################################ + +PYTHON_DAPHNE_VERSION = 2.3.0 +PYTHON_DAPHNE_SOURCE = daphne-$(PYTHON_DAPHNE_VERSION).tar.gz +PYTHON_DAPHNE_SITE = https://files.pythonhosted.org/packages/7b/f1/994f55248e27059e160f9d07bf5d325a9891b99daf1eb775a14110e91e5b +PYTHON_DAPHNE_SETUP_TYPE = setuptools +PYTHON_DAPHNE_LICENSE = BSD
According to [1] it is BSD-3-Clause.
[1] https://github.com/django/daphne/blob/master/LICENSE
Yegor
Quoted 10 lines
package/python-daphne/python-daphne.mk new file +3
-1+PYTHON_DAPHNE_LICENSE_FILES = PKG-INFO + +$(eval $(python-package)) --2.21.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 4/8 package/python-daphne: new package
In reply to aduskett at gmail.comHello,
Quoted 5 lines · On Sat, 3 Aug 2019 21:16:27 -0400 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI and ASGI-HTTP, developed to power Django Channels.
Quoted 8 lines
It supports automatic negotiation of protocols; there's no need for URL prefixing to determine WebSocket endpoints versus HTTP endpoints.
In addition, add the patch: remove pytest-runner-requirement.
Setup and runtime work without without pytest-runner as such, it is not actually a requirement for building.Signed-off-by Adam Duskett <[email protected]>
I've applied, but after making a number of changes, and I also have a few comments/suggestions. See below.
Quoted 17 lines
package/python-daphne/0001-remove-pytest-runner-requirement.patch new file +11
-0@@ -0,0 +1,27 @@ +From f9d881cc55c89f51240f93308713216cfec793eb Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Sat, 3 Aug 2019 14:23:19 -0400 +Subject: [PATCH] remove pytest-runner requirement + +Setup does not actually require pytest-runner. As such, remove it. + +Signed-off-by: Adam Duskett <[email protected]> +--- + setup.py | 1 - + 1 file changed, 1 deletion(-)
package/python-daphne/0001-remove-pytest-runner-requirement.patch line 21
Quoted 10 lines
package/python-daphne/0001-remove-pytest-runner-requirement.patch new file +10
-0+ +diff --git a/setup.py b/setup.py +index 64e94f1..4e3abb0 100755 +--- a/setup.py ++++ b/setup.py +@@ -23,7 +23,6 @@ setup( + packages=find_packages() + ["twisted.plugins"], + include_package_data=True, + install_requires=["twisted>=18.7", "autobahn>=0.18", "asgiref~=3.0"], +- setup_requires=["pytest-runner"],
Shouldn't the pytest-runner requirement be moved...
package/python-daphne/0001-remove-pytest-runner-requirement.patch line 23
Quoted 2 lines
package/python-daphne/0001-remove-pytest-runner-requirement.patch new file +2
-0+ extras_require={ + "tests": ["hypothesis~=3.88", "pytest~=3.10", "pytest-asyncio~=0.8"]
... here, if it's only needed for testing ?
That would perhaps make this change acceptable upstream ?
package/python-daphne/Config.in line 5
Quoted 11 lines
package/python-daphne/Config.in new file +5
-0@@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_DAPHNE + bool "python-daphne" + select BR2_PACKAGE_PYTHON_TWISTED # runtime + select BR2_PACKAGE_PYTHON_AUTOBAHN # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime
Alphabetic ordering was not respected here.
In addition, python-daphne only works with Python 3.x, this is documented in the README.md, and also it doesn't byte-compile with Python 2.x.
Speaking of that, I think asgiref and autobahn also need Python 3.x. Indeed, when I try to build python-daphne with Python 2.x, I get this:
Compiling usr/lib/python2.7/site-packages/asgiref/compatibility.py ...
File "usr/lib/python2.7/site-packages/asgiref/compatibility.py", line 32
async def new_application(scope, receive, send):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/asgiref/server.py ...
File "usr/lib/python2.7/site-packages/asgiref/server.py", line 64
async def handle(self):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/asgiref/sync.py ...
File "usr/lib/python2.7/site-packages/asgiref/sync.py", line 134
async def main_wrap(self, args, kwargs, call_result, source_thread):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/asgiref/testing.py ...
File "usr/lib/python2.7/site-packages/asgiref/testing.py", line 24
async def wait(self, timeout=1):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/asgiref/timeout.py ...
File "usr/lib/python2.7/site-packages/asgiref/timeout.py", line 34
timeout: Optional[float],
^SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/asgiref/wsgi.py ...
File "usr/lib/python2.7/site-packages/asgiref/wsgi.py", line 14
async def __call__(self, scope, receive, send):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/autobahn/xbr/_buyer.py ...
File "usr/lib/python2.7/site-packages/autobahn/xbr/_buyer.py", line 195
async def stop(self):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/autobahn/xbr/_interfaces.py ...
File "usr/lib/python2.7/site-packages/autobahn/xbr/_interfaces.py", line 141
async def start(self, session):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/autobahn/xbr/_seller.py ...
File "usr/lib/python2.7/site-packages/autobahn/xbr/_seller.py", line 447
async def balance(self):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/daphne/cli.py ...
File "usr/lib/python2.7/site-packages/daphne/cli.py", line 29
async def asgi(self, receive, send, scope):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/daphne/server.py ...
File "usr/lib/python2.7/site-packages/daphne/server.py", line 213
async def handle_reply(self, protocol, message):
^
SyntaxError: invalid syntax
Compiling usr/lib/python2.7/site-packages/daphne/testing.py ...
File "usr/lib/python2.7/site-packages/daphne/testing.py", line 166
async def __call__(self, send, receive):
^
SyntaxError: invalid syntax
package/python-daphne/Config.in line 10
Quoted 5 lines
package/python-daphne/Config.in new file +5
-0+PYTHON_DAPHNE_VERSION = 2.3.0 +PYTHON_DAPHNE_SOURCE = daphne-$(PYTHON_DAPHNE_VERSION).tar.gz +PYTHON_DAPHNE_SITE = https://files.pythonhosted.org/packages/7b/f1/994f55248e27059e160f9d07bf5d325a9891b99daf1eb775a14110e91e5b +PYTHON_DAPHNE_SETUP_TYPE = setuptools +PYTHON_DAPHNE_LICENSE = BSD
As suggested by Yegor, I fixed that to say BSD-3-Clause. Could you contact upstream so that the LICENSE file that is in their Github repo makes its way to the tarball provided on PyPi ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 4/8 package/python-daphne: new package
Hello,
+Yegor in the loop.
Quoted 69 lines · On Mon, 30 Sep 2019 21:33:47 +0200 Thomas Petazzoni…
Speaking of that, I think asgiref and autobahn also need Python 3.x. Indeed, when I try to build python-daphne with Python 2.x, I get this:
Compiling
usr/lib/python2.7/site-packages/asgiref/compatibility.py...
File "usr/lib/python2.7/site-packages/asgiref/compatibility.py", line 32
async defnew_application(scope, receive, send):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/asgiref/server.py...
File "usr/lib/python2.7/site-packages/asgiref/server.py", line 64
async def handle(self):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/asgiref/sync.py...
File "usr/lib/python2.7/site-packages/asgiref/sync.py", line 134
async defmain_wrap(self, args, kwargs, call_result, source_thread):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/asgiref/testing.py...
File "usr/lib/python2.7/site-packages/asgiref/testing.py", line 24
async defwait(self, timeout=1):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/asgiref/timeout.py...
File "usr/lib/python2.7/site-packages/asgiref/timeout.py", line 34timeout: Optional[float], ^SyntaxError: invalid syntax
Compiling
usr/lib/python2.7/site-packages/asgiref/wsgi.py...
File "usr/lib/python2.7/site-packages/asgiref/wsgi.py", line 14
async def__call__(self, scope, receive, send):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/autobahn/xbr/_buyer.py...
File "usr/lib/python2.7/site-packages/autobahn/xbr/_buyer.py", line 195
async def stop(self):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/autobahn/xbr/_interfaces.py...
File "usr/lib/python2.7/site-packages/autobahn/xbr/_interfaces.py", line 141
async defstart(self, session):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/autobahn/xbr/_seller.py...
File "usr/lib/python2.7/site-packages/autobahn/xbr/_seller.py", line 447
async def balance(self):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/daphne/cli.py...
File "usr/lib/python2.7/site-packages/daphne/cli.py", line 29
async defasgi(self, receive, send, scope):
^
SyntaxError: invalid syntaxCompiling
usr/lib/python2.7/site-packages/daphne/server.py...
File "usr/lib/python2.7/site-packages/daphne/server.py", line 213
async defhandle_reply(self, protocol, message):
^
SyntaxError: invalid syntax
Quoted 5 lines
Compiling
usr/lib/python2.7/site-packages/daphne/testing.py...
File "usr/lib/python2.7/site-packages/daphne/testing.py", line 166
async def__call__(self, send, receive):
^
SyntaxError: invalid syntax
Now that I think more about this: the build should have aborted due to these compilation failures, but it did not. Due to this, such problems are not caught by our autobuilders. It probably makes sense to have a look and see why the build doesn't abort as it should.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 5/8 package/python-asgiref: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
ASGI is a standard for Python asynchronous web apps and servers to communicate with each other, and positioned as an asynchronous successor to WSGI.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-asgiref/Config.in | 14 ++++++++++++++ package/python-asgiref/python-asgiref.hash | 5 +++++ package/python-asgiref/python-asgiref.mk | 14 ++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 package/python-asgiref/Config.in create mode 100644 package/python-asgiref/python-asgiref.hash create mode 100644 package/python-asgiref/python-asgiref.mk
DEVELOPERS +1 -0
@@ -57,6 +57,7 @@ F: package/openjdk-bin/ F: package/php/ F: package/policycoreutils/ F: package/python3/ +F: package/python-asgiref/ F: package/python-daphne/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/
package/Config.in +1 -0
@@ -829,6 +829,7 @@ menu "External python modules" source "package/python-alsaaudio/Config.in" source "package/python-argh/Config.in" source "package/python-arrow/Config.in" + source "package/python-asgiref/Config.in" source "package/python-asn1crypto/Config.in" source "package/python-async-timeout/Config.in" source "package/python-attrs/Config.in"
package/python-asgiref/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_ASGIREF + bool "python-asgiref" + help + ASGI is a standard for Python asynchronous web apps and + servers to communicate with each other, and positioned as + an asynchronous successor to WSGI. + + This package includes ASGI base libraries, such as: + - Sync-to-async and async-to-sync function wrappers, + asgiref.sync + - Server base classes, asgiref.server + - A WSGI-to-ASGI adapter, in asgiref.wsgi + + http://github.com/django/asgiref/
package/python-asgiref/python-asgiref.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/asgiref/json +md5 682697d39175a9681222dd6f304d8e51 asgiref-3.2.0.tar.gz +sha256 cefcbd64acbfc9f38913566824ef070dd9a50e63f1b4cc5a7f1c44be809d7ff3 asgiref-3.2.0.tar.gz +# Locally computed sha256 checksums +sha256 b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669 LICENSE
package/python-asgiref/python-asgiref.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-asgiref +# +################################################################################ + +PYTHON_ASGIREF_VERSION = 3.2.0 +PYTHON_ASGIREF_SOURCE = asgiref-$(PYTHON_ASGIREF_VERSION).tar.gz +PYTHON_ASGIREF_SITE = https://files.pythonhosted.org/packages/65/ef/e357b3e3d418f16d8f79b9d0c44d170bc0d88f0840b5755b6bfe25a576ea +PYTHON_ASGIREF_SETUP_TYPE = setuptools +PYTHON_ASGIREF_LICENSE = BSD-3-Clause +PYTHON_ASGIREF_LICENSE_FILES = LICENSE + +$(eval $(python-package))
Signature · 1 line
2.21.0
Thomas Petazzoni
AppliedPATCH 5/8 package/python-asgiref: new package
Quoted 7 lines · On Sat, 3 Aug 2019 21:16:28 -0400 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
ASGI is a standard for Python asynchronous web apps and servers to communicate with each other, and positioned as an asynchronous successor to WSGI.
Signed-off-by Adam Duskett <[email protected]>
Quoted 10 lines
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-asgiref/Config.in | 14 ++++++++++++++ package/python-asgiref/python-asgiref.hash | 5 +++++ package/python-asgiref/python-asgiref.mk | 14 ++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 package/python-asgiref/Config.in create mode 100644 package/python-asgiref/python-asgiref.hash create mode 100644 package/python-asgiref/python-asgiref.mk
Applied to master, thanks. I applied this patch 05/08 before patch 04/08, because patch 04/08 needs python-asgiref.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 6/8 package/python-aioredis: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
asyncio (PEP 3156) Redis client library.
Provides a simple and clear interface to Redis based on asyncio.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-aioredis/Config.in | 13 +++++++++++++ package/python-aioredis/python-aioredis.hash | 5 +++++ package/python-aioredis/python-aioredis.mk | 14 ++++++++++++++ 5 files changed, 34 insertions(+) create mode 100644 package/python-aioredis/Config.in create mode 100644 package/python-aioredis/python-aioredis.hash create mode 100644 package/python-aioredis/python-aioredis.mk
DEVELOPERS +1 -0
@@ -57,6 +57,7 @@ F: package/openjdk-bin/ F: package/php/ F: package/policycoreutils/ F: package/python3/ +F: package/python-aioredis/ F: package/python-asgiref/ F: package/python-daphne/ F: package/python-django-enumfields/
package/Config.in +1 -0
@@ -825,6 +825,7 @@ menu "External python modules" source "package/python-aiohttp-sse/Config.in" source "package/python-aiojobs/Config.in" source "package/python-aiomonitor/Config.in" + source "package/python-aioredis/Config.in" source "package/python-aiorwlock/Config.in" source "package/python-alsaaudio/Config.in" source "package/python-argh/Config.in"
package/python-aioredis/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_AIOREDIS + bool "python-aioredis" + depends on BR2_TOOLCHAIN_HAS_ATOMIC # redis + select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime + select BR2_PACKAGE_PYTHON_HIREDIS # runtime + select BR2_PACKAGE_REDIS # runtime + help + Provides simple and clear interface to Redis based on asyncio. + + https://github.com/aio-libs/aioredis + +comment "python-aioredis needs a toolchain w/ atomic" + depends on !BR2_TOOLCHAIN_HAS_ATOMIC
package/python-aioredis/python-aioredis.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/aioredis/json +md5 fd6c66e4d8efce553c369c0855c6fb49 aioredis-1.2.0.tar.gz +sha256 84d62be729beb87118cf126c20b0e3f52d7a42bb7373dc5bcdd874f26f1f251a aioredis-1.2.0.tar.gz +# Locally computed sha256 checksums +sha256 a288b4f41b5531ff7e9e2df9cd3f17a1844badebc52d7a9205b131f8b8a50744 LICENSE
package/python-aioredis/python-aioredis.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-aioredis +# +################################################################################ + +PYTHON_AIOREDIS_VERSION = 1.2.0 +PYTHON_AIOREDIS_SOURCE = aioredis-$(PYTHON_AIOREDIS_VERSION).tar.gz +PYTHON_AIOREDIS_SITE = https://files.pythonhosted.org/packages/2e/a3/cd122b68d8071d332972027d225f548e0206001da1aa0685ea08db803b06 +PYTHON_AIOREDIS_SETUP_TYPE = setuptools +PYTHON_AIOREDIS_LICENSE = MIT +PYTHON_AIOREDIS_LICENSE_FILES = LICENSE + +$(eval $(python-package))
Signature · 1 line
2.21.0
PATCH 6/8 package/python-aioredis: new package
Hello,
package/python-aioredis/Config.in line 6
Quoted 12 lines · On Sat, 3 Aug 2019 21:16:29 -0400 aduskett at gmail.com wrote:
package/python-aioredis/Config.in new file +6
-0@@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_AIOREDIS + bool "python-aioredis" + depends on BR2_TOOLCHAIN_HAS_ATOMIC # redis + select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime + select BR2_PACKAGE_PYTHON_HIREDIS # runtime + select BR2_PACKAGE_REDIS # runtime
There is no need to select BR2_PACKAGE_REDIS, the redis server could be a remote one, so it may not be hosted on the same machine as the one running python-aioredis.
However, you were missing a BR2_PACKAGE_PYTHON3 dependency, because python-aioredis only works with python 3.x.
package/python-aioredis/Config.in line 13
Quoted 2 lines
package/python-aioredis/Config.in new file +2
-0+comment "python-aioredis needs a toolchain w/ atomic" + depends on !BR2_TOOLCHAIN_HAS_ATOMIC
This is no longer relevant due to the redis select removal, but for the record, we don't add Config.in comments for toolchain atomics, because there is nothing the user can do about it.
I've applied your patch with the redis dependency dropped, and the addition of a python3 dependency.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 7/8 package/python-channels: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Django design patterns and a flexible underlying framework that lets you not only customize behaviours but also write support for your own protocols and needs.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-channels/Config.in | 14 ++++++++++++++ package/python-channels/python-channels.hash | 5 +++++ package/python-channels/python-channels.mk | 14 ++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 package/python-channels/Config.in create mode 100644 package/python-channels/python-channels.hash create mode 100644 package/python-channels/python-channels.mk
DEVELOPERS +1 -0
@@ -59,6 +59,7 @@ F: package/policycoreutils/ F: package/python3/ F: package/python-aioredis/ F: package/python-asgiref/ +F: package/python-channels/ F: package/python-daphne/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/
package/Config.in +1 -0
@@ -851,6 +851,7 @@ menu "External python modules" source "package/python-cchardet/Config.in" source "package/python-certifi/Config.in" source "package/python-cffi/Config.in" + source "package/python-channels/Config.in" source "package/python-characteristic/Config.in" source "package/python-chardet/Config.in" source "package/python-cheetah/Config.in"
package/python-channels/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_CHANNELS + bool "python-channels" + select BR2_PACKAGE_PYTHON_DJANGO # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime + select BR2_PACKAGE_PYTHON_DAPHNE # runtime + help + Channels augments Django to bring WebSocket, long-poll + HTTP, task offloading and other async support to your + code, using familiar Django design patterns and a + flexible underlying framework that lets you not only + customize behaviours but also write support for your + own protocols and needs. + + http://github.com/django/channels
package/python-channels/python-channels.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/channels/json +md5 aec056cf4d0fa6444b3d83ccd5885fc5 channels-2.2.0.tar.gz +sha256 af7cdba9efb3f55b939917d1b15defb5d40259936013e60660e5e9aff98db4c5 channels-2.2.0.tar.gz +# Locally computed sha256 checksums +sha256 b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669 LICENSE
package/python-channels/python-channels.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-channels +# +################################################################################ + +PYTHON_CHANNELS_VERSION = 2.2.0 +PYTHON_CHANNELS_SOURCE = channels-$(PYTHON_CHANNELS_VERSION).tar.gz +PYTHON_CHANNELS_SITE = https://files.pythonhosted.org/packages/26/b9/92c803f3e8e304efbfbcd0634d4a5ad2d231f515b968f1b9e7c84ee78012 +PYTHON_CHANNELS_SETUP_TYPE = setuptools +PYTHON_CHANNELS_LICENSE = BSD-3-Clause +PYTHON_CHANNELS_LICENSE_FILES = LICENSE + +$(eval $(python-package))
Signature · 1 line
2.21.0
PATCH 7/8 package/python-channels: new package
package/python-channels/Config.in line 5
Quoted 11 lines · On Sat, 3 Aug 2019 21:16:30 -0400 aduskett at gmail.com wrote:
package/python-channels/Config.in new file +5
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_CHANNELS + bool "python-channels" + select BR2_PACKAGE_PYTHON_DJANGO # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime + select BR2_PACKAGE_PYTHON_DAPHNE # runtime
Alphabetic ordering + missing BR2_PACKAGE_PYTHON3 dependency.
I fixed these, and applied to master. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 8/8 package/python-channels-redis: new package
In reply to aduskett at gmail.comFrom: Adam Duskett <[email protected]>
A Django Channels channel layer that uses Redis as its backing store, and supports both a single-server and sharded configurations, as well as group support.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/python-channels-redis/Config.in | 17 +++++++++++++++++ .../python-channels-redis.hash | 5 +++++ .../python-channels-redis.mk | 15 +++++++++++++++ 5 files changed, 39 insertions(+) create mode 100644 package/python-channels-redis/Config.in create mode 100644 package/python-channels-redis/python-channels-redis.hash create mode 100644 package/python-channels-redis/python-channels-redis.mk
DEVELOPERS +1 -0
@@ -60,6 +60,7 @@ F: package/python3/ F: package/python-aioredis/ F: package/python-asgiref/ F: package/python-channels/ +F: package/python-channels-redis/ F: package/python-daphne/ F: package/python-django-enumfields/ F: package/python-flask-sqlalchemy/
package/Config.in +1 -0
@@ -852,6 +852,7 @@ menu "External python modules" source "package/python-certifi/Config.in" source "package/python-cffi/Config.in" source "package/python-channels/Config.in" + source "package/python-channels-redis/Config.in" source "package/python-characteristic/Config.in" source "package/python-chardet/Config.in" source "package/python-cheetah/Config.in"
package/python-channels-redis/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_CHANNELS_REDIS + bool "python-channels-redis" + depends on BR2_TOOLCHAIN_HAS_ATOMIC # redis + select BR2_PACKAGE_PYTHON_AIOREDIS # runtime + select BR2_PACKAGE_PYTHON_MSGPACK # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime + select BR2_PACKAGE_PYTHON_CHANNELS # runtime + select BR2_PACKAGE_REDIS + help + A Django Channels channel layer that uses Redis as its + backing store, and supports both a single-server and + sharded configurations, as well as group support. + + http://github.com/django/channels_redis/ + +comment "python-channels-redis needs a toolchain w/ atomic" + depends on !BR2_TOOLCHAIN_HAS_ATOMIC
package/python-channels-redis/python-channels-redis.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/channels_redis/json +md5 d060c96cc53c6b2c3f93df4d7aefecf3 channels_redis-2.4.0.tar.gz +sha256 b7ccbcb2fd4e568c08c147891b26db59aa25d88b65af826ce7f70c815cfb91bc channels_redis-2.4.0.tar.gz +# Locally computed sha256 checksums +sha256 b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669 LICENSE
package/python-channels-redis/python-channels-redis.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# python-channels-redis +# +################################################################################ + +PYTHON_CHANNELS_REDIS_VERSION = 2.4.0 +PYTHON_CHANNELS_REDIS_SOURCE = channels_redis-$(PYTHON_CHANNELS_REDIS_VERSION).tar.gz +PYTHON_CHANNELS_REDIS_SITE = https://files.pythonhosted.org/packages/79/20/896a5246ef703a74dd0af6e46038eb7838d801e532cf25474d2580f09d3e +PYTHON_CHANNELS_REDIS_SETUP_TYPE = setuptools +PYTHON_CHANNELS_REDIS_LICENSE = BSD-3-Clause +PYTHON_CHANNELS_REDIS_LICENSE_FILES = LICENSE +PYTHON_CHANNELS_REDIS_DEPENDENCIES = redis + +$(eval $(python-package))
Signature · 1 line
2.21.0
PATCH 8/8 package/python-channels-redis: new package
Hello,
+Yegor here as well, as I have a Python packaging question.
Quoted 6 lines · On Sat, 3 Aug 2019 21:16:31 -0400 aduskett at gmail.com wrote:
package/python-channels-redis/Config.in new file +0
-0
package/python-channels-redis/Config.in line 8
Quoted 8 lines
package/python-channels-redis/Config.in new file +8
-0@@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_CHANNELS_REDIS + bool "python-channels-redis" + depends on BR2_TOOLCHAIN_HAS_ATOMIC # redis + select BR2_PACKAGE_PYTHON_AIOREDIS # runtime + select BR2_PACKAGE_PYTHON_MSGPACK # runtime + select BR2_PACKAGE_PYTHON_ASGIREF # runtime + select BR2_PACKAGE_PYTHON_CHANNELS # runtime + select BR2_PACKAGE_REDIS
Here as well, we don't need this BR2_PACKAGE_REDIS dependency. The other dependencies should be ordered alphabetically, and the BR2_PACKAGE_PYTHON3 dependency was missing. I fixed all that and applied.
Now, the question for which Yegor's input would also be useful. The setup.py for this package goes like this:
crypto_requires = ["cryptography>=1.3.0"]
test_requires = crypto_requires + [
"pytest~=3.6.0",
"pytest-asyncio~=0.8",
"async_generator~=1.8",
"async-timeout~=2.0",]
setup(
[...]
install_requires=[
"aioredis~=1.0",
"msgpack~=0.6.0",
"asgiref~=3.0",
"channels~=2.2",
],
extras_require={"cryptography": crypto_requires, "tests": test_requires},)
The question is how do these "extras_require" work ? While we don't care much about the tests, the cryptography stuff maybe be useful. How does it work ? Does it say "I'm able to use python-cryptography>1.3.0 if it's available" ? Is there anything that needs to be done to 'enable' this dependency ? Should we have a sub-option for this ? Or make it an automatic dependency, which means basically do nothing since these are pure runtime dependencies anyway ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com