From 3615bc847b6d3ada0648ff0d4f870118d2ace27e Mon Sep 17 00:00:00 2001 From: ras44 <9282281+ras44@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:26:21 +0100 Subject: [PATCH] Dev/699 win build fix (#710) * resolves #699, win build error * lint with black --------- Co-authored-by: Roland Stevenson --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6fcfb629..03e05801 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import multiprocessing as mp +import os from setuptools import dist, setup, find_packages from setuptools.extension import Extension @@ -41,8 +42,12 @@ packages = find_packages(exclude=["tests", "tests.*"]) +nthreads = mp.cpu_count() +if os.name == "nt": + nthreads = 0 + setup( packages=packages, - ext_modules=cythonize(extensions, annotate=True, nthreads=mp.cpu_count()), + ext_modules=cythonize(extensions, annotate=True, nthreads=nthreads), include_dirs=[np_get_include()], )