1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

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
This commit is contained in:
Stefan Eßer 2022-01-02 21:43:00 +01:00
parent 5f0be63597
commit 507c189b28

View File

@ -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))