Prepare test harness for Orca 50 rebase

This commit is contained in:
2026-04-11 01:59:13 -04:00
parent 3100228a17
commit ff9bea7749
5 changed files with 431 additions and 6 deletions
+10 -5
View File
@@ -6,15 +6,15 @@ project('cthulhu',
python = import('python')
i18n = import('i18n')
python_minimum_version = '3.9'
python_minimum_version = '3.10'
python3 = python.find_installation('python3', required: true)
if not python3.language_version().version_compare(f'>= @python_minimum_version@')
error(f'Python @python_minimum_version@ or newer is required.')
endif
# Hard dependencies (checked via pkg-config)
dependency('atspi-2', version: '>= 2.52.0')
dependency('atk-bridge-2.0', version: '>= 2.26.0')
dependency('atspi-2', version: '>= 2.56.0')
dependency('atk-bridge-2.0', version: '>= 2.56.0')
dependency('pygobject-3.0', version: '>= 3.18')
# Hard Python module dependencies
@@ -33,14 +33,19 @@ if not pluggy_result.found()
error('pluggy module is required')
endif
dasbus_result = python.find_installation('python3', modules:['dasbus'], required: false)
if not dasbus_result.found()
error('dasbus is required for D-Bus remote controller interface')
endif
# End users might not have the Gtk development libraries installed, making pkg-config fail.
# Therefore, check this dependency via python.
gtk_major_version = '3'
gtk_minor_version = '0'
gtk_minor_version = '24'
gtk_command = ' '.join([
'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk;',
'print(f"{Gtk.get_major_version()}.{Gtk.get_minor_version()}.{Gtk.get_micro_version()}");',
f'failed = Gtk.get_major_version() != @gtk_major_version@;',
f'failed = Gtk.get_major_version() != @gtk_major_version@ or Gtk.get_minor_version() < @gtk_minor_version@;',
'exit(failed)'
])
gtk_test = run_command(python3, '-c', gtk_command, check: false)