git: a8becea1602b - main - science/py-asdf-unit-schemas: Convert to USE_PYTHON=pep517

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

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

commit a8becea1602b9bfec5118c49a5e88e5b7a1550b8
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:47:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:21:16 +0000

    science/py-asdf-unit-schemas: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 science/py-asdf-unit-schemas/Makefile       |  9 +++---
 science/py-asdf-unit-schemas/files/setup.py | 48 -----------------------------
 2 files changed, 5 insertions(+), 52 deletions(-)

diff --git a/science/py-asdf-unit-schemas/Makefile b/science/py-asdf-unit-schemas/Makefile
index c1d3b141bb6b..d44fb278526a 100644
--- a/science/py-asdf-unit-schemas/Makefile
+++ b/science/py-asdf-unit-schemas/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	asdf-unit-schemas
 PORTVERSION=	0.1.0
+PORTREVISION=	1
 CATEGORIES=	science python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,10 +13,13 @@ WWW=		https://github.com/asdf-format/asdf-unit-schemas
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=42:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.4:devel/py-setuptools_scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}asdf-standard>=1.0.1:science/py-asdf-standard@${PY_FLAVOR}
 
 USES=		python:3.8+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
@@ -25,7 +29,4 @@ NO_ARCH=	yes
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-resources>=3:devel/py-importlib-resources@${PY_FLAVOR}
 .endif
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.post.mk>
diff --git a/science/py-asdf-unit-schemas/files/setup.py b/science/py-asdf-unit-schemas/files/setup.py
deleted file mode 100644
index 6a6a4fa69815..000000000000
--- a/science/py-asdf-unit-schemas/files/setup.py
+++ /dev/null
@@ -1,48 +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 = \
-['asdf_unit_schemas']
-
-package_data = \
-{'': ['*']}
-
-package_dir = \
-{'': 'src'}
-
-install_requires = \
-['asdf-standard >= 1.0.1']
-
-extras_require = \
-{':python_version<"3.9"': ['importlib_resources >= 3'],
- 'docs': ['tomli',
-          'sphinx',
-          'sphinx-asdf >= 0.1.3',
-          'sphinx-astropy',
-          'astropy >= 5.0.4',
-          'graphviz',
-          'matplotlib',
-          'docutils',
-          'sphinx-rtd-theme'],
- 'test': ['asdf >= 2.8.0', 'asdf-astropy', 'scipy', 'pytest']}
-
-entry_points = \
-{'asdf.resource_mappings': ['asdf_unit_schemas = '
-                            'asdf_unit_schemas.integration:get_resource_mappings']}
-
-setup(name='asdf_unit_schemas',
-      version='%%PORTVERSION%%',
-      description='ASDF schemas for units',
-      author=None,
-      author_email='The ASDF Developers <help@stsci.edu>',
-      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.8',
-     )