Skip to contentSkip to conversation

package/python-threadpoolctl: new host-only package

PATCH In review Guillaume W. Bres 2 participants 2 messages Feb 19, 2022 – Jul 27, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-threadpoolctl: new host-only package

Tool to limit the number of threads used in the threadpool-backed of common native libraries used for scientific computing (e.g. BLAS and OpenMP).

---
host-python-threadpoolctl is a requirement for python-scikitlearn, which first requires the current python-scipy work to be merged

---
 DEVELOPERS                                    |  1 +
 .../python-threadpoolctl.hash                 |  3 +++
 .../python-threadpoolctl.mk                   | 22 +++++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 package/python-threadpoolctl/python-threadpoolctl.hash
 create mode 100644 package/python-threadpoolctl/python-threadpoolctl.mk
DEVELOPERS +1 -0
index ac702d8d0f..53ebdbe760 100644
@@ -1149,6 +1149,7 @@ F:	package/libxcrypt/
 F:	package/liquid-dsp/
 F:	package/pixiewps/
 F:	package/python-pybind/
+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
package/python-threadpoolctl/python-threadpoolctl.hash new file +3 -0
new file mode 100644
index 0000000000..6b6fa72443
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  449b806f9147a3cf28ed7ec6389dbff9c450331d695873ab75dea79fe661f1e7  python-threadpoolctl-3.1.0.tar.gz
+sha256  81ac619075248b06e53660b652d10e485f4675f5d0ae0f97ea22370da1f7e23b  LICENSE
package/python-threadpoolctl/python-threadpoolctl.mk new file +22 -0
new file mode 100644
index 0000000000..fc1305ad86
@@ -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 $(@)/threadpoolctl.py to site-packages
+define PYTHON_THREADPOOLCTL_BUILD_CMDS
+endef
+
+define PYTHON_THREADPOOLCTL_INSTALL_CMDS
+	ln -sf $(@)/threadpoolctl.py \
+		$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/threadpoolctl.py
+endef
+
+$(eval $(host-generic-package))
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Guillaume,

Quoted 10 lines · On Sat, 19 Feb 2022 19:22:24 +0100 "Guillaume W. Bres"…

Tool to limit the number of threads used in the threadpool-backed of common native libraries used for scientific computing (e.g. BLAS and OpenMP).

---
host-python-threadpoolctl is a requirement for python-scikitlearn, which first requires the current python-scipy work to be merged

I have the same comment as for python-joblib: could you resend this patch as part of a patch series that includes python-scikitlearn. This is to avoid having orphan host packages in Buildroot, which are not used by anything, and therefore not buildable.

package/python-threadpoolctl/python-threadpoolctl.mk line 8

Quoted 2 lines
package/python-threadpoolctl/python-threadpoolctl.mk new file +2 -0
+PYTHON_THREADPOOLCTL_VERSION = 3.1.0
+PYTHON_THREADPOOLCTL_SITE = $(call github,joblib,threadpoolctl,$(PYTHON_THREADPOOLCTL_VERSION),$(PYTHON_THREADPOOLCTL_VERSION).tar.gz)

The github macro only takes 3 arguments, not 4.

package/python-threadpoolctl/python-threadpoolctl.mk line 13

Quoted 5 lines
package/python-threadpoolctl/python-threadpoolctl.mk new file +5 -0
+PYTHON_THREADPOOLCTL_LICENSE = BSD-3-Clause
+PYTHON_THREADPOOLCTL_LICENSE_FILES = LICENSE
+
+# threadpoolctl is originally built using 'flit' which
+# simply symlinks $(@)/threadpoolctl.py to site-packages

We now have flit support in Buildroot. Could you have a look if this help in making this package a bit better?

Thanks !

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot