When you use py2exe, you can specifically exclude modules - in your setup.cfg file just add a line that says:
 
excludes=Tkinter, (etc.)
 
For forcing py2exe to import the format modules, just explicitly import them in your script, or once again, put an "includes" line in the seutp.cfg file for py2exe.
 
 
Kevin.
----- Original Message -----
Sent: Tuesday, August 16, 2005 4:49 PM
Subject: [Image-SIG] PIL and py2exe

the initialization of PIL does two things that are banging heads with py2exe:
 
    1) It always imported Tk "just in case".  Even if I'm not using Tk, Tk is imported.  This causes py2exe to load everything in Tk causing my install to get ridiculously huge.  Is there any way around this?
 
    2) The file format modules are imported on the sly using the __import__ function and constructing the module names at runtime (or at least at compile time.)  Because of this, py2exe doesn't recognize module dependencies and I get a distribution with no file plugins (and thus, the ability to read NOTHING.)
 
    My gut feeling is that the answer for 1 is what's being done in 2 and the answer to 2 is what's being done in 1.  Is there any around these things other than my hacking my own install of PIL?
 
Thanks,

Sean Curtis


_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to