diff --git a/meson.build b/meson.build index b2b1b68..c342442 100644 --- a/meson.build +++ b/meson.build @@ -14,11 +14,12 @@ project( default_options: [ 'c_std=c99', ], - meson_version: '>= 0.50.0', + meson_version: '>= 0.51.0', ) package_string = '@0@-@1@'.format(meson.project_name(), meson.project_version()) +py_mod = import('python') cc = meson.get_compiler('c') glib = dependency('glib-2.0', version: '>= 2.32.0') @@ -38,15 +39,20 @@ idle_deps = [ ] xsltproc = find_program('xsltproc') -python = import('python').find_installation('python3') +# For generating GInterface +python = py_mod.find_installation('python3') # check for a version of python that can run the twisted tests if get_option('twisted_tests') - if run_command(python, '-c', '''from sys import version_info; import dbus, dbus.mainloop.glib; raise SystemExit(version_info < (2, 5, 0, 'final', 0))''').returncode() != 0 or run_command(python, '-c', '''import twisted.words.protocols.irc, twisted.internet.reactor''').returncode() != 0 - error('Missing twisted IRC support') - endif - - test_python = python.path() + test_python = py_mod.find_installation( + 'python3', + modules: [ + 'dbus', + 'dbus.mainloop.glib', + 'twisted.words.protocols.irc', + 'twisted.internet.reactor', + ], + ).path() endif # Directories diff --git a/tests/twisted/meson.build b/tests/twisted/meson.build index 8fcf290..21493f1 100644 --- a/tests/twisted/meson.build +++ b/tests/twisted/meson.build @@ -87,6 +87,7 @@ test( test_list, ], suite: 'twisted', + timeout: 2 * 60, ) subdir('tools')