@@ -1195,6 +1195,7 @@ F: package/python-joblib/
F: package/python-pybind/
F: package/python-pythran/
F: package/python-scipy/
+F: package/python-threadpoolctl/
F: package/reaver/
F: support/testing/tests/package/br2-external/python-pybind
F: support/testing/tests/package/sample_python_pybind.py
@@ -1274,6 +1274,7 @@ menu "External python modules"
source "package/python-termcolor/Config.in"
source "package/python-terminaltables/Config.in"
source "package/python-texttable/Config.in"
+ source "package/python-threadpoolctl/Config.in"
source "package/python-thrift/Config.in"
source "package/python-tinycss2/Config.in"
source "package/python-tinyrpc/Config.in"
new file mode 100644
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_THREADPOOLCTL
+ bool "python-threadpoolctl"
+ depends on BR2_PACKAGE_PYTHON3
+ help
+ 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).
+
+ https://github.com/joblib/threadpoolctl
new file mode 100644
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 449b806f9147a3cf28ed7ec6389dbff9c450331d695873ab75dea79fe661f1e7 python-threadpoolctl-3.1.0.tar.gz
+sha256 81ac619075248b06e53660b652d10e485f4675f5d0ae0f97ea22370da1f7e23b LICENSE
new file mode 100644
@@ -0,0 +1,22 @@
+################################################################################
+#
+# python-threadpoolctl
+#
+################################################################################
+
+PYTHON_THREADPOOLCTL_VERSION = 3.1.0
+PYTHON_THREADPOOLCTL_SITE = $(call github,joblib,threadpoolctl,$(PYTHON_THREADPOOLCTL_VERSION),$(PYTHON_THREADPOOLCTL_VERSION).tar.gz)
+PYTHON_THREADPOOLCTL_LICENSE = BSD-3-Clause
+PYTHON_THREADPOOLCTL_LICENSE_FILES = LICENSE
+
+# threadpoolctl is originally built using 'flit' which
+# simply symlinks $(@D)/threadpoolctl.py to site-packages
+define PYTHON_THREADPOOLCTL_BUILD_CMDS
+endef
+
+define PYTHON_THREADPOOLCTL_INSTALL_TARGET_CMDS
+ cp $(@D)/threadpoolctl.py \
+ $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)
+endef
+
+$(eval $(generic-package))
package/python-scikitlearn needs python-threadpoolctl as a runtime dependency. Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com> --- python-threadpoolctl originally builds with "flit", whose build process merely consists in copying threadpoolctl.py to the /usr/lib python pool. As we have no knowledge of "flit", I simply used the buildroot infra to recreate this behavior. Let me know of any suggestion --- DEVELOPERS | 1 + package/Config.in | 1 + package/python-threadpoolctl/Config.in | 10 +++++++++ .../python-threadpoolctl.hash | 3 +++ .../python-threadpoolctl.mk | 22 +++++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 package/python-threadpoolctl/Config.in create mode 100644 package/python-threadpoolctl/python-threadpoolctl.hash create mode 100644 package/python-threadpoolctl/python-threadpoolctl.mk