meson: Add PYTHONPATH to load GDB helper module

Meson generates a gdbinit file that will automatically load gstreamer
script. However that script uses a helper python module that needs
PYTHONPATH to be pointing into the right location in the source
tree to be able to find gst_gdb.py.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1796>
This commit is contained in:
Xavier Claessens 2022-02-25 16:54:37 -05:00 committed by GStreamer Marge Bot
parent 2f6ad787b2
commit b225f4215b

View file

@ -128,6 +128,11 @@ install_data(['gst_gdb.py', 'glib_gobject_helper.py'],
install_dir : join_paths(get_option('datadir'), 'gstreamer-@0@'.format(apiversion), 'gdb'),
install_tag : 'devel')
# This is needed to make gdb find gst_gdb.py
env = environment()
env.prepend('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(env)
gdbconf = configuration_data()
gdbconf.set('GST_API_VERSION', apiversion)
gdbconf.set('DATADIR', '@0@/@1@'.format(get_option('prefix'), get_option('datadir')))