From ef5ab276d27d4ecfe8fefc7c3426efe334f342a1 Mon Sep 17 00:00:00 2001 From: Thomas Dimson Date: Fri, 16 Oct 2020 14:50:45 -0400 Subject: [PATCH] Default build to cpu_count on linux --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6e13111..7bf05c3 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ import glob import io from multiprocessing.pool import ThreadPool +from multiprocessing import cpu_count import os from os.path import join from pathlib import Path @@ -23,7 +24,6 @@ from pkgconfig_utils import pkg_config_multi - # Package meta-data. NAME = "pclpy" DESCRIPTION = "Python bindings for the Point Cloud Library" @@ -376,7 +376,7 @@ def parallel_compile( ) cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - n_processes = 1 # number of parallel compilations + n_processes = cpu_count() # number of parallel compilations def _single_compile(obj): try: