aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-10-11 12:53:48 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-10-11 12:53:48 +0000
commit62ddbb54872647f4cb6370ad9ec671d8099f39ab (patch)
treedbb3a5582afbb89cc5676efce02a5c19c939227d
parent84437b55bbafb20bc1916ac98b6594c18c668dba (diff)
www/py-daphne: Add py-daphne 4.0.0
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.
-rw-r--r--www/Makefile1
-rw-r--r--www/py-daphne/Makefile23
-rw-r--r--www/py-daphne/distinfo3
-rw-r--r--www/py-daphne/files/patch-setup.py10
-rw-r--r--www/py-daphne/pkg-descr5
5 files changed, 42 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index 9934a09cb41e..2d4d3b09f9bb 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1489,6 +1489,7 @@
SUBDIR += py-cssmin
SUBDIR += py-cssselect
SUBDIR += py-cssutils
+ SUBDIR += py-daphne
SUBDIR += py-dj-database-url
SUBDIR += py-dj41-django-auth-ldap
SUBDIR += py-dj41-django-cors-headers
diff --git a/www/py-daphne/Makefile b/www/py-daphne/Makefile
new file mode 100644
index 000000000000..9340cdd57072
--- /dev/null
+++ b/www/py-daphne/Makefile
@@ -0,0 +1,23 @@
+PORTNAME= daphne
+PORTVERSION= 4.0.0
+CATEGORIES= www python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Django ASGI (HTTP/WebSocket) server
+WWW= https://github.com/django/daphne
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asgiref>=3.5.2<4:www/py-asgiref@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}autobahn>=22.4.2:www/py-autobahn@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}twisted>=22.4:devel/py-twisted@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/www/py-daphne/distinfo b/www/py-daphne/distinfo
new file mode 100644
index 000000000000..9420c7dc4fe7
--- /dev/null
+++ b/www/py-daphne/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1696904102
+SHA256 (daphne-4.0.0.tar.gz) = cce9afc8f49a4f15d4270b8cfb0e0fe811b770a5cc795474e97e4da287497666
+SIZE (daphne-4.0.0.tar.gz) = 28600
diff --git a/www/py-daphne/files/patch-setup.py b/www/py-daphne/files/patch-setup.py
new file mode 100644
index 000000000000..7f1471e1dd55
--- /dev/null
+++ b/www/py-daphne/files/patch-setup.py
@@ -0,0 +1,10 @@
+--- setup.py.orig 2022-10-07 10:10:21 UTC
++++ setup.py
+@@ -24,7 +24,6 @@ setup(
+ include_package_data=True,
+ install_requires=["twisted[tls]>=22.4", "autobahn>=22.4.2", "asgiref>=3.5.2,<4"],
+ python_requires=">=3.7",
+- setup_requires=["pytest-runner"],
+ extras_require={"tests": ["hypothesis", "pytest", "pytest-asyncio", "django"]},
+ entry_points={
+ "console_scripts": ["daphne = daphne.cli:CommandLineInterface.entrypoint"]
diff --git a/www/py-daphne/pkg-descr b/www/py-daphne/pkg-descr
new file mode 100644
index 000000000000..d1c4e0751340
--- /dev/null
+++ b/www/py-daphne/pkg-descr
@@ -0,0 +1,5 @@
+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.