I broke the native macOS executables. The build for 22.8.0 failed since the executable failed the basic sanity checks pre-upload
Usage: black_macos [OPTIONS] SRC ...
Try 'black_macos -h' for help.
Error: No such option: --multiprocessing-fork
Usage: black_macos [OPTIONS] SRC ...
Try 'black_macos -h' for help.
Usage: black_macos [OPTIONS] SRC ...
Try 'black_macos -h' for help.
Error: No such option: --multiprocessing-fork
Error: No such option: --multiprocessing-fork
error: cannot format src/black/__main__.py: A process in the process pool was terminated abruptly while the future was running or pending.
error: cannot format src/black/files.py: A process in the process pool was terminated abruptly while the future was running or pending.
When I first submitted #3211 I checked how the stdlib guards the freeze_support() call and copied it:
So as far as I understand from reading the code, macOS should not need freeze_support() to work with PyInstaller, but apparently it does. Anyway let's fix this by including macOS in the OS check I guess.
|
def patched_main() -> None: |
|
if sys.platform == "win32" and getattr(sys, "frozen", False): |
|
from multiprocessing import freeze_support |
|
|
|
freeze_support() |
|
|
|
patch_click() |
|
main() |
I broke the native macOS executables. The build for 22.8.0 failed since the executable failed the basic sanity checks pre-upload
When I first submitted #3211 I checked how the stdlib guards the
freeze_support()call and copied it:So as far as I understand from reading the code, macOS should not need
freeze_support()to work with PyInstaller, but apparently it does. Anyway let's fix this by including macOS in the OS check I guess.black/src/black/__init__.py
Lines 1377 to 1384 in 2018e66