git: 7dabef98263b - main - textproc/py-sphinx-theme-builder: Convert to USE_PYTHON=pep517

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

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

commit 7dabef98263b4b2c70e7656cd23b2dab7db8ec52
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:48:49 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:21:23 +0000

    textproc/py-sphinx-theme-builder: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 textproc/py-sphinx-theme-builder/Makefile       |  7 ++---
 textproc/py-sphinx-theme-builder/files/setup.py | 40 -------------------------
 2 files changed, 3 insertions(+), 44 deletions(-)

diff --git a/textproc/py-sphinx-theme-builder/Makefile b/textproc/py-sphinx-theme-builder/Makefile
index e5f3931deae7..fdcfabca85d7 100644
--- a/textproc/py-sphinx-theme-builder/Makefile
+++ b/textproc/py-sphinx-theme-builder/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	sphinx-theme-builder
 PORTVERSION=	0.2.0b1
+PORTREVISION=	1
 CATEGORIES=	textproc python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,6 +12,7 @@ WWW=		https://github.com/pradyunsg/sphinx-theme-builder
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.2<4:devel/py-flit-core@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}nodeenv>=0:devel/py-nodeenv@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pyproject-metadata>=0:devel/py-pyproject-metadata@${PY_FLAVOR} \
@@ -18,7 +20,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}nodeenv>=0:devel/py-nodeenv@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}tomli>=0:textproc/py-tomli@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
@@ -30,7 +32,4 @@ CLI_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR} \
 			${PYTHON_PKGNAMEPREFIX}click>=0:devel/py-click@${PY_FLAVOR} \
 			${PYTHON_PKGNAMEPREFIX}sphinx-autobuild>=0:textproc/py-sphinx-autobuild@${PY_FLAVOR}
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.mk>
diff --git a/textproc/py-sphinx-theme-builder/files/setup.py b/textproc/py-sphinx-theme-builder/files/setup.py
deleted file mode 100644
index 43e248ce3129..000000000000
--- a/textproc/py-sphinx-theme-builder/files/setup.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-# setup.py generated by flit for tools that don't yet use PEP 517
-
-from distutils.core import setup
-
-packages = \
-['sphinx_theme_builder',
- 'sphinx_theme_builder._internal',
- 'sphinx_theme_builder._internal.cli']
-
-package_data = \
-{'': ['*']}
-
-package_dir = \
-{'': 'src'}
-
-install_requires = \
-['pyproject-metadata', 'packaging', 'rich', 'tomli', 'nodeenv', 'setuptools']
-
-extras_require = \
-{":python_version <= '3.7'": ['typing_extensions '],
- 'cli': ['build', 'click', 'sphinx-autobuild']}
-
-entry_points = \
-{'console_scripts': ['stb = sphinx_theme_builder._internal.cli:main']}
-
-setup(name='sphinx-theme-builder',
-      version='%%PORTVERSION%%',
-      description='A tool for authoring Sphinx themes with a simple (opinionated) workflow.',
-      author=None,
-      author_email='Pradyun Gedam <mail@pradyunsg.me>',
-      url=None,
-      packages=packages,
-      package_data=package_data,
-      package_dir=package_dir,
-      install_requires=install_requires,
-      extras_require=extras_require,
-      entry_points=entry_points,
-      python_requires='>=3.7',
-     )