Where to install C extensions?

Paul Hughett hughett at mercur.uphs.upenn.edu
Fri Mar 24 16:05:41 EST 2000


Cesar Lopez <clopez at abo.fi> wrote:
: In Extending and Ebedding Python manual it is explained how to do that:
: http://www.python.org

: You do not need to put your extension in a special directory, but it is
: better if you put it in the modules installation directory.

Thanks.  But what is the usual name of the "modules installation
directory?"  Where would other people using my extension expect the
installation script to install the shared library?  On my machine, the
value of sys.path is

['', 
'/usr/lib/python1.5/', 
'/usr/lib/python1.5/test', 
'/usr/lib/python1.5/plat-linux-i386', 
'/usr/lib/python1.5/lib-tk', 
'/usr/lib/python1.5/lib-dynload']

I presume that I should put the extension in one of these but it is
not at all clear to me which one.  Or whether there should be another
directory for extensions not included in the standard Python
distribution.

Paul Hughett



More information about the Python-list mailing list