mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
meson: use new 'python' module instead of deprecated 'python3' one
https://github.com/mesonbuild/meson/pull/4169
This commit is contained in:
parent
f6ae425a1a
commit
bf12d56f14
2 changed files with 12 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
||||||
install_subdir('GstDebugViewer', install_dir: python3.sysconfig_path('purelib'),
|
py_purelib_path = python3.get_path('purelib')
|
||||||
|
install_subdir('GstDebugViewer', install_dir: py_purelib_path,
|
||||||
exclude_files: ['__init__.py'])
|
exclude_files: ['__init__.py'])
|
||||||
message('Installing in ' + python3.sysconfig_path('purelib'))
|
message('Installing in ' + py_purelib_path)
|
||||||
|
|
||||||
if find_program('msgfmt', required : get_option('nls')).found()
|
if find_program('msgfmt', required : get_option('nls')).found()
|
||||||
# Desktop launcher and description file.
|
# Desktop launcher and description file.
|
||||||
|
@ -43,7 +44,7 @@ configure_file(input: 'gst-debug-viewer',
|
||||||
configure_file(input: 'GstDebugViewer/__init__.py',
|
configure_file(input: 'GstDebugViewer/__init__.py',
|
||||||
output: '__init__.py',
|
output: '__init__.py',
|
||||||
configuration: cdata,
|
configuration: cdata,
|
||||||
install_dir: join_paths(python3.sysconfig_path('purelib'), 'GstDebugViewer'))
|
install_dir: join_paths(py_purelib_path, 'GstDebugViewer'))
|
||||||
|
|
||||||
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
|
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
|
||||||
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
||||||
|
@ -51,8 +52,8 @@ icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
||||||
subdir('data')
|
subdir('data')
|
||||||
|
|
||||||
|
|
||||||
if run_command(python3.find_python(),
|
if run_command(python3,
|
||||||
'-c', 'import gi; gi.require_version("Gtk", "3.0")').returncode() == 0
|
'-c', 'import gi; gi.require_version("Gtk", "3.0")').returncode() == 0
|
||||||
test('gst-debug-viewer', python3.find_python(), args: ['-m', 'unittest'],
|
test('gst-debug-viewer', python3, args: ['-m', 'unittest'],
|
||||||
workdir: meson.current_source_dir())
|
workdir: meson.current_source_dir())
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -140,7 +140,10 @@ if get_option('default_library') == 'shared'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
python3 = import('python3')
|
|
||||||
|
python_mod = import('python')
|
||||||
|
python3 = python_mod.find_installation()
|
||||||
|
|
||||||
if get_option('validate')
|
if get_option('validate')
|
||||||
subdir('validate')
|
subdir('validate')
|
||||||
endif
|
endif
|
||||||
|
@ -149,4 +152,4 @@ if get_option('debug_viewer')
|
||||||
subdir('debug-viewer')
|
subdir('debug-viewer')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
run_command(python3.find_python(), '-c', 'import shutil; shutil.copy("hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")')
|
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")')
|
||||||
|
|
Loading…
Reference in a new issue