mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
meson: move mako lib check inside python check
This avoids picking a version of python that doesn't have mako installed. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40514>
This commit is contained in:
parent
d787eb6048
commit
9d6774ba8f
1 changed files with 13 additions and 10 deletions
23
meson.build
23
meson.build
|
|
@ -1045,16 +1045,9 @@ foreach p : python_exec_list
|
|||
continue
|
||||
endif
|
||||
|
||||
break
|
||||
endforeach
|
||||
|
||||
if not prog_python.found()
|
||||
error('Python ' + python_version_req + ' not found')
|
||||
endif
|
||||
|
||||
has_mako = run_command(
|
||||
prog_python, '-c',
|
||||
'''
|
||||
has_mako = run_command(
|
||||
prog_python, '-c',
|
||||
'''
|
||||
import sys
|
||||
|
||||
try:
|
||||
|
|
@ -1073,6 +1066,16 @@ except:
|
|||
if Version(mako.__version__) < Version("0.8.0"):
|
||||
sys.exit(1)
|
||||
''', check: false)
|
||||
if has_mako.returncode() != 0
|
||||
continue
|
||||
endif
|
||||
|
||||
break
|
||||
endforeach
|
||||
|
||||
if not prog_python.found()
|
||||
error('Python ' + python_version_req + ' not found')
|
||||
endif
|
||||
|
||||
if has_mako.returncode() == 1
|
||||
error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue