Build Python bindings with distutils for consistent installs
[babeltrace.git] / tests / bin / intersection / bt_python_helper.py.in
index 11b4ab16afd556b315e050ae4f73334c4983311f..747f0e7b4ccdca31bc1a90c971d36ac264b37ca1 100644 (file)
 # SOFTWARE.
 
 import sys
+import ctypes
 
 # Point the Python interpreter to the builddir's library and Babeltrace
 # bindings
-bt_module_path = '@abs_top_builddir@/bindings/python/babeltrace'
-bt_lib_py_path = '@abs_top_builddir@/bindings/python/babeltrace/.libs'
-bt_lib_bt_path = '@abs_top_builddir@/lib/.libs'
-bt_lib_ctf_path = '@abs_top_builddir@/format/ctf/.libs'
+bt_module_path = '@abs_top_builddir@/bindings/python/build/build_lib/'
 
 sys.path.insert(0, bt_module_path)
-sys.path.insert(1, bt_lib_py_path)
-sys.path.insert(2, bt_lib_bt_path)
-sys.path.insert(3, bt_lib_ctf_path)
+
+# Manually load the shared libraries used by the Babeltrace module during the
+# tests
+bt_lib_ctf_path = '@abs_top_builddir@/formats/ctf/.libs/libbabeltrace-ctf.so'
+bt_lib_bt_path = '@abs_top_builddir@/lib/.libs/libbabeltrace.so'
+
+ctypes.cdll.LoadLibrary(bt_lib_ctf_path)
+ctypes.cdll.LoadLibrary(bt_lib_bt_path)
This page took 0.023035 seconds and 4 git commands to generate.