git: de21c17f452c - main - devel/py-threadpoolctl: Add py-threadpoolctl 3.1.0
Date: Sun, 04 Sep 2022 03:52:18 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=de21c17f452c2ccd8b60f2a525b746490ac79814
commit de21c17f452c2ccd8b60f2a525b746490ac79814
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-09-04 03:41:31 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-09-04 03:42:23 +0000
devel/py-threadpoolctl: Add py-threadpoolctl 3.1.0
Thread-pool controls provides Python helpers to limit the number of threads used
in the threadpool-backed of common native libraries used for scientific
computing and data science (e.g. BLAS and OpenMP).
Fine control of the underlying thread-pool size can be useful in workloads that
involve nested parallelism so as to mitigate oversubscription issues.
WWW: https://github.com/joblib/threadpoolctl
---
devel/Makefile | 1 +
devel/py-threadpoolctl/Makefile | 21 +++++++++++++++++++++
devel/py-threadpoolctl/distinfo | 3 +++
devel/py-threadpoolctl/files/setup.py | 14 ++++++++++++++
devel/py-threadpoolctl/pkg-descr | 8 ++++++++
5 files changed, 47 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index f609da5ecadb..c6e26651088b 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5369,6 +5369,7 @@
SUBDIR += py-testscenarios
SUBDIR += py-testtools
SUBDIR += py-thefuzz
+ SUBDIR += py-threadpoolctl
SUBDIR += py-threema-msgapi
SUBDIR += py-thrift
SUBDIR += py-thriftpy2
diff --git a/devel/py-threadpoolctl/Makefile b/devel/py-threadpoolctl/Makefile
new file mode 100644
index 000000000000..92dc85c8652c
--- /dev/null
+++ b/devel/py-threadpoolctl/Makefile
@@ -0,0 +1,21 @@
+PORTNAME= threadpoolctl
+PORTVERSION= 3.1.0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Thread-pool controls
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= python:3.7+
+USE_PYTHON= autoplist concurrent distutils
+
+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/distinfo b/devel/py-threadpoolctl/distinfo
new file mode 100644
index 000000000000..efb47a5333f4
--- /dev/null
+++ b/devel/py-threadpoolctl/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1662212106
+SHA256 (threadpoolctl-3.1.0.tar.gz) = a335baacfaa4400ae1f0d8e3a58d6674d2f8828e3716bb2802c44955ad391380
+SIZE (threadpoolctl-3.1.0.tar.gz) = 33651
diff --git a/devel/py-threadpoolctl/files/setup.py b/devel/py-threadpoolctl/files/setup.py
new file mode 100644
index 000000000000..783b58dee39b
--- /dev/null
+++ b/devel/py-threadpoolctl/files/setup.py
@@ -0,0 +1,14 @@
+#!/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',
+ )
diff --git a/devel/py-threadpoolctl/pkg-descr b/devel/py-threadpoolctl/pkg-descr
new file mode 100644
index 000000000000..3bf395bd8e23
--- /dev/null
+++ b/devel/py-threadpoolctl/pkg-descr
@@ -0,0 +1,8 @@
+Thread-pool controls provides Python helpers to limit the number of threads used
+in the threadpool-backed of common native libraries used for scientific
+computing and data science (e.g. BLAS and OpenMP).
+
+Fine control of the underlying thread-pool size can be useful in workloads that
+involve nested parallelism so as to mitigate oversubscription issues.
+
+WWW: https://github.com/joblib/threadpoolctl