diff --git a/setup.py b/setup.py index 8e45ede..cc1bdcf 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import multiprocessing import os import re @@ -13,7 +14,8 @@ extra["ext_modules"] = cythonize( [os.path.join(p, "*.py")], exclude=os.path.join(p, "__init__.py"), - nthreads=2, + # https://github.com/cython/cython/issues/3262 + nthreads=0 if multiprocessing.get_start_method() == "spawn" else 2, compiler_directives={"language_level": 3}, quiet=True, )