From fa14909e4d40f249095a2d34cb47e990573a5470 Mon Sep 17 00:00:00 2001 From: "Davis E. King" Date: Wed, 17 Jan 2018 16:51:09 -0500 Subject: [PATCH] Set build parallelism correctly for travis-ci --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index dceffc8e8..ddf97e7d3 100644 --- a/setup.py +++ b/setup.py @@ -152,6 +152,8 @@ class CMakeBuild(build_ext): subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=build_folder) def num_available_cpu_cores(ram_per_build_process_in_gb): + if os.environ.has_key('TRAVIS') and os.environ['TRAVIS']=='true': + return 2 # When building on travis-ci, just use 2 cores since travis-ci limits you to that regardless of what the hardware might suggest. try: mem_bytes = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES') mem_gib = mem_bytes/(1024.**3)