Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
build: handle platforms without multiprocessing.synchronize
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Jul 31, 2014
1 parent e99b89f commit c11a598
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gyp_uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
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)
Expand Down Expand Up @@ -94,6 +101,11 @@ def run_gyp(args):
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)

0 comments on commit c11a598

Please sign in to comment.