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 jasonlowe
Recipients
Date 2004-01-16.00:10:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Python version: 2.3.3
OS: RedHat Linux 7.1

When freezing a script, I'd like to keep the resulting
executable size trimmed down as much as possible.  One
method to do this is to exclude the site module from
the module list (via -x site or -X site), as the site
module triggers the freeze script into including a LOT
of extra modules.

However if one freezes a program with -X site and then
subsequently runs it, the frozen program emits this
warning on startup:

'import site' failed; use -v for traceback

This warning occurs because the frozen program tries to
import site even though freeze.py was explicitly told
to exclude this module.  I'm wondering if "freeze.py -X
site" should generate a main() routine that sets
pythonrun.c's Py_NoSiteFlag before Py_Initialize() ends
up being called.  This would make the site module
exclusion carry over to the frozen program runtime.
History
Date User Action Args
2008-01-20 09:56:42adminlinkissue877904 messages
2008-01-20 09:56:42admincreate