git: 5d5e2ca2e7fc - main - devel/py-findpython: Convert to USE_PYTHON=pep517

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

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

commit 5d5e2ca2e7fc8289fb65a3dc0a73e335baaa19a5
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:42:52 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:20:37 +0000

    devel/py-findpython: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 devel/py-findpython/Makefile       |  8 +++----
 devel/py-findpython/files/setup.py | 48 --------------------------------------
 2 files changed, 3 insertions(+), 53 deletions(-)

diff --git a/devel/py-findpython/Makefile b/devel/py-findpython/Makefile
index 4703d3ab015a..e3b56e7680cd 100644
--- a/devel/py-findpython/Makefile
+++ b/devel/py-findpython/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	findpython
 PORTVERSION=	0.2.3
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,15 +12,12 @@ WWW=		https://github.com/frostming/findpython
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pdm-pep517>=0:devel/py-pdm-pep517@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}packaging>=20:devel/py-packaging@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
-post-patch:
-	@${RM} ${WRKSRC}/pyproject.toml
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.mk>
diff --git a/devel/py-findpython/files/setup.py b/devel/py-findpython/files/setup.py
deleted file mode 100644
index 9e144f11d119..000000000000
--- a/devel/py-findpython/files/setup.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-import codecs
-
-with codecs.open('README.md', encoding="utf-8") as fp:
-    long_description = fp.read()
-INSTALL_REQUIRES = [
-    'packaging>=20',
-]
-ENTRY_POINTS = {
-    'console_scripts': [
-        'findpython = findpython.__main__:main',
-    ],
-}
-
-setup_kwargs = {
-    'name': 'findpython',
-    'version': '%%PORTVERSION%%',
-    'description': 'A utility to find python versions on your system',
-    'long_description': long_description,
-    'license': 'MIT',
-    'author': '',
-    'author_email': 'Frost Ming <mianghong@gmail.com>',
-    'maintainer': None,
-    'maintainer_email': None,
-    'url': '',
-    'packages': [
-        'findpython',
-        'findpython.pep514tools',
-        'findpython.providers',
-    ],
-    'package_dir': {'': 'src'},
-    'package_data': {'': ['*']},
-    'long_description_content_type': 'text/markdown',
-    'classifiers': [
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: 3.8',
-        'Programming Language :: Python :: 3.9',
-        'Programming Language :: Python :: 3.10',
-    ],
-    'install_requires': INSTALL_REQUIRES,
-    'python_requires': '>=3.7',
-    'entry_points': ENTRY_POINTS,
-}
-
-setup(**setup_kwargs)