Allow using Python3 to run gen_dispatch.py

This way, we don't have to depend on Python2 on newer OSes.
macos/v1.5.9
Emmanuele Bassi 8 years ago
parent 89f9aa044f
commit 877fe816a7
  1. 2
      configure.ac
  2. 5
      meson.build

@ -41,7 +41,7 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8) XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS XORG_DEFAULT_OPTIONS
AC_CHECK_PROGS([PYTHON], [python2 python]) AC_CHECK_PROGS([PYTHON], [python3 python2 python])
# Initialize libtool # Initialize libtool
AC_DISABLE_STATIC AC_DISABLE_STATIC

@ -203,7 +203,10 @@ configure_file(input: 'epoxy.pc.in',
install_dir: join_paths(epoxy_libdir, 'pkgconfig')) install_dir: join_paths(epoxy_libdir, 'pkgconfig'))
# Python # 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 # Generates the dispatch tables
gen_dispatch_py = join_paths(meson.source_root(), 'src/gen_dispatch.py') gen_dispatch_py = join_paths(meson.source_root(), 'src/gen_dispatch.py')

Loading…
Cancel
Save