Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Dec 2023 13:59:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 275997] devel/py-joblib: Add BSD support to CPU count check
Message-ID:  <bug-275997-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275997

            Bug ID: 275997
           Summary: devel/py-joblib: Add BSD support to CPU count check
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: skreuzer@FreeBSD.org
          Reporter: jwb@freebsd.org
             Flags: maintainer-feedback?(skreuzer@FreeBSD.org)
          Assignee: skreuzer@FreeBSD.org

---
/usr/ports/devel/py-joblib/files/patch-joblib_externals_loky_backend_contex=
t.py
    1969-12-31 18:00:00.000000000 -0600
+++
/usr/ports/wip/py-joblib/files/patch-joblib_externals_loky_backend_context.=
py=20=20
    2023-12-29 07:58:36.334877000 -0600
@@ -0,0 +1,18 @@
+--- joblib/externals/loky/backend/context.py.orig      2023-06-29 15:14:21=
 UTC
++++ joblib/externals/loky/backend/context.py
+@@ -274,6 +274,15 @@ def _count_physical_cores():
+             )
+             cpu_info =3D cpu_info.stdout
+             cpu_count_physical =3D int(cpu_info)
++        # Maybe also openbsd, dragonfly, etc?
++        elif sys.platform.startswith('freebsd') or
sys.platform.startswith('netbsd'):
++            cpu_info =3D subprocess.run(
++                "sysctl -n hw.ncpu".split(),
++                capture_output=3DTrue,
++                text=3DTrue,
++            )
++            cpu_info =3D cpu_info.stdout
++            cpu_count_physical =3D int(cpu_info)
+         else:
+             raise NotImplementedError(f"unsupported platform:
{sys.platform}")
+

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-275997-7788>