[Pythonmac-SIG] Slimmed down framework

Jack Jansen jack@oratrix.nl
Mon, 07 Jan 2002 10:43:29 +0100


Recently, Adam Eijdenberg <adam@switchedonsoftware.com> said:
> I'm working on an app that embeds Python 2.2 using the framework, built 
> from the Unix sources. I was about to copy the whole lot over  to 
> another machine when I realised that my app was 125 KB, and the 
> framework 62 MB!!!
> 
> At first I thought this may be due to a proliferation of headers and 
> other documentation, but inspection revealed that 58.3 MB is contained 
> within the lib folder, and then 38.3 MB of that is from the lib-dynload 
> folder.

By default everything is built with "-g", which gives debugging
symbolic information in all the output files (like plugin
modules). Turning this off should make quite a difference. You can
also check to see whether "strip" has an option to strip all
non-global symbols, and if so you can use that on all .so files to
make 'm smaller.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma Goldman -