ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pythonmac-sig
pythonmac-sig
Re: [Pythonmac-SIG] bundlebuilder --standalone not working
by Just van Rossum other posts by this author
Sep 3 2003 6:14PM messages near this date
Re: [Pythonmac-SIG] Python iCal Module? | Re: [Pythonmac-SIG] bundlebuilder --standalone not working
Bob Swerdlow wrote:

>  I added --package=encodings and application seems to be working well
>  now.
>  
>  That warning about XML seems inappropriate: DeprecationWarning: The
>  xmllib module is obsolete.  Use xml.sax instead. We ARE using xml.sax
>  and I don't see why xmllib is getting called at all - could this be
>  coming from some other package rather than our code?  Can I safely
>  ignore these warnings?

I'm not familiar enough with PyXML to be able to judge that.

>  The bundle is now 8MB, which is pretty large for downloading.  Is
>  there any way to reduce the size?

The --package directive includes *all* of that package, so you're now
pulling in all of PyXML and all of encodings, don't know which is
bigger. Experiment with that dummy import encodings.whatever-it-was to
see how much that helps. Regarding PyXML: the only way I can think of
right now is to remove the old xml and rename _xmlplus to xml, and don't
specify --package=_xmlplus. Hm, onother option would be to put a dummy
import _xmlplis.whatever-it-is-you're-really-importing-from-PyXML. Btw.
these dummy imports may occur in a function that never gets called.
Example from one of my own projects:

def _moduleFinderHint():
        """Dummy function to let modulefinder know what tables may be
        dynamically imported.
        """
        import B_A_S_E_
        import C_F_F_
        import D_S_I_G_
        import G_D_E_F_
        import G_P_O_S_
        ...etc.

Also: add a -v to the bundlebuilder options to see a list of what
modules actually get included. Sometimes it's easy to spot stuff that
you know is not going to get used, but is pulled in because of some
never triggered import somewhere. Use the --exclude option to exclude
specific modules.

Just

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@[...].org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved