mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
1be6d6ccf5
This is required since Meson 0.61.0, and causes a warning to be
emitted otherwise:
2c079d855e
https://github.com/mesonbuild/meson/issues/9300
This exposed a bunch of places where we had broken run_command()
calls, unnecessary run_command() calls, and places where check: true
should be used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1507>
34 lines
1.5 KiB
Meson
34 lines
1.5 KiB
Meson
gst_python = subproject('gst-python', required: false)
|
|
gir = find_program('g-ir-scanner', required : get_option('introspection'))
|
|
if not gst_python.found() or not gir.found()
|
|
message('Not running python devenv tests: gst_python: @0@ gir: @1@'.format(gst_python.found(), gir.found()))
|
|
subdir_done()
|
|
endif
|
|
|
|
root_rel = '../..'
|
|
python = import('python').find_installation()
|
|
|
|
if run_command(python, '-c', 'import gi', check: false).returncode() != 0
|
|
message('PyGObject not found, not running PyGObject tests')
|
|
subdir_done()
|
|
endif
|
|
|
|
test('python-overrides-devenv', setenv, args: ['--builddir=@0@'.format(meson.project_build_root()),
|
|
'--gstbuilddir=@0@'.format(meson.current_build_dir() / '..' / '..'),
|
|
'--srcdir=@0@'.format(meson.project_source_root()),
|
|
meson.current_source_dir() / 'python-devenv-overrides.py'])
|
|
|
|
env = environment()
|
|
env.set('GI_TYPELIB_PATH', meson.current_build_dir() / root_rel)
|
|
if build_machine.system() == 'windows'
|
|
env.append('PATH', meson.current_build_dir() / root_rel)
|
|
elif build_machine.system() == 'linux'
|
|
env.append('LD_LIBRARY_PATH', meson.current_build_dir() / root_rel)
|
|
else
|
|
env.append('DYLD_LIBRARY_PATH', meson.current_build_dir() / root_rel)
|
|
endif
|
|
|
|
env.set('GST_OVERRIDE_SRC_PATH', meson.current_source_dir() / root_rel / 'subprojects/gst-python/gi/overrides')
|
|
env.set('GST_OVERRIDE_BUILD_PATH', meson.current_build_dir() / root_rel / 'subprojects/gst-python/gi/overrides')
|
|
|
|
test('python-full', python, args: [meson.current_source_dir() / 'python-full.py'], env: env)
|