git: ca28e2c68790 - main - textproc/py-tinycss2: Convert to USE_PYTHON=pep517

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

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

commit ca28e2c68790b495463b71dbaffe245512c24817
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:48:54 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:21:24 +0000

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

diff --git a/textproc/py-tinycss2/Makefile b/textproc/py-tinycss2/Makefile
index 38b74cc3c5b1..b46ae6669768 100644
--- a/textproc/py-tinycss2/Makefile
+++ b/textproc/py-tinycss2/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	tinycss2
 PORTVERSION=	1.2.1
+PORTREVISION=	1
 CATEGORIES=	textproc python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,16 +12,14 @@ WWW=		https://github.com/Kozea/tinycss2
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.2<4:devel/py-flit-core@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}webencodings>=0.4:converters/py-webencodings@${PY_FLAVOR}
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flake8>=0:devel/py-flake8@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}isort>=0:devel/py-isort@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils pytest
+USE_PYTHON=	autoplist concurrent pep517 pytest
 
 NO_ARCH=	yes
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.mk>
diff --git a/textproc/py-tinycss2/files/setup.py b/textproc/py-tinycss2/files/setup.py
deleted file mode 100644
index bbba394b8d36..000000000000
--- a/textproc/py-tinycss2/files/setup.py
+++ /dev/null
@@ -1,32 +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 = \
-['tinycss2']
-
-package_data = \
-{'': ['*']}
-
-install_requires = \
-['webencodings >=0.4']
-
-extras_require = \
-{'doc': ['sphinx', 'sphinx_rtd_theme'],
- 'test': ['flake8',
-          'isort',
-          'pytest']}
-
-setup(name='tinycss2',
-      version='%%PORTVERSION%%',
-      description='A tiny CSS parser',
-      author=None,
-      author_email='Simon Sapin <simon.sapin@exyr.org>',
-      url=None,
-      packages=packages,
-      package_data=package_data,
-      install_requires=install_requires,
-      extras_require=extras_require,
-      python_requires='>=3.7',
-     )