From: Dylan Baker <dy...@pnwbakers.com>

---
 meson.build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 824e3c46bc5..178743eddb1 100644
--- a/meson.build
+++ b/meson.build
@@ -642,7 +642,13 @@ if with_platform_android
   pre_args += '-DHAVE_ANDROID_PLATFORM'
 endif
 
-prog_python2 = find_program('python2')
+# Basically we can't trust Linux because one distro had decided that python
+# should be python3. macOS doesn't have a python2 binary, however.
+if build_machine.system() != 'darwin'
+  prog_python2 = find_program('python2')
+else
+  prog_python2 = find_program('python')
+endif
 has_mako = run_command(prog_python2, '-c', 'import mako')
 if has_mako.returncode() != 0
   error('Python (2.x) mako module required to build mesa.')
-- 
2.15.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to