mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Build script should not fail on python without threading
This commit is contained in:
7
setup.py
7
setup.py
@@ -11,7 +11,6 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
from multiprocessing import cpu_count
|
|
||||||
|
|
||||||
base = os.path.dirname(os.path.abspath(__file__))
|
base = os.path.dirname(os.path.abspath(__file__))
|
||||||
build_dir = os.path.join(base, 'build')
|
build_dir = os.path.join(base, 'build')
|
||||||
@@ -270,7 +269,11 @@ def emphasis(text):
|
|||||||
|
|
||||||
|
|
||||||
def parallel_run(todo, desc='Compiling {} ...'):
|
def parallel_run(todo, desc='Compiling {} ...'):
|
||||||
num_workers = max(1, cpu_count())
|
try:
|
||||||
|
from multiprocessing import cpu_count
|
||||||
|
num_workers = max(1, cpu_count())
|
||||||
|
except Exception:
|
||||||
|
num_workers = 2
|
||||||
items = list(todo.items())
|
items = list(todo.items())
|
||||||
workers = {}
|
workers = {}
|
||||||
failed = None
|
failed = None
|
||||||
|
|||||||
Reference in New Issue
Block a user