git: 33d02de1b7c6 - main - devel/py-jupyterlab-server: Convert to USE_PYTHON=pep517

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

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

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

    devel/py-jupyterlab-server: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 devel/py-jupyterlab-server/Makefile       |  9 ++---
 devel/py-jupyterlab-server/files/setup.py | 67 -------------------------------
 2 files changed, 4 insertions(+), 72 deletions(-)

diff --git a/devel/py-jupyterlab-server/Makefile b/devel/py-jupyterlab-server/Makefile
index e28b8d960926..285e072c322f 100644
--- a/devel/py-jupyterlab-server/Makefile
+++ b/devel/py-jupyterlab-server/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	jupyterlab-server
 PORTVERSION=	2.16.3
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI \
 		https://github.com/jupyterlab/jupyterlab_server/releases/download/v${PORTVERSION}/
@@ -13,6 +14,7 @@ WWW=		https://jupyter.org/
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=1.5:devel/py-hatchling@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Babel>=0:devel/py-babel@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0.3:devel/py-Jinja2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}json5>=0:devel/py-json5@${PY_FLAVOR} \
@@ -22,7 +24,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Babel>=0:devel/py-babel@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
@@ -35,10 +37,7 @@ OPENAPI_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}openapi-core>=0.14.2:devel/py-openap
 .include <bsd.port.pre.mk>
 
 .if ${PYTHON_REL} < 31000
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=4.8.1:devel/py-importlib-metadata@${PY_FLAVOR}
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=4.8.3:devel/py-importlib-metadata@${PY_FLAVOR}
 .endif
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.post.mk>
diff --git a/devel/py-jupyterlab-server/files/setup.py b/devel/py-jupyterlab-server/files/setup.py
deleted file mode 100644
index c6de97a47772..000000000000
--- a/devel/py-jupyterlab-server/files/setup.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-setup(
-    name='jupyterlab-server',
-    version='%%PORTVERSION%%',
-    description='A set of server components for JupyterLab and JupyterLab like applications.',
-    long_description='# jupyterlab server\n\n[![Coverage](https://codecov.io/gh/jupyterlab/jupyterlab_server/branch/master/graph/badge.svg)](https://codecov.io/gh/jupyterlab/jupyterlab_server)\n[![Build Status](https://github.com/jupyterlab/jupyterlab_server/workflows/Tests/badge.svg?branch=master)](https://github.com/jupyterlab/jupyterlab_server/actions?query=branch%3Amaster+workflow%3A%22Tests%22)\n[![Documentation Status](https://readthedocs.org/projects/jupyterlab_server/badge/?version=stable)](http://jupyterlab_server.readthedocs.io/en/stable/)\n\n## Motivation\n\nJupyterLab Server sits between JupyterLab and Jupyter Server, and provides a\nset of REST API handlers and utilities that are used by JupyterLab. It is a separate project in order to\naccommodate creating JupyterLab-like applications from a more limited scope.\n\n## Install\n\n`pip install jupyterlab_server`\n\nTo include optional `openapi` dependencies, use:\n\n`pip install jupyterlab_server[openapi]`\n\nTo include o
 ptional `pytest_plugin` dependencies, use:\n\n`pip install jupyterlab_server[test]`\n\n## Usage\n\nSee the full documentation for [API docs](https://jupyterlab-server.readthedocs.io/en/stable/api/index.html) and [REST endpoint descriptions](https://jupyterlab-server.readthedocs.io/en/stable/api/rest.html).\n\n## Extending the Application\n\nSubclass the `LabServerApp` and provide additional traits and handlers as appropriate for your application.\n\n## Contribution\n\nPlease see `CONTRIBUTING.md` for details.\n',
-    author_email='Jupyter Development Team <jupyter@googlegroups.com>',
-    classifiers=[
-        'Framework :: Jupyter',
-        'Framework :: Jupyter :: JupyterLab',
-        'Intended Audience :: Developers',
-        'Intended Audience :: Science/Research',
-        'Intended Audience :: System Administrators',
-        'License :: OSI Approved :: BSD License',
-        'Programming Language :: Python',
-        '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=[
-        'babel',
-        'importlib-metadata>=4.8.1; python_version < "3.10"',
-        'jinja2>=3.0.3',
-        'json5',
-        'jsonschema>=3.0.1',
-        'jupyter-server<3,>=1.8',
-        'packaging',
-        'requests',
-    ],
-    extras_require={
-        'docs': [
-             'autodoc-traits',
-             'docutils<0.19',
-             'pydata_sphinx_theme',
-             'sphinx',
-             'sphinx-copybutton',
-             'sphinxcontrib-openapi',
-             'myst-parser',
-             'mistune<1',
-             'jinja2<3.1.0'
-        ],
-        'openapi': [
-            'openapi-core>=0.14.2',
-            'ruamel-yaml',
-        ],
-        'test': [
-            'codecov',
-            'ipykernel',
-            'jupyter-server[test]',
-            'openapi_core~=0.14.2',
-            'openapi-spec-validator<0.5',
-            'pytest>=7.0',
-            'pytest-console-scripts',
-            'pytest-cov',
-            'requests_mock',
-            'ruamel-yaml',
-            'strict-rfc3339',
-        ],
-    },
-    packages=[
-        'jupyterlab_server',
-    ],
-)