git: 9f2159a8bf2f - main - textproc/py-atoml: Convert to USE_PYTHON=pep517

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

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

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

    textproc/py-atoml: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 textproc/py-atoml/Makefile       |  8 +++----
 textproc/py-atoml/files/setup.py | 46 ----------------------------------------
 2 files changed, 4 insertions(+), 50 deletions(-)

diff --git a/textproc/py-atoml/Makefile b/textproc/py-atoml/Makefile
index 7c60dba53cf8..3e790367d9a5 100644
--- a/textproc/py-atoml/Makefile
+++ b/textproc/py-atoml/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	atoml
 PORTVERSION=	1.1.1
+PORTREVISION=	1
 CATEGORIES=	textproc python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,12 +12,11 @@ WWW=		https://github.com/frostming/atoml
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pdm-pep517>=0:devel/py-pdm-pep517@${PY_FLAVOR}
+
 USES=		python:3.6+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 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-atoml/files/setup.py b/textproc/py-atoml/files/setup.py
deleted file mode 100644
index b36d2ebf8e9f..000000000000
--- a/textproc/py-atoml/files/setup.py
+++ /dev/null
@@ -1,46 +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()
-
-setup_kwargs = {
-    'name': 'atoml',
-    'version': '%%PORTVERSION%%',
-    'description': 'Yet another style preserving TOML library',
-    'long_description': long_description,
-    'license': 'MIT',
-    'author': '',
-    'author_email': 'Frost Ming <mianghong@gmail.com>,Sébastien Eustace <sebastien@eustace.io>',
-    'maintainer': None,
-    'maintainer_email': None,
-    'url': '',
-    'packages': [
-        'atoml',
-    ],
-    'package_data': {'': ['*']},
-    'long_description_content_type': 'text/markdown',
-    'classifiers': [
-        'License :: OSI Approved :: MIT License',
-        'Operating System :: MacOS',
-        'Operating System :: Microsoft :: Windows',
-        'Operating System :: POSIX :: Linux',
-        'Programming Language :: Python :: 3 :: Only',
-        'Programming Language :: Python :: 3.6',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: 3.8',
-        'Programming Language :: Python :: 3.9',
-        'Programming Language :: Python :: 3.10',
-        'Programming Language :: Python :: Implementation :: CPython',
-        'Programming Language :: Python :: Implementation :: PyPy',
-        'Topic :: Software Development :: Libraries :: Python Modules',
-    ],
-    'python_requires': '>=3.6',
-
-}
-
-
-setup(**setup_kwargs)