Skip to content

Commit 7978be2

Browse files
authored
CM-31321 - Fix multiprocessing module in packaged CLI with Python 3.12 on macOS (#196)
1 parent 1468484 commit 7978be2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cycode/cli/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
from multiprocessing import freeze_support
2+
13
from cycode.cli.commands.main_cli import main_cli
24

35
if __name__ == '__main__':
6+
# DO NOT REMOVE OR MOVE THIS LINE
7+
# this is required to support multiprocessing in executables files packaged with PyInstaller
8+
# see https://pyinstaller.org/en/latest/common-issues-and-pitfalls.html#multi-processing
9+
freeze_support()
10+
411
main_cli()

0 commit comments

Comments
 (0)