build: handle platforms without multiprocessing.synchronize
This commit is contained in:
parent
e99b89f2ad
commit
c11a598d7c
12
gyp_uv.py
12
gyp_uv.py
@ -6,6 +6,13 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
try:
|
||||
import multiprocessing.synchronize
|
||||
gyp_parallel_support = True
|
||||
except ImportError:
|
||||
gyp_parallel_support = False
|
||||
|
||||
|
||||
CC = os.environ.get('CC', 'cc')
|
||||
script_dir = os.path.dirname(__file__)
|
||||
uv_root = os.path.normpath(script_dir)
|
||||
@ -94,6 +101,11 @@ if __name__ == '__main__':
|
||||
if not any(a.startswith('-Dcomponent=') for a in args):
|
||||
args.append('-Dcomponent=static_library')
|
||||
|
||||
# Some platforms (OpenBSD for example) don't have multiprocessing.synchronize
|
||||
# so gyp must be run with --no-parallel
|
||||
if not gyp_parallel_support:
|
||||
args.append('--no-parallel')
|
||||
|
||||
gyp_args = list(args)
|
||||
print gyp_args
|
||||
run_gyp(gyp_args)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user