mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
meson: Use python module to install override files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3929>
This commit is contained in:
parent
47c183cdfd
commit
da11e6610e
3 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
||||||
install_data(['gi/overrides/GES.py'], install_dir: pygi_override_dir)
|
|
||||||
|
|
||||||
env = environment()
|
env = environment()
|
||||||
env.prepend('_GI_OVERRIDES_PATH', meson.current_source_dir() / 'gi/overrides')
|
env.prepend('_GI_OVERRIDES_PATH', meson.current_source_dir() / 'gi/overrides')
|
||||||
meson.add_devenv(env)
|
meson.add_devenv(env)
|
||||||
|
|
||||||
|
python.install_sources(['gi/overrides/GES.py'],
|
||||||
|
pure : false,
|
||||||
|
subdir: 'gi/overrides',
|
||||||
|
)
|
||||||
|
|
|
@ -144,6 +144,8 @@ gir_init_section = [ '--add-init-section=' + \
|
||||||
'gst_init(NULL,NULL);' + \
|
'gst_init(NULL,NULL);' + \
|
||||||
'ges_init();', '--quiet']
|
'ges_init();', '--quiet']
|
||||||
|
|
||||||
|
pymod = import('python')
|
||||||
|
python = pymod.find_installation(required: get_option('python'))
|
||||||
has_python = false
|
has_python = false
|
||||||
static_build = get_option('default_library') == 'static'
|
static_build = get_option('default_library') == 'static'
|
||||||
if static_build
|
if static_build
|
||||||
|
@ -153,8 +155,6 @@ if static_build
|
||||||
message('Disabling python support as it is not supported on static builds')
|
message('Disabling python support as it is not supported on static builds')
|
||||||
endif
|
endif
|
||||||
elif build_gir
|
elif build_gir
|
||||||
pymod = import('python')
|
|
||||||
python = pymod.find_installation(required: get_option('python'))
|
|
||||||
if python.found()
|
if python.found()
|
||||||
# Workaround for https://github.com/mesonbuild/meson/issues/5629
|
# Workaround for https://github.com/mesonbuild/meson/issues/5629
|
||||||
pythonver = python.language_version()
|
pythonver = python.language_version()
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
pysources = ['Gst.py', 'GstPbutils.py', 'GstVideo.py', 'GstAudio.py']
|
pysources = ['Gst.py', 'GstPbutils.py', 'GstVideo.py', 'GstAudio.py']
|
||||||
install_data(pysources,
|
python.install_sources(pysources,
|
||||||
install_dir: pygi_override_dir,
|
pure : false,
|
||||||
install_tag: 'python-runtime')
|
subdir: 'gi/overrides',
|
||||||
|
)
|
||||||
|
|
||||||
gstpython = python.extension_module('_gi_gst',
|
gstpython = python.extension_module('_gi_gst',
|
||||||
sources: ['gstmodule.c'],
|
sources: ['gstmodule.c'],
|
||||||
|
|
Loading…
Reference in a new issue