mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
Dont use multiprocessing to get CPU counts
This commit is contained in:
6
setup.py
6
setup.py
@@ -337,8 +337,7 @@ def dependecies_for(src, obj, all_headers):
|
|||||||
|
|
||||||
def parallel_run(todo, desc='Compiling {} ...'):
|
def parallel_run(todo, desc='Compiling {} ...'):
|
||||||
try:
|
try:
|
||||||
from multiprocessing import cpu_count
|
num_workers = max(2, os.cpu_count())
|
||||||
num_workers = max(1, cpu_count())
|
|
||||||
except Exception:
|
except Exception:
|
||||||
num_workers = 2
|
num_workers = 2
|
||||||
items = list(reversed(tuple(todo.items())))
|
items = list(reversed(tuple(todo.items())))
|
||||||
@@ -614,8 +613,7 @@ def compile_python(base_path):
|
|||||||
import compileall
|
import compileall
|
||||||
import py_compile
|
import py_compile
|
||||||
try:
|
try:
|
||||||
from multiprocessing import cpu_count
|
num_workers = max(1, os.cpu_count())
|
||||||
num_workers = max(1, cpu_count())
|
|
||||||
except Exception:
|
except Exception:
|
||||||
num_workers = 1
|
num_workers = 1
|
||||||
for root, dirs, files in os.walk(base_path):
|
for root, dirs, files in os.walk(base_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user