git: 474b053d9fc1 - main - devel/py-notebook-shim: Convert to USE_PYTHON=pep517

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

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

commit 474b053d9fc15d53c3bc0706c3c486f60eada110
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:44:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:20:47 +0000

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

diff --git a/devel/py-notebook-shim/Makefile b/devel/py-notebook-shim/Makefile
index 178cb5908921..dc8a605135c2 100644
--- a/devel/py-notebook-shim/Makefile
+++ b/devel/py-notebook-shim/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	notebook-shim
 PORTVERSION=	0.2.2
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,14 +13,12 @@ WWW=		https://github.com/jupyter/notebook_shim
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=1.0:devel/py-hatchling@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}jupyter-server>=1.8<3:devel/py-jupyter-server@${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-notebook-shim/files/setup.py b/devel/py-notebook-shim/files/setup.py
deleted file mode 100644
index 773fb004fda6..000000000000
--- a/devel/py-notebook-shim/files/setup.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-setup(
-    name='notebook-shim',
-    version='%%PORTVERSION%%',
-    description='A shim layer for notebook traits and config',
-    long_description='# Notebook Shim\n\nThis project provides a way for JupyterLab and other frontends to switch to [Jupyter Server](https://github.com/jupyter/jupyter_server/) for their Python Web application backend.\n\n## Basic Usage\n\nInstall from PyPI:\n\n```\npip install notebook_shim\n```\n\nThis will automatically enable the extension in Jupyter Server.\n\n## Usage\n\nThis project also includes an API for shimming traits that moved from `NotebookApp` in to `ServerApp` in Jupyter Server. This can be used by applications that subclassed `NotebookApp` to leverage the Python server backend of Jupyter Notebooks. Such extensions should *now* switch to `ExtensionApp` API in Jupyter Server and add `NotebookConfigShimMixin` in their inheritance list to properly handle moved traits.\n\nFor example, an application class that previously looked like:\n\n```python\nfrom notebook.notebookapp import NotebookApp\n\nclass MyApplication(NotebookApp):\n```\n\nshould switch to look something l
 ike:\n\n```python\nfrom jupyter_server.extension.application import ExtensionApp\nfrom notebook_shim.shim import NotebookConfigShimMixin\n\nclass MyApplication(NotebookConfigShimMixin, ExtensionApp):\n```',
-    author_email='Jupyter Development Team <jupyter@googlegroups.com>',
-    classifiers=[
-        'Framework :: Jupyter',
-        'Intended Audience :: Developers',
-        'Intended Audience :: Science/Research',
-        'Intended Audience :: System Administrators',
-        'License :: OSI Approved :: BSD License',
-        'Programming Language :: Python',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3 :: Only',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: 3.8',
-        'Programming Language :: Python :: 3.9',
-        'Programming Language :: Python :: 3.10',
-    ],
-    install_requires=[
-        'jupyter-server<3,>=1.8',
-    ],
-    extras_require={
-        'test': [
-            'pytest',
-            'pytest-console-scripts',
-            'pytest-tornasync',
-        ],
-    },
-    packages=[
-        'notebook_shim',
-        'notebook_shim.tests',
-        'notebook_shim.tests.confs',
-    ],
-)