[Tutor] Explicitly define the lib path for python during build time

Tony Wang wangzheyu1989 at gmail.com
Thu Jun 26 11:23:30 CEST 2014


Hi there,

I'm building python2.7 from src code. Usually, after make, if I define
a user folder to install the python, the python will depends on the
lib folder in the installer folder.

But my needs is quite special here, I need to statically link python
with gdb, and I hope the python in gdb I build can run on other PC. I
know that I can do some tricky thing to include the python .py lib
file inside gdb folder, but I prefer to depends on user PC's native
python library.

So I need to add the /usr/lib/python2.7 or something like that to the
python lib search path. I know that I can ask user to do export
PYTHONHOME, but is there any way to explicitly define more than one
lib search path during build time?

BR,
Tony


More information about the Tutor mailing list