]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc/meson: drop python2 support
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 14 Jan 2026 19:25:38 +0000 (20:25 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 5 Mar 2026 09:59:35 +0000 (10:59 +0100)
When we run into trouble, it produces confusing errors:
  https://gitlab.nic.cz/knot/knot-resolver/-/jobs/1627828
and I really hope that python2 won't be useful here anymore.

doc/meson.build

index 0ac8f8a10f249c57163b90d5ad23cca729c82dde..7a36787e285f3d3e2792b96b6f6baedfdd081e1c 100644 (file)
@@ -35,15 +35,10 @@ if get_option('doc') == 'enabled'
   endif
 
   # python dependencies: breathe, sphinx_rtd_theme
-  python_breathe = run_command('python3', '-c', 'import breathe', check: false)
+  python = find_program('python3')
+  python_breathe = run_command(python, '-c', 'import breathe', check: false)
   if python_breathe.returncode() != 0
-    python_breathe = run_command('python2', '-c', 'import breathe', check: false)
-    if python_breathe.returncode() != 0
-      error('missing doc dependency: python breathe')
-    endif
-    python = 'python2'
-  else
-    python = 'python3'
+    error('missing doc dependency: python breathe')
   endif
 
   python_sphinx_rtd_theme = run_command(python, '-c', 'import sphinx_rtd_theme', check: false)