[ python-Bugs-877904 ] freeze: problems excluding site

SourceForge.net noreply at sourceforge.net
Thu Jan 15 19:10:14 EST 2004


Bugs item #877904, was opened at 2004-01-15 18:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=877904&group_id=5470

Category: Demos and Tools
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason Lowe (jasonlowe)
Assigned to: Nobody/Anonymous (nobody)
Summary: freeze: problems excluding site

Initial Comment:
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.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=877904&group_id=5470



More information about the Python-bugs-list mailing list