git: 14eebf548833 - main - textproc/py-wcmatch: Switch to USE_PYTHON= pep517 pytest

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Mon, 27 Mar 2023 13:23:12 UTC
The branch main has been updated by matthew:

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

commit 14eebf54883322bc854e15272036c45b519da694
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2023-03-27 13:19:36 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2023-03-27 13:23:03 +0000

    textproc/py-wcmatch: Switch to USE_PYTHON= pep517 pytest
    
    Use the system provided mechanisms for pep517 and pytest rather than
    rolling our own.
    
    Ignore widows specific tests.
    
    Only changes to the build system with no functional effect on the built
    package, so no version bump.
---
 textproc/py-wcmatch/Makefile  | 30 ++++++++++--------------------
 textproc/py-wcmatch/pkg-plist | 28 ----------------------------
 2 files changed, 10 insertions(+), 48 deletions(-)

diff --git a/textproc/py-wcmatch/Makefile b/textproc/py-wcmatch/Makefile
index ffbd228a78b7..a402234221a5 100644
--- a/textproc/py-wcmatch/Makefile
+++ b/textproc/py-wcmatch/Makefile
@@ -15,31 +15,21 @@ BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=0.21.1:devel/py-hatchling@${PY_
 		${PYTHON_PKGNAMEPREFIX}pip>=22.2:devel/py-pip@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}bracex>=2.1.1:textproc/py-bracex@${PY_FLAVOR}
 
-TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}coverage>0:devel/py-coverage@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	flavors
+USE_PYTHON=	flavors pep517 pytest
 
-
-# PYTHON_EXT_SUFFIX could be used here, except that it is
-# special-cased for python3.7 which we don't want.
-PYCACHE_SUFFIX=	.cpython-${PYTHON_SUFFIX}.pyc
-
-PLIST_SUB+=	PORTVERSION=${PORTVERSION} PYCACHE_SUFFIX=${PYCACHE_SUFFIX}
+# Windows specific tests
+PYTEST_IGNORED_TESTS=	test_escape_windows \
+			test_norm_windows \
+			test_escape_windows \
+			test_drive_insensitive \
+			test_drive_sensitive \
+			test_root_win \
+			test_glob_match_real_ignore_forceunix
 
 NO_ARCH=	yes
 
-do-build:
-	cd ${WRKSRC} && ${PYTHON_CMD} -m hatchling build -t wheel
-
-do-install:
-	${PYTHON_CMD} -m pip --no-cache-dir install --no-deps --ignore-installed \
-	  --disable-pip-version-check --target ${STAGEDIR}${PYTHON_SITELIBDIR} \
-	  ${WRKSRC}/dist/${PORTNAME}-${PORTVERSION}-py3-none-any.whl
-
-do-test:
-	@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
-
 .include <bsd.port.mk>
diff --git a/textproc/py-wcmatch/pkg-plist b/textproc/py-wcmatch/pkg-plist
deleted file mode 100644
index 751f7c1af749..000000000000
--- a/textproc/py-wcmatch/pkg-plist
+++ /dev/null
@@ -1,28 +0,0 @@
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/WHEEL
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/REQUESTED
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/RECORD
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/INSTALLER
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/direct_url.json
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/METADATA
-%%PYTHON_LIBDIR%%/site-packages/wcmatch-%%PORTVERSION%%.dist-info/licenses/LICENSE.md
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/fnmatch.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/_wcparse.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/posix.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/_wcparse%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/glob%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/fnmatch%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/_wcmatch%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/wcmatch%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/pathlib%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/__init__%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/__meta__%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/posix%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__pycache__/util%%PYCACHE_SUFFIX%%
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/glob.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__init__.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/__meta__.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/util.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/_wcmatch.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/py.typed
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/pathlib.py
-%%PYTHON_LIBDIR%%/site-packages/wcmatch/wcmatch.py