[ python-Bugs-1076492 ] BuildApplication includes many unneeded modules

SourceForge.net noreply at sourceforge.net
Mon Dec 27 17:29:03 CET 2004


Bugs item #1076492, was opened at 2004-12-01 05:35
Message generated for change (Comment added) made by jackjansen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1076492&group_id=5470

Category: Macintosh
Group: Platform-specific
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Neil Mayhew (neil_mayhew)
Assigned to: Jack Jansen (jackjansen)
Summary: BuildApplication includes many unneeded modules

Initial Comment:
I have a simple application to calculate MD5 sums for Macintosh 
files with resource forks. BuildApplication includes a whole raft of 
modules, such as httplib, that seem to be unrelated to my 
application. My imports are:

import sys, os
import md5
import EasyDialogs
import MacOS
import Carbon.File as macfs

Apologies if this is a known limitation, but I didn't see it mentioned 
anywhere.

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

>Comment By: Jack Jansen (jackjansen)
Date: 2004-12-27 17:29

Message:
Logged In: YES 
user_id=45365

BuildApplication includes all modules that could possibly be needed by 
recursively inspecting all modules for their imports.In your case I guess 
EasyDialogs or os somehow indirectly caused httplib to be included.

This process can be controlled (you can forcibly include or exclude 
modules) by adding :macfreeze: directives to your source code, but this 
is not documented, really.

Look in :Mac:Tools:macfreeze for the code that does it, you may be able 
to infer how it is done.

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

Comment By: Neil Mayhew (neil_mayhew)
Date: 2004-12-01 05:36

Message:
Logged In: YES 
user_id=709148

MacPython-OS9 2.3.3, on Mac OS 9.1

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

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


More information about the Python-bugs-list mailing list