浏览代码

attempt to use all CPUs on non-Windows systems in the build script

Ashish Kulkarni 10 年之前
父节点
当前提交
faab058b80
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      scripts/build.py

+ 3 - 2
scripts/build.py

@@ -568,8 +568,9 @@ if platform.system() == 'Windows':
         import winreg
     except ImportError:
         import _winreg as winreg
-
-CPU_COUNT = max(2, multiprocessing.cpu_count()-1)   # leave one CPU free
+    CPU_COUNT = max(2, multiprocessing.cpu_count()-1)   # leave one CPU free
+else:
+    CPU_COUNT = max(2, multiprocessing.cpu_count())
 
 def rchop(s, e):
     if s.endswith(e):