meson: Cleanup and avoid installing python bindings if python is not found

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3929>
This commit is contained in:
Thibault Saunier 2023-02-13 09:05:45 -03:00 committed by GStreamer Marge Bot
parent da11e6610e
commit 90d3106192
2 changed files with 7 additions and 6 deletions

View file

@ -112,7 +112,7 @@ libs_doc = [hotdoc.generate_doc('gst-editing-services',
)]
plugins_doc = []
list_plugin_res = run_command(python3, '-c',
list_plugin_res = run_command(python, '-c',
'''
import sys
import json

View file

@ -259,7 +259,6 @@ foreach extra_arg : warning_flags
endif
endforeach
python3 = import('python').find_installation()
pkgconfig = import('pkgconfig')
pkgconfig_subdirs = ['gstreamer-1.0']
@ -277,14 +276,16 @@ endif
subdir('docs')
pygi_override_dir = get_option('pygi-overrides-dir')
if pygi_override_dir == ''
pygi_override_dir = python3.get_install_dir(
if pygi_override_dir == '' and python.found()
pygi_override_dir = python.get_install_dir(
subdir : join_paths('gi', 'overrides')
)
endif
if python.found()
message('pygobject overrides directory = @0@'.format(pygi_override_dir))
subdir('bindings/python')
endif
# Set release date
if gst_version_nano == 0