Skip to content

Commit 91e1705

Browse files
committed
tc
1 parent 74002b3 commit 91e1705

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

conf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def call_fn(func, args, kwargs, result_queue):
7171

7272
def call_in_subprocess(func):
7373
def wrapper(*args, **kwargs):
74-
multiprocessing.set_start_method("fork", force=True)
7574
result_queue = multiprocessing.Queue()
7675
p = multiprocessing.Process(
7776
target=call_fn,
@@ -86,9 +85,9 @@ def wrapper(*args, **kwargs):
8685
raise RuntimeError(f"Error in subprocess: {result}")
8786
return wrapper
8887

89-
# Windows does not support multiprocessing with fork, so we do not monkey patch
90-
# sphinx gallery to run in subprocesses.
91-
if os.getenv("TUTORIALS_ISOLATE_BUILD", "1") == "1" and not sys.platform.startswith("win"):
88+
# Windows does not support multiprocessing with fork and mac has issues with
89+
# fork so we do not monkey patch sphinx gallery to run in subprocesses.
90+
if os.getenv("TUTORIALS_ISOLATE_BUILD", "1") == "1" and not sys.platform.startswith("win") and not sys.platform == "darwin":
9291
sphinx_gallery.gen_rst.generate_file_rst = call_in_subprocess(sphinx_gallery.gen_rst.generate_file_rst)
9392

9493
try:

0 commit comments

Comments
 (0)