This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sgm
Recipients sgm
Date 2009-07-11.06:08:25
SpamBayes Score 5.099644e-05
Marked as misclassified No
Message-id <1247292508.31.0.803162103646.issue6461@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-07-11 06:08:28sgmsetrecipients: + sgm
2009-07-11 06:08:28sgmsetmessageid: <1247292508.31.0.803162103646.issue6461@psf.upfronthosting.co.za>
2009-07-11 06:08:26sgmlinkissue6461 messages
2009-07-11 06:08:25sgmcreate