pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/py-joblib
Module Name: pkgsrc
Committed By: bacon
Date: Wed Jan 10 14:38:25 UTC 2024
Modified Files:
pkgsrc/devel/py-joblib: Makefile distinfo
Added Files:
pkgsrc/devel/py-joblib/patches:
patch-joblib_externals_loky_backend_context.py
Log Message:
devel/py-joblib: Unbreak hardware core count
Patch in platform-specific cases for NetBSD and FreeBSD
Without this, the core count routine errors out
No other changes
Maintainer feedback timeout (12 days)
Issue was discussed on tech-pkg and upstream
https://github.com/joblib/joblib/issues/1535
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/devel/py-joblib/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/devel/py-joblib/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/py-joblib/patches/patch-joblib_externals_loky_backend_context.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/py-joblib/Makefile
diff -u pkgsrc/devel/py-joblib/Makefile:1.16 pkgsrc/devel/py-joblib/Makefile:1.17
--- pkgsrc/devel/py-joblib/Makefile:1.16 Fri Nov 3 10:35:53 2023
+++ pkgsrc/devel/py-joblib/Makefile Wed Jan 10 14:38:25 2024
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2023/11/03 10:35:53 adam Exp $
+# $NetBSD: Makefile,v 1.17 2024/01/10 14:38:25 bacon Exp $
DISTNAME= joblib-1.3.2
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=j/joblib/}
Index: pkgsrc/devel/py-joblib/distinfo
diff -u pkgsrc/devel/py-joblib/distinfo:1.17 pkgsrc/devel/py-joblib/distinfo:1.18
--- pkgsrc/devel/py-joblib/distinfo:1.17 Fri Nov 3 10:35:53 2023
+++ pkgsrc/devel/py-joblib/distinfo Wed Jan 10 14:38:25 2024
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.17 2023/11/03 10:35:53 adam Exp $
+$NetBSD: distinfo,v 1.18 2024/01/10 14:38:25 bacon Exp $
BLAKE2s (joblib-1.3.2.tar.gz) = 6f3ff669b1222cd1bb387d989b636936fc17a8b01c5ea27d98f6ee2405f8aae5
SHA512 (joblib-1.3.2.tar.gz) = 9b5acba1321351cf2ae548161ced18774b8b316aaf883cc8e77bf58898d1913361a3845d64f1f1f87e4e2394eafd92e0a6a8d67947db0c9a95a40e5f579baae6
Size (joblib-1.3.2.tar.gz) = 1987720 bytes
+SHA1 (patch-joblib_externals_loky_backend_context.py) = cc11198188de6701bdb5c6ce699eccb6e4eb01df
Added files:
Index: pkgsrc/devel/py-joblib/patches/patch-joblib_externals_loky_backend_context.py
diff -u /dev/null pkgsrc/devel/py-joblib/patches/patch-joblib_externals_loky_backend_context.py:1.1
--- /dev/null Wed Jan 10 14:38:25 2024
+++ pkgsrc/devel/py-joblib/patches/patch-joblib_externals_loky_backend_context.py Wed Jan 10 14:38:25 2024
@@ -0,0 +1,43 @@
+$NetBSD: patch-joblib_externals_loky_backend_context.py,v 1.1 2024/01/10 14:38:25 bacon Exp $
+
+# Add BSD support
+
+--- joblib/externals/loky/backend/context.py.orig 2023-06-29 15:14:21.000000000 +0000
++++ joblib/externals/loky/backend/context.py
+@@ -245,6 +245,9 @@ def _count_physical_cores():
+ return physical_cores_cache, exception
+
+ # Not cached yet, find it
++ # Using subprocesses is inefficient, but python has no portable
++ # sysctl interface at this time
++ # FIXME: Add OpenBSD, Dragonfly
+ try:
+ if sys.platform == "linux":
+ cpu_info = subprocess.run(
+@@ -274,6 +277,26 @@ def _count_physical_cores():
+ )
+ cpu_info = cpu_info.stdout
+ cpu_count_physical = int(cpu_info)
++ elif sys.platform.startswith('freebsd'):
++ cpu_info = subprocess.run(
++ "sysctl -n kern.smp.cores".split(),
++ capture_output=True,
++ text=True,
++ )
++ cpu_info = cpu_info.stdout
++ cpu_count_physical = int(cpu_info)
++ elif sys.platform.startswith('netbsd'):
++ # FIXME: hw.ncpu reports the number of hyperthreads.
++ # We prefer independent cores to prevent oversubscription.
++ # NetBSD does not currently expose physical core counts,
++ # but this is under discussion in PR kern/57816.
++ cpu_info = subprocess.run(
++ "sysctl -n hw.ncpu".split(),
++ capture_output=True,
++ text=True,
++ )
++ cpu_info = cpu_info.stdout
++ cpu_count_physical = int(cpu_info)
+ else:
+ raise NotImplementedError(f"unsupported platform: {sys.platform}")
+
Home |
Main Index |
Thread Index |
Old Index