Where is the Python Shared Library put on Linux?

I don't have a Linux box available so I can't check this directly; I'm hoping one of the Linux developers on this list can help me:
When you build LLDB, there's a Python component (runs SWIG, generates a C++ file and a .py file and finally gets compiled into
a Python shared library object). Where, on a Linux system, do the SWIG-generated .py file and the Python shared library
object get put? I.e. If I want to run Python, from Linux, and tell it where to look for the lldb Python module, where should I tell it
to look? Thanks in advance!

-- Caroline Tice

According to source/Interpreter/Makefile...

PYTHON_DEST_DIR := $(shell python -c 'import sys; print
sys.exec_prefix')/lib/python$(shell python -c 'import sys; print

Here it is in pure Python:

import sys

def python_dest_dir():
  return sys.exec_prefix+"/lib/python"+sys.version[:3]+"/site-packages";

On a typical Linux system, for example, this would return
"/usr/lib/python2.7/site-packages" (assuming the user had installed
Python 2.7 from the distro's packages).

The symlink to the shared library that lldb.py needs (_lldb.so) gets
installed to $(PYTHON_DEST_DIR)/lib-dynload.

I would know, because I wrote the Makefile logic that installs the
Python module.


I have been working on some modifications to this Makefile that will
cause the _lldb.so symlink to also be set up in the tool directory
at build time. This is as part of work to support running the test
suite using the Makefiles, by running "make test" from the tools/lldb
directory. I hope to get the patches out soon.