From 1e2369b6e25f69d84d503debf62ca08abd1f1c8d Mon Sep 17 00:00:00 2001 From: scoder Date: Mon, 21 Jun 2010 20:08:03 +0200 Subject: [svn r4424] r5612@lenny: sbehnel | 2010-06-21 20:07:58 +0200 prevent unrelated multiprocessing errors from breaking the build --HG-- branch : trunk --- buildlibxml.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'buildlibxml.py') diff --git a/buildlibxml.py b/buildlibxml.py index 65bf0b68..bfcf3e41 100644 --- a/buildlibxml.py +++ b/buildlibxml.py @@ -10,15 +10,14 @@ except ImportError: multi_make_options = [] try: - from multiprocessing import cpu_count -except ImportError: - pass -else: - cpus = cpu_count() + import multiprocessing + cpus = multiprocessing.cpu_count() if cpus > 1: if cpus > 5: cpus = 5 multi_make_options = ['-j%d' % (cpus+1)] +except: + pass # use pre-built libraries on Windows -- cgit v1.2.1