git: e9cedb33b8ed - main - devel/py-comm: Convert to USE_PYTHON=pep517

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 19:26:54 UTC
The branch main has been updated by sunpoet:

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

commit e9cedb33b8ed99ecf6b3fef61dce3be5c86f8a76
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:42:39 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:20:33 +0000

    devel/py-comm: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 devel/py-comm/Makefile       |  7 +++----
 devel/py-comm/files/setup.py | 32 --------------------------------
 2 files changed, 3 insertions(+), 36 deletions(-)

diff --git a/devel/py-comm/Makefile b/devel/py-comm/Makefile
index 6043bf902ea0..fbde96f28902 100644
--- a/devel/py-comm/Makefile
+++ b/devel/py-comm/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	comm
 PORTVERSION=	0.1.2
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,14 +12,12 @@ WWW=		https://github.com/ipython/comm
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=1.10:devel/py-hatchling@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}traitlets>=5.3:devel/py-traitlets@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.mk>
diff --git a/devel/py-comm/files/setup.py b/devel/py-comm/files/setup.py
deleted file mode 100644
index 6ea9829d6ac7..000000000000
--- a/devel/py-comm/files/setup.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- 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',
-    ],
-)