Skip to content

Commit 69e3a93

Browse files
authored
Merge pull request #70 from thatch/thatch/parallel-build
Enable parallel builds by default.
2 parents 030e0b0 + 763b4fa commit 69e3a93

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/portable_python/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,12 @@ def run_configure(self, program, *args, prefix=None):
605605

606606
def run_make(self, *args, program="make", cpu_count=None):
607607
cmd = program.split()
608-
if cpu_count and cpu_count < 0:
608+
if cpu_count is None:
609609
available = multiprocessing.cpu_count()
610+
# If we can't retrieve the number of cores, leave cpu_count as None
611+
# and we'll omit -j below.
610612
if available and available > 0:
611-
cpu_count += available
613+
cpu_count = available
612614

613615
if cpu_count and cpu_count > 1:
614616
cmd.append("-j%s" % cpu_count)

0 commit comments

Comments
 (0)