glib/gio/gdbus-2.0/codegen/meson.build
Christoph Reiter 631c3534b7 meson: use the new 'python' module instead of the 'python3' one. Closes #1455
The new python module, added with 0.46, works with Python 2 and 3 and
allows to pass a path for the interpreter to use, if the need arises.

Previously the meson build set PYTHON, used in the shebang line of
the scripts installed by glib, to the full path of the interpreter.
The new meson module doesn't expose that atm, but we should set it to
a executable name anyway, and not a full path.
2018-07-19 12:32:29 +02:00

41 lines
1.4 KiB
Meson

gdbus_codegen_files = [
'__init__.py',
'codegen.py',
'codegen_main.py',
'codegen_docbook.py',
'dbustypes.py',
'parser.py',
'utils.py',
]
gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('PYTHON', python_name)
gdbus_codegen_conf.set('DATADIR', glib_datadir)
# Install gdbus-codegen executable
gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
output : 'gdbus-codegen',
install : true,
install_dir : get_option('bindir'),
configuration : gdbus_codegen_conf
)
codegen_dir = join_paths(get_option('datadir'), 'glib-2.0/codegen')
gdbus_codegen_built_files = []
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
output : 'config.py',
install : true,
install_dir : codegen_dir,
configuration : gdbus_codegen_conf)
foreach f : gdbus_codegen_files
# Copy these into the builddir so that gdbus-codegen can be used uninstalled
# and then install it too so that it can be used after installation
gdbus_codegen_built_files += configure_file(input : f, output : f,
install : true,
install_dir : codegen_dir,
copy : true)
endforeach