From 877fe816a75030c5e82b1b1b72398033011afbec Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 13 Feb 2017 09:33:19 +0000 Subject: [PATCH] Allow using Python3 to run gen_dispatch.py This way, we don't have to depend on Python2 on newer OSes. --- configure.ac | 2 +- meson.build | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cc1fc50..34a109f 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,7 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -AC_CHECK_PROGS([PYTHON], [python2 python]) +AC_CHECK_PROGS([PYTHON], [python3 python2 python]) # Initialize libtool AC_DISABLE_STATIC diff --git a/meson.build b/meson.build index 70c417d..4137646 100644 --- a/meson.build +++ b/meson.build @@ -203,7 +203,10 @@ configure_file(input: 'epoxy.pc.in', install_dir: join_paths(epoxy_libdir, 'pkgconfig')) # Python -python = find_program('python', required: true) +python = find_program('python3', required: false) +if not python.found() + python = find_program('python', required: true) +endif # Generates the dispatch tables gen_dispatch_py = join_paths(meson.source_root(), 'src/gen_dispatch.py')