Python proper on Linux, `.a' vs `.so'

Francois Pinard pinard at iro.umontreal.ca
Wed Jun 4 21:11:30 EDT 2003


Hi to all Python lovers.

Today, I wanted to use some functionality already written as a Python into
a few C main programs.  The size of each generated executable is over 800K,
and I suspect that most of it comes from the fact it is linked with:

   /usr/lib/python2.2/config/libpython2.2.a

I wonder if there is any deep reason why this could not have been
installed as a `.so' library right from the Python installation itself.
Is there any counter-indication at having done so?  If yes, I'm a bit
curious about what these difficulties might be.  If not, is there any
simple stunt I could do for creating a usable `.so' library?

Since the original C programs executables are not so big, less than 100K
each (relying on installed shared libraries -- of course), I feel that
the idea of using Python modules from within C applications would "sell"
better if it was not blatantly bloating the size of executable files.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list