From 3c5ddbb1df4ee23593244094dece2cde2022cb16 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 17 Jul 2023 13:29:50 +0200 Subject: [PATCH] math/py-numpy: allow fallback in CPU count FreeBSD 13.2 causes an unhandled exception (OverflowError), but just make sure we always run the fallback and be done with it. --- .../files/patch-numpy_distutils_misc__util.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 math/py-numpy/files/patch-numpy_distutils_misc__util.py diff --git a/math/py-numpy/files/patch-numpy_distutils_misc__util.py b/math/py-numpy/files/patch-numpy_distutils_misc__util.py new file mode 100644 index 00000000000..e5385e6f5f0 --- /dev/null +++ b/math/py-numpy/files/patch-numpy_distutils_misc__util.py @@ -0,0 +1,11 @@ +--- numpy/distutils/misc_util.py.orig 2022-12-26 03:52:53 UTC ++++ numpy/distutils/misc_util.py +@@ -91,7 +91,7 @@ def get_num_build_jobs(): + from numpy.distutils.core import get_distribution + try: + cpu_count = len(os.sched_getaffinity(0)) +- except AttributeError: ++ except Exception: + cpu_count = multiprocessing.cpu_count() + cpu_count = min(cpu_count, 8) + envjobs = int(os.environ.get("NPY_NUM_BUILD_JOBS", cpu_count))