Explorar o código

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

Ashish Kulkarni %!s(int64=10) %!d(string=hai) anos
pai
achega
faab058b80
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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):