[python] fix get_library()
authorAnders Waldenborg <anders@0x63.nu>
Tue, 20 Nov 2012 22:27:55 +0000 (22:27 +0000)
committerAnders Waldenborg <anders@0x63.nu>
Tue, 20 Nov 2012 22:27:55 +0000 (22:27 +0000)
commit17cfe87c390265187d16a60ff4d7687802a07bba
tree119947cd72bc577c975916e18159a2550fc960e8
parent7d1b42a842754ac4db08b3bbf0087c7c8fb202fa
[python] fix get_library()

Before this fix, the LLVM Python bindings on SVN trunk always fail with:
Exception: LLVM shared library not found!
since it's still looking for a library named "LLVM-3.1svn".

Besides updating the LLVM version in the library name,
this patch also changes llvm.get_library() to make it possible to run
the unit tests without installing the LLVM shared library into a
default linker search path.

e.g. after this patch, running the llvm/python unit tests with:
LD_LIBRARY_PATH=../build/Debug+Asserts/lib nosetests -v bindings/python/llvm/tests/
would work on Linux.

Patch from Scott Tsai (with some minor modifications)

Patch also acked by Gregory Szorc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168390 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/python/llvm/common.py