math/py-numpy: revert obsolete commit 507c189b28

The sched_getaffinity() function in the C library returned a different
error code than expected (i.e. other than returned by GLIBC) if the
requested CPU set size did not match the one expected by the system.

The error code has been changed from ERANGE to EINVAL as expected by
the wrapper for os.sched_getaffinity() in Python, obsoleting the patch
that commented out the failing function call in setup.py.
This commit is contained in:
Stefan Eßer 2022-01-03 09:49:26 +01:00
parent e9456b7f9f
commit a2cfb3e058

View file

@ -1,16 +0,0 @@
--- 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))