diff --git a/lldb/www/build.html b/lldb/www/build.html index e50092cf536a..177f8fdd3116 100755 --- a/lldb/www/build.html +++ b/lldb/www/build.html @@ -124,16 +124,16 @@
If you wish to build a release version of LLDB, run configure with the --enable-optimized flag.
LLDB has a Python scripting capability and supplies its own Python module, - lldb, built alongside the lldb binary. Python needs to know where to - look for this module when LLDB starts up. To tell Python the location of LLDB, set - PYTHONPATH environment variable. -
In bash with a Debug+Asserts build (the default if configure is invoked - like in the example on this page) one might run:
-> export PYTHONPATH=$llvm/build/Debug+Asserts/lib/python2.7/site-packages
- If you used a different build directory, made a release build, or have a different version of - Python, you may need to adjust the above to suit your needs. To test that the lldb Python module - is built correctly and is available to Python, run:
+LLDB has a Python scripting capability and supplies its own Python module named lldb. + If a script is run inside the command line lldb application, the Python module + is made available automatically. However, if a script is to be run by a Python interpreter + outside the command line application, the PYTHONPATH environment variable can be used + to let the Python interpreter find the lldb module. +
The correct path can be obtained by invoking the command line lldb tool with the -P flag:
+> export PYTHONPATH=`$llvm/build/Debug+Asserts/bin/lldb -P`
+ If you used a different build directory or made a release build, you may need to adjust the + above to suit your needs. To test that the lldb Python module + is built correctly and is available to the default Python interpreter, run:
> python -c 'import lldb'