git: 6e5636cae481 - main - devel/py-threadpoolctl: Convert to USE_PYTHON=pep517

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 05 Apr 2023 17:37:29 UTC
The branch main has been updated by sunpoet:

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

commit 6e5636cae48154a6a34057e9156e837b253d9633
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-05 17:17:04 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-05 17:30:35 +0000

    devel/py-threadpoolctl: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for package change
---
 devel/py-threadpoolctl/Makefile       |  8 ++++----
 devel/py-threadpoolctl/files/setup.py | 14 --------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/devel/py-threadpoolctl/Makefile b/devel/py-threadpoolctl/Makefile
index 7fd5c79a8806..d03d0ef71947 100644
--- a/devel/py-threadpoolctl/Makefile
+++ b/devel/py-threadpoolctl/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	threadpoolctl
 PORTVERSION=	3.1.0
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,12 +12,11 @@ WWW=		https://github.com/joblib/threadpoolctl
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=0:devel/py-flit-core@${PY_FLAVOR}
+
 USES=		python:3.7+
-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/devel/py-threadpoolctl/files/setup.py b/devel/py-threadpoolctl/files/setup.py
deleted file mode 100644
index 783b58dee39b..000000000000
--- a/devel/py-threadpoolctl/files/setup.py
+++ /dev/null
@@ -1,14 +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
-
-setup(name='threadpoolctl',
-      version='%%PORTVERSION%%',
-      description='threadpoolctl',
-      author='Thomas Moreau',
-      author_email='thomas.moreau.2010@gmail.com',
-      url='https://github.com/joblib/threadpoolctl',
-      py_modules=['threadpoolctl'],
-      python_requires='>=3.6',
-     )