[Distutils] Looking for portable what to determine directory where extensions are installed?

Toshio Kuratomi a.badger at gmail.com
Wed Nov 11 19:16:49 CET 2009


On Wed, Nov 11, 2009 at 09:46:25AM -0800, Tom Epperly wrote:
>
> I thought distutils.sysconfig.get_python_lib() might be helpful, but it
> returns "/usr/lib/python2.6/site-packages" even on the system where
> "/usr/lib64/python2.6/site-packages" is the right answer.
>
You're on the right track here.  You just need one more piece of
information:

distutils.sysconfig.get_python_lib() will return the path where pure python
extensions get installed.

distutils.sysconfig.get_python_lib(1) will return the path where compiled
extensions get installed.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20091111/e1ff7891/attachment.pgp>


More information about the Distutils-SIG mailing list