Merge branch 'meson-python-module' into 'master'

meson: use the new 'python' module instead of the 'python3' one

Closes #1455

See merge request GNOME/glib!187
This commit is contained in:
Nirbheek Chauhan 2018-07-23 11:17:47 +00:00
commit 4e1488eebb
4 changed files with 7 additions and 8 deletions

View File

@ -10,7 +10,7 @@ gdbus_codegen_files = [
gdbus_codegen_conf = configuration_data() gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version) gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('PYTHON', python.path()) gdbus_codegen_conf.set('PYTHON', python_name)
gdbus_codegen_conf.set('DATADIR', glib_datadir) gdbus_codegen_conf.set('DATADIR', glib_datadir)
# Install gdbus-codegen executable # Install gdbus-codegen executable

View File

@ -92,7 +92,7 @@ python_tools = [
python_tools_conf = configuration_data() python_tools_conf = configuration_data()
python_tools_conf.set('VERSION', glib_version) python_tools_conf.set('VERSION', glib_version)
python_tools_conf.set('PYTHON', python.path()) python_tools_conf.set('PYTHON', python_name)
foreach tool: python_tools foreach tool: python_tools
tool_bin = configure_file( tool_bin = configure_file(

View File

@ -1,6 +1,3 @@
py3_mod = import('python3')
py3 = py3_mod.find_python()
gobject_tests = [ gobject_tests = [
'qdata', 'qdata',
'boxed', 'boxed',
@ -82,8 +79,8 @@ test('signals', exe, env : test_env, suite : ['gobject'])
test( test(
'mkenums.py', 'mkenums.py',
py3, python,
args: files('mkenums.py'), args: files('mkenums.py'),
env: test_env, env: test_env,
suite: ['gobject'], suite: ['gobject'],
) )

View File

@ -1800,7 +1800,9 @@ elif meson.get_cross_property('have_strlcpy', false)
glib_conf.set('HAVE_STRLCPY', 1) glib_conf.set('HAVE_STRLCPY', 1)
endif endif
python = import('python3').find_python() python = import('python').find_installation('python3')
# used for '#!/usr/bin/env <name>'
python_name = 'python3'
# Determine which user environment-dependent files that we want to install # Determine which user environment-dependent files that we want to install
have_bash = find_program('bash', required : false).found() # For completion scripts have_bash = find_program('bash', required : false).found() # For completion scripts