[Twisted-Python] delivering application

Bob Ippolito bob at redivi.com
Thu Oct 23 11:10:06 MDT 2003


On Oct 23, 2003, at 12:27 PM, Moshe Zadka wrote:

> On Thu, 23 Oct 2003, Yun Mao <maoy at cis.upenn.edu> wrote:
>
>> Another concern is that twisted is becoming larger and larger. I 
>> actually
>> only use very little of them (mainly in twisted.internet and
>> twisted.python). Is there an easy way to make a small package? Thanks!
>
> One easy thing to do is to base your distribution on the NoDocs 
> packages.
> Much of the size of Twisted is there. I'm not a big fan of "small
> distributions" since that requires more support for strange 
> configurations
> from the developers. Is <1MB of bzipped sources really that much? If
> you want something really deployable, you'll have to include Python
> anyway, and that would dwarf the size of Twisted.

Also, FYI, when deploying on Mac OS X using bundlebuilder.py (comes 
with Mac versions of Python 2.3), you have quite a few options:

       --semi-standalone		includes any used modules/extensions
       --standalone			includes Python and any used modules/extensions
       -x, --exclude=MODULE	exclude module (with --(semi-)standalone)
       -i, --include=MODULE		include module (with --(semi-)standalone)
       --package=PACKAGE		include a whole package (with 
--(semi-)standalone)
       --strip					strip binaries (remove debug info)

Any included modules are put in a zip file, using the zip import 
feature.. so the deployed size of a full Twisted installation would be 
pretty small, especially if you weren't using much of it.  
bundlebuilder attempts to detect all the modules that you are actually 
using, but it does this without executing code or importing modules so 
it's not perfect (hence the exclude and include options).  I haven't 
used py2exe or freeze before, but they may or may not have some of 
these features.  It's possible to create a self-contained, relocatable, 
easily deployable (no install process, just download + double click) OS 
X application bundle that works on any OS X 10.2+ installation (maybe 
even 10.1 if using --standalone) using this tool.

-bob





More information about the Twisted-Python mailing list