aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2022-01-02 20:43:00 +0000
committerStefan Eßer <se@FreeBSD.org>2022-01-02 20:43:00 +0000
commit507c189b2876043654568b15715b9d40b3bc87c3 (patch)
tree61cca5750fa1ccb4d2d1bb9d5eee9791075b239a
parent5f0be6359708f428c9b49be5c64f4e4818c8ee14 (diff)
downloadports-507c189b2876.tar.gz
ports-507c189b2876.zip
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
-rw-r--r--math/py-numpy/files/patch-numpy_distutils_misc__util.py16
1 files changed, 16 insertions, 0 deletions
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))