Files
MINGW-packages/mingw-w64-python-pillow/001-freeze-support.patch
2017-08-18 07:54:34 +03:00

23 lines
782 B
Diff

--- Pillow-4.2.1/mp_compile.py.orig 2017-08-18 16:27:09.000000000 +0100
+++ Pillow-4.2.1/mp_compile.py 2017-08-18 23:34:17.226557000 +0100
@@ -2,7 +2,7 @@
# Tested on 2.7, looks to be identical to 3.3.
from __future__ import print_function
-from multiprocessing import Pool, cpu_count
+from multiprocessing import Pool, cpu_count, freeze_support
from distutils.ccompiler import CCompiler
import os
import sys
@@ -38,7 +38,9 @@
output_dir, macros, include_dirs, sources, depends, extra_postargs)
cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
- pool = Pool(MAX_PROCS)
+ if __name__ == '__main__':
+ freeze_support()
+ pool = Pool(MAX_PROCS)
try:
print("Building using %d processes" % pool._processes)
except: