From nobody Mon Jan 30 13:04:35 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P57gS2tsgz3cY2T; Mon, 30 Jan 2023 13:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P57gS0Dxcz4Kqg; Mon, 30 Jan 2023 13:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675083876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVXc37KZhjhv7GwNe13VAg5GqL4c/U+vHrmjzYf8QVY=; b=H3WhEoFc/04MK+TzrfPMFrApMe1Qxx3bCp0wJjeZrMCXVKr31GVGXkccyXm4ap/xtb8XF1 H2BJ9N0H8b9SacR/sieLL5EYd9ml2eztWYMpeEik0O41T1zDyuNvtWfl8jlzv2et4xWYpT JD3HFyfuiUBP5uYjoBKQRqFe5nmliMNvS6fHCOXyxM9VzW4zh3ePkjEOCUPbN52bMfOUYq zM3WDYovpUCzAruqq9cPp+mHZ4/TL8GRegQPruFcXpTHtwtfuuWvn7mlBhpk8NuIRHdMWw YekpEXUUO0U3JvHIL889Z24yZ6pLnzXTAynZlbWoDS9rxQ3E+4nnTxK7Urqezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675083876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fVXc37KZhjhv7GwNe13VAg5GqL4c/U+vHrmjzYf8QVY=; b=uV8JkGoAXsSK8MLdGO0OaWLe6n6BPQSgby9pRU/YhprddYyL5Dk+m0Vgk977eIf4gP3Mgc G0I1bfyvfLJH2Zj1zm7EvnQyD8i8kdRCMDUuaBWgNmg+4ZqmBiSufAM6NJTXs/hl9Pzyzn zFc2iVzL1zMeFy6qacp0ZMiVTp2GJS49MHFM8RmjbjRaP2MQyIFSiulvPCPQy/ixwHuP7r 6qZQ04BmCroJYzMBUOP4lhZo+q0zVz9dQ3IsPd0ps/HwozgP8vTGileooZxRCQweH8kzr+ 5ocRQ4SVhNA2eB1iqqwKg2jWh2oXPzYd90GnOpTrfpMaozlkR0ytxGlJQ6H+zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675083876; a=rsa-sha256; cv=none; b=azE7JTwuYtC9ucVaWsg6YH18fRi02BqHKIs6TIxzs6j2RAHafQzMvceSjNuOSuCbQ3Oi1k kBGNQ45+eVg/bnpx4R3pV4XBBFQukbDXJsvdcycIFUcTvYl9x+LuQjJPwMoAH6r/KPZ/b8 st48xZD/Qgke4nCNlj7FKb746NUVwR3SBlhLJAXe6hD71hT33ai49OUX4COc5wSgJz1xpr sCeXzqfuFOoHOCD4NRM31H1KgAzHeTVELf2kSKPh9BwtY21DESE1SfZlNWt6UNgaxdBFq2 LOcjpNwmva38TAJY4MqcDVtPcs+1K1Vd8q7kjM7M7Aju2/rD4DU8Vl+EeRYKeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P57gR6Sh5z188X; Mon, 30 Jan 2023 13:04:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30UD4ZUU051013; Mon, 30 Jan 2023 13:04:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30UD4ZjL051012; Mon, 30 Jan 2023 13:04:35 GMT (envelope-from git) Date: Mon, 30 Jan 2023 13:04:35 GMT Message-Id: <202301301304.30UD4ZjL051012@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: c72cac2c45de - main - devel/py-comm: Add py-comm 0.1.2 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c72cac2c45de100b56ef07f2d3eac64c909045aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=c72cac2c45de100b56ef07f2d3eac64c909045aa commit c72cac2c45de100b56ef07f2d3eac64c909045aa Author: Po-Chuan Hsieh AuthorDate: 2023-01-30 12:20:55 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-01-30 12:58:45 +0000 devel/py-comm: Add py-comm 0.1.2 Comm provides a way to register a Kernel Comm implementation, as per the Jupyter kernel protocol. It also provides a base Comm implementation and a default CommManager that can be used. --- devel/Makefile | 1 + devel/py-comm/Makefile | 24 ++++++++++++++++++++++++ devel/py-comm/distinfo | 3 +++ devel/py-comm/files/setup.py | 32 ++++++++++++++++++++++++++++++++ devel/py-comm/pkg-descr | 3 +++ 5 files changed, 63 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index f51398d43283..240b22def4f0 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4418,6 +4418,7 @@ SUBDIR += py-colorlog SUBDIR += py-colorspacious SUBDIR += py-columnize + SUBDIR += py-comm SUBDIR += py-commandlines SUBDIR += py-conditional SUBDIR += py-configargparse diff --git a/devel/py-comm/Makefile b/devel/py-comm/Makefile new file mode 100644 index 000000000000..6043bf902ea0 --- /dev/null +++ b/devel/py-comm/Makefile @@ -0,0 +1,24 @@ +PORTNAME= comm +PORTVERSION= 0.1.2 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Jupyter Python Comm implementation +WWW= https://github.com/ipython/comm + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}traitlets>=5.3:devel/py-traitlets@${PY_FLAVOR} + +USES= python:3.7+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +post-patch: + @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py + +.include diff --git a/devel/py-comm/distinfo b/devel/py-comm/distinfo new file mode 100644 index 000000000000..e7dbaea2696b --- /dev/null +++ b/devel/py-comm/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1674588044 +SHA256 (comm-0.1.2.tar.gz) = 3e2f5826578e683999b93716285b3b1f344f157bf75fa9ce0a797564e742f062 +SIZE (comm-0.1.2.tar.gz) = 4927 diff --git a/devel/py-comm/files/setup.py b/devel/py-comm/files/setup.py new file mode 100644 index 000000000000..6ea9829d6ac7 --- /dev/null +++ b/devel/py-comm/files/setup.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from setuptools import setup + +setup( + name='comm', + version='%%PORTVERSION%%', + description='Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc.', + long_description="# Comm\n\nIt provides a way to register a Kernel Comm implementation, as per the Jupyter kernel protocol.\nIt also provides a base Comm implementation and a default CommManager that can be used.\n\n## Register a comm implementation in the kernel:\n\n### Case 1: Using the default CommManager and the BaseComm implementations\n\nWe provide default implementations for usage in IPython:\n\n```python\nimport comm\n\n\nclass MyCustomComm(comm.base_comm.BaseComm):\n\n def publish_msg(self, msg_type, data=None, metadata=None, buffers=None, **keys):\n # TODO implement the logic for sending comm messages through the iopub channel\n pass\n\n\ncomm.create_comm = MyCustomComm\n```\n\nThis is typically what ipykernel and JupyterLite's pyolite kernel will do.\n\n### Case 2: Providing your own comm manager creation implementation\n\n```python\nimport comm\n\ncomm.create_comm = custom_create_comm\ncomm.get_comm_manager = custom_comm_manager_getter\n```\n\nThis i s typically what xeus-python does (it has its own manager implementation using xeus's C++ messaging logic).\n\n## Comm users\n\nLibraries like ipywidgets can then use the comms implementation that has been registered by the kernel:\n\n```python\nfrom comm import create_comm, get_comm_manager\n\n# Create a comm\ncomm_manager = get_comm_manager()\ncomm = create_comm()\n\ncomm_manager.register_comm(comm)\n```\n", + author='Jupyter contributors', + classifiers=[ + 'Framework :: Jupyter', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + ], + install_requires=[ + 'traitlets>=5.3', + ], + extras_require={ + 'test': [ + 'pytest', + ], + }, + packages=[ + 'comm', + ], +) diff --git a/devel/py-comm/pkg-descr b/devel/py-comm/pkg-descr new file mode 100644 index 000000000000..85ae89e4a3d0 --- /dev/null +++ b/devel/py-comm/pkg-descr @@ -0,0 +1,3 @@ +Comm provides a way to register a Kernel Comm implementation, as per the Jupyter +kernel protocol. It also provides a base Comm implementation and a default +CommManager that can be used.