Q: Making Python use no shared extension modules?

Michael Kent mrmakent at cox.net
Thu Jun 10 16:12:24 CEST 2004

I need to deploy Python 'frozen' apps to machine without a Python
installation.  I want to be able to deploy just the app's executable,
without having to also ship/install any shared-library extensions for

To do this, I need to be able to build and install Python on my
development machines (AIX 4.3, HPUX, Unixware, Linux) such that Python
is one monolithic executable, without dependency on any shared
libraries (other than standard OS shared libraries).  In other words,
no shared libraries for Python extension modules, I need all extension
modules to be linked in via libpython*.a.

I've been fighting with this for some time.  There does not seem to be
a clean/simple way of doing this short of hacking the Modules/Setup*
files.  What is the accepted way of doing this?  Is there no configure
command-line option to do this that works on all platforms?  I'm aware
of '--disable-shared'; it seems to only partially/unreliably work.

More information about the Python-list mailing list