Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/twisted/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ test(
test_list,
],
suite: 'twisted',
timeout: 2 * 60,
)

subdir('tools')