Message90405
Freezing apps with multiprocessing on Windows seems to be broken.
First, in get_command_line in multiprocessing/forking.py I find that
this code:
if getattr(sys, 'frozen', False):
return [sys.executable, '--multiprocessing-fork']
else:
prog = 'from multiprocessing.forking import main; main()'
return [_python_exe, '-c', prog, '--multiprocessing-fork']
should be:
elif getattr(sys, 'frozen', False) and not WINEXE:
return [sys.executable, '--multiprocessing-fork']
else:
prog = 'from multiprocessing.forking import main; main()'
return [_python_exe, '-c', prog, '--multiprocessing-fork']
in order for the _python_exe set with multiprocessing.set_executable to
be used rather than your app's exe.
Second, I can then get a working "frozen" package if I include
pythonw.exe (and use set_executable to point to it) and a subset of
Python's Lib directory that my process needs to call. If this is as
intended then it needs to be documented. This may just be a flaw in py2exe.
Third, the multiprocessing documentation page description for
set_executable has example code with the older setExecutable call. |
|
Date |
User |
Action |
Args |
2009-07-11 06:08:28 | sgm | set | recipients:
+ sgm |
2009-07-11 06:08:28 | sgm | set | messageid: <1247292508.31.0.803162103646.issue6461@psf.upfronthosting.co.za> |
2009-07-11 06:08:26 | sgm | link | issue6461 messages |
2009-07-11 06:08:25 | sgm | create | |
|