git: 1bdcff4224c3 - main - devel/py-tdworkflow: Switch to PEP517 and fix packaging of tests/docs

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Fri, 17 Oct 2025 14:13:17 UTC
The branch main has been updated by ehaupt:

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

commit 1bdcff4224c3d8e3a3907ebbe6916e4330dea681
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2025-10-17 14:12:38 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2025-10-17 14:12:38 +0000

    devel/py-tdworkflow: Switch to PEP517 and fix packaging of tests/docs
    
    - Use PEP517 backend instead of legacy distutils.
    - Add py-wheel to BUILD_DEPENDS (required for PEP517 builds).
    - Patch pyproject.toml to limit setuptools package discovery to
      tdworkflow* only, excluding tests and docs directories.
      This prevents installation of non-private top-level directories
      (tests/, docs/) into ${PYTHONPREFIX_SITELIBDIR}, which previously
      caused file conflicts with other ports.
    - Lower setuptools minimum version to >=63, which matches the version
      currently available in FreeBSD ports.
    
    PR:             290278
    Reported by:    se
---
 devel/py-tdworkflow/Makefile                   |  7 ++++---
 devel/py-tdworkflow/files/patch-pyproject.toml | 21 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/devel/py-tdworkflow/Makefile b/devel/py-tdworkflow/Makefile
index 21bf15d409dd..ffb4cd427dca 100644
--- a/devel/py-tdworkflow/Makefile
+++ b/devel/py-tdworkflow/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	tdworkflow
 DISTVERSION=	0.9.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,12 +12,13 @@ WWW=		https://pypi.org/project/tdworkflow/
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mypy_extensions>=0:devel/py-mypy_extensions@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR}
 
 USES=		python
-USE_PYTHON=	autoplist distutils
+USE_PYTHON=	autoplist pep517
 
 NO_ARCH=	yes
 
diff --git a/devel/py-tdworkflow/files/patch-pyproject.toml b/devel/py-tdworkflow/files/patch-pyproject.toml
new file mode 100644
index 000000000000..5bf7c89cbb8d
--- /dev/null
+++ b/devel/py-tdworkflow/files/patch-pyproject.toml
@@ -0,0 +1,21 @@
+--- pyproject.toml.orig	2024-04-20 19:20:01 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools>=64", "setuptools_scm>=8"]
++requires = ["setuptools>=63", "setuptools_scm>=8"]
+ build-backend = "setuptools.build_meta"
+ 
+ [project]
+@@ -53,8 +53,9 @@ doc = [
+ "Bug Reports" = "https://github.com/chezou/tdworkflow/issues"
+ "Funding" = "https://github.com/sponsors/chezou"
+ 
+-[tool.setuptools.packages]
+-find = {}
++[tool.setuptools.packages.find]
++include = ["tdworkflow*"]
++exclude = ["tests*", "docs*"]
+ 
+ [tool.setuptools_scm]
+