git: 7335a129b2ea - main - devel/py-pycrdt-websocket: Add py-pycrdt-websocket 0.12.5

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 14 Dec 2023 20:53:56 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7335a129b2eaeb23180b1b0e4f6c581f3e02d9d7

commit 7335a129b2eaeb23180b1b0e4f6c581f3e02d9d7
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-12-14 20:41:48 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-12-14 20:41:48 +0000

    devel/py-pycrdt-websocket: Add py-pycrdt-websocket 0.12.5
    
    Pycrdt-websocket is a Python library for building WebSocket servers and clients
    that connect and synchronize shared documents. It can be used to create
    collaborative web applications.
    
    The following diagram illustrates a typical architecture. The goal is to share a
    document among several clients.
    
    Each client has an instance of a Doc, representing their view of a document. A
    shared document also lives in a room on the server side. Conceptually, a room
    can be seen as the place where clients collaborate on a document. The WebSocket
    to which a client connects points to the corresponding room through the endpoint
    path. In the example below, clients A and B connect to a WebSocket at path
    room-1, and thus both clients find themselves in a room called room-1. All the
    Doc synchronization logic is taken care of by the WebsocketProvider.
    
    Each update to a shared document can be persisted to disk using a store, which
    can be a file or a database.
---
 devel/Makefile                      |  1 +
 devel/py-pycrdt-websocket/Makefile  | 30 ++++++++++++++++++++++++++++++
 devel/py-pycrdt-websocket/distinfo  |  3 +++
 devel/py-pycrdt-websocket/pkg-descr | 17 +++++++++++++++++
 4 files changed, 51 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 6bdfb8d9d9c2..7211c42f6749 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5284,6 +5284,7 @@
     SUBDIR += py-pycomplete
     SUBDIR += py-pycparser
     SUBDIR += py-pycrdt
+    SUBDIR += py-pycrdt-websocket
     SUBDIR += py-pydantic
     SUBDIR += py-pydantic-core
     SUBDIR += py-pydantic-extra-types
diff --git a/devel/py-pycrdt-websocket/Makefile b/devel/py-pycrdt-websocket/Makefile
new file mode 100644
index 000000000000..81d7232c0f5f
--- /dev/null
+++ b/devel/py-pycrdt-websocket/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	pycrdt-websocket
+PORTVERSION=	0.12.5
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	pycrdt_websocket-${PORTVERSION}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	WebSocket connector for pycrdt
+WWW=		https://github.com/jupyter-server/pycrdt-websocket
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiosqlite>=0.18.0<1:databases/py-aiosqlite@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}anyio>=3.6.2<5:devel/py-anyio@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pycrdt>=0.7.0<0.8.0:devel/py-pycrdt@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+OPTIONS_DEFINE=	DJANGO
+DJANGO_DESC=	Django support
+
+DJANGO_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}channels>=0:www/py-channels@${PY_FLAVOR}
+
+.include <bsd.port.mk>
diff --git a/devel/py-pycrdt-websocket/distinfo b/devel/py-pycrdt-websocket/distinfo
new file mode 100644
index 000000000000..bc5238211b23
--- /dev/null
+++ b/devel/py-pycrdt-websocket/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1702543602
+SHA256 (pycrdt_websocket-0.12.5.tar.gz) = f7bec9378a07e99ae99f6f14018e70f95250017cf1190ef2c1736cce0cd56a2c
+SIZE (pycrdt_websocket-0.12.5.tar.gz) = 16791
diff --git a/devel/py-pycrdt-websocket/pkg-descr b/devel/py-pycrdt-websocket/pkg-descr
new file mode 100644
index 000000000000..a7f3582fb57f
--- /dev/null
+++ b/devel/py-pycrdt-websocket/pkg-descr
@@ -0,0 +1,17 @@
+Pycrdt-websocket is a Python library for building WebSocket servers and clients
+that connect and synchronize shared documents. It can be used to create
+collaborative web applications.
+
+The following diagram illustrates a typical architecture. The goal is to share a
+document among several clients.
+
+Each client has an instance of a Doc, representing their view of a document. A
+shared document also lives in a room on the server side. Conceptually, a room
+can be seen as the place where clients collaborate on a document. The WebSocket
+to which a client connects points to the corresponding room through the endpoint
+path. In the example below, clients A and B connect to a WebSocket at path
+room-1, and thus both clients find themselves in a room called room-1. All the
+Doc synchronization logic is taken care of by the WebsocketProvider.
+
+Each update to a shared document can be persisted to disk using a store, which
+can be a file or a database.