statically linking the entire runtime (HPUX Python2.1)

Carsten Gaebler clpy at snakefarm.org
Fri Jun 15 04:03:52 EDT 2001


cmkl wrote:

> freeze.py is your friend! It lives in the source-code distribution
> directory: ./Tools/freeze

> Unfortunately python2.1 comes with 'setup.py', which will install
> alot of C-modules as shared library.

Yes, but you can override this. Uncomment all the modules in Modules/Setup
and put a "*static*" in front of them. Now you will still end up having
things like strop or regex compiled as shared libs. Have a look at how
they're configrued in setup.py and take that over to Modules/Setup. This
way I finally managed to build an interpreter that only depends on shared
versions of libdl, libm, libc and libutil.

I noticed that you can't build the curses module statically. The linker
then complains about duplicate definitions of 'tputs' in libncurses and
libtermcap. Is there a way to get around this?

cg.



More information about the Python-list mailing list