Skip to content

Commit

Permalink
Fixed issue related to installation hangs on Windows with cython nthr…
Browse files Browse the repository at this point in the history
…eads>=1.
  • Loading branch information
akornatskyy committed Dec 30, 2020
1 parent 0e08453 commit ab60327
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python

import multiprocessing
import os
import re

Expand All @@ -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,
)
Expand Down

0 comments on commit ab60327

Please sign in to comment.