Mesa (main): meson: Search for python3 before python for bin/meson_get_version.py

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 17 10:05:49 UTC 2021


Module: Mesa
Branch: main
Commit: 221871fb6da0a16bf47847040257bdb677042306
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=221871fb6da0a16bf47847040257bdb677042306

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Tue Aug 17 01:01:40 2021 -0700

meson: Search for python3 before python for bin/meson_get_version.py

Most systems have either dropped the python executable, or made it
python3.

But it is still possible to configure a system such that python runs
python2. https://www.python.org/dev/peps/pep-0394/

Or, some developers may still be running older distributions where
python is python2.

Since bin/meson_get_version.py now requires python3, we should search
for python3 before python.

Fixes: f1eae2f8bbe ("python: drop python2 support")
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12400>

---

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 7b87017b46f..08667a82acf 100644
--- a/meson.build
+++ b/meson.build
@@ -22,7 +22,7 @@ project(
   'mesa',
   ['c', 'cpp'],
   version : run_command(
-    [find_program('python', 'python3'), 'bin/meson_get_version.py']
+    [find_program('python3', 'python'), 'bin/meson_get_version.py']
   ).stdout(),
   license : 'MIT',
   meson_version : '>= 0.52',



More information about the mesa-commit mailing list