From 8f7ecfe48b8ac7b5185af7887a6fc95d15205fbd Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 10 Oct 2021 23:46:22 +0200 Subject: [PATCH] Support configure threads by environment variable --- bindings/python/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index df0c27c1..ef18fa7d 100755 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -133,7 +133,8 @@ def build_libraries(): subprocess.check_call(["cmake", '-B', BUILD_DIR, "-DCMAKE_BUILD_TYPE=" + conf]) os.chdir(BUILD_DIR) - subprocess.check_call(["make", "-j4"]) + threads = os.getenv("THREADS", "4") + subprocess.check_call(["make", "-j" + threads]) shutil.copy(LIBRARY_FILE, LIBS_DIR) try: