Browse Source

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

Ashish Kulkarni 10 năm trước cách đây
mục cha
commit
faab058b80
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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):