git: 507c189b2876 - main - math/py-numpy: work around build issue on -CURRENT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jan 2022 20:50:43 UTC
The branch main has been updated by se:
URL: https://cgit.FreeBSD.org/ports/commit/?id=507c189b2876043654568b15715b9d40b3bc87c3
commit 507c189b2876043654568b15715b9d40b3bc87c3
Author: Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2022-01-02 20:43:00 +0000
Commit: Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-01-02 20:43:00 +0000
math/py-numpy: work around build issue on -CURRENT
A sched_getaffinity function has been added to -CURRENT and the
Python build detects it presence and provides a Python function
os.sched_getaffinity().
Apparently the C library function is not correctly wrapped and
returns an out of buounds result.
Comment out the call of os.sched_getaffinity() call until this
function works correctly in the Python interpreter.
No port revision bump, since this is just a temporary fix for the
broken build on -CURRENT.
Reported by: antoine
---
math/py-numpy/files/patch-numpy_distutils_misc__util.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
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 000000000000..36f46dc3ae15
--- /dev/null
+++ b/math/py-numpy/files/patch-numpy_distutils_misc__util.py
@@ -0,0 +1,16 @@
+--- numpy/distutils/misc_util.py.orig 2022-01-02 20:27:35 UTC
++++ numpy/distutils/misc_util.py
+@@ -92,9 +92,9 @@ def get_num_build_jobs():
+
+ """
+ from numpy.distutils.core import get_distribution
+- try:
+- cpu_count = len(os.sched_getaffinity(0))
+- except AttributeError:
+- cpu_count = multiprocessing.cpu_count()
++# try:
++# cpu_count = len(os.sched_getaffinity(0))
++# except AttributeError:
++ cpu_count = multiprocessing.cpu_count()
+ cpu_count = min(cpu_count, 8)
+ envjobs = int(os.environ.get("NPY_NUM_BUILD_JOBS", cpu_count))