diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index aa610f61..46db3cf5 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -155,7 +155,8 @@ num_cpu_cores() { num="$(sysctl -n hw.ncpu 2>/dev/null || true)" ;; * ) - num="$(grep ^processor /proc/cpuinfo 2>/dev/null | wc -l | xargs)" + num="$({ getconf _NPROCESSORS_ONLN || + grep -c ^processor /proc/cpuinfo; } 2>/dev/null)" num="${num#0}" ;; esac