From 507c189b2876043654568b15715b9d40b3bc87c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Sun, 2 Jan 2022 21:43:00 +0100 Subject: [PATCH] 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 --- .../files/patch-numpy_distutils_misc__util.py | 16 ++++++++++++++++ 1 file changed, 16 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 0000000000000..36f46dc3ae15e --- /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))