git: 833f296fe118 - main - devel/py-packaging:: Convert to USE_PYTHON=pep517

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 12 Feb 2023 18:46:28 UTC
The branch main has been updated by sunpoet:

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

commit 833f296fe118d5c20150c6b76648d9825e8c8b9f
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-02-12 18:36:51 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-02-12 18:41:46 +0000

    devel/py-packaging:: Convert to USE_PYTHON=pep517
    
    - Add build for all Python flavors/versions (USE_PYTHON=allflavors)
    - Bump PORTREVISION for dependency and package change
---
 devel/py-packaging/Makefile       |  9 +++++----
 devel/py-packaging/files/setup.py | 25 -------------------------
 2 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/devel/py-packaging/Makefile b/devel/py-packaging/Makefile
index 21bad43c1186..efeab557a1d9 100644
--- a/devel/py-packaging/Makefile
+++ b/devel/py-packaging/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	packaging
 PORTVERSION=	23.0
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -13,12 +14,12 @@ LICENSE_COMB=	dual
 LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.APACHE
 LICENSE_FILE_BSD2CLAUSE=${WRKSRC}/LICENSE.BSD
 
-USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USES=		python
+USE_PYTHON=	allflavors autoplist concurrent pep517
 
 NO_ARCH=	yes
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
+PEP517_BUILD_CMD=	${PYTHON_CMD} -m flit_core.wheel
+PEP517_BUILD_DEPEND=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.3:devel/py-flit-core@${PY_FLAVOR}
 
 .include <bsd.port.mk>
diff --git a/devel/py-packaging/files/setup.py b/devel/py-packaging/files/setup.py
deleted file mode 100644
index b88c05816f09..000000000000
--- a/devel/py-packaging/files/setup.py
+++ /dev/null
@@ -1,25 +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 = \
-['packaging']
-
-package_data = \
-{'': ['*']}
-
-package_dir = \
-{'': 'src'}
-
-setup(name='packaging',
-      version='%%PORTVERSION%%',
-      description='Core utilities for Python packages',
-      author=None,
-      author_email='Donald Stufft <donald@stufft.io>',
-      url=None,
-      packages=packages,
-      package_data=package_data,
-      package_dir=package_dir,
-      python_requires='>=3.7',
-     )