From 763b4fa8ad47edf6dea4cb32f680401bef68c334 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Fri, 27 Feb 2026 10:07:14 -0800 Subject: [PATCH] Enable parallel builds by default. --- src/portable_python/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/portable_python/__init__.py b/src/portable_python/__init__.py index d81a491..a797d76 100644 --- a/src/portable_python/__init__.py +++ b/src/portable_python/__init__.py @@ -605,10 +605,12 @@ def run_configure(self, program, *args, prefix=None): def run_make(self, *args, program="make", cpu_count=None): cmd = program.split() - if cpu_count and cpu_count < 0: + if cpu_count is None: available = multiprocessing.cpu_count() + # If we can't retrieve the number of cores, leave cpu_count as None + # and we'll omit -j below. if available and available > 0: - cpu_count += available + cpu_count = available if cpu_count and cpu_count > 1: cmd.append("-j%s" % cpu_count)