From 4d2752e84fa95c0127ffb1cd52be1f1b3967a442 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Mon, 10 Nov 2014 16:08:12 -0800 Subject: [PATCH] fixes how to check for CPU in android-build --- build/android-build.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build/android-build.py b/build/android-build.py index 3465d37d8c..0376e02b65 100755 --- a/build/android-build.py +++ b/build/android-build.py @@ -15,15 +15,8 @@ def get_num_of_cpu(): ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. ''' try: - platform = sys.platform - if platform == 'win32': - if 'NUMBER_OF_PROCESSORS' in os.environ: - return int(os.environ['NUMBER_OF_PROCESSORS']) - else: - return 1 - else: - from numpy.distutils import cpuinfo - return cpuinfo.cpu._getNCPUs() + import multiprocessing + return multiprocessing.cpu_count() except Exception: print "Can't know cpuinfo, use default 1 cpu" return 1