mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 17:50:32 +01:00
Merge branch 'python-3.12' into 'main'
meson.build: require python 3.10, try python3.12 See merge request mesa/mesa!40305
This commit is contained in:
commit
1a60aacc6c
2 changed files with 18 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ you're willing to maintain support for other compiler get in touch.
|
|||
Third party/extra tools.
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- `Python <https://www.python.org/>`__ - Python 3.9 or newer is required.
|
||||
- `Python <https://www.python.org/>`__ - Python 3.10 or newer is required.
|
||||
- Python package ``packaging`` is required on Python 3.12+:
|
||||
``pip install packaging``
|
||||
- `Python Mako module <https://www.makotemplates.org/>`__ - Python Mako
|
||||
|
|
|
|||
19
meson.build
19
meson.build
|
|
@ -1032,8 +1032,23 @@ if get_option('allow-kcmp') \
|
|||
pre_args += '-DALLOW_KCMP'
|
||||
endif
|
||||
|
||||
# On Windows, a venv has no versioned aliased to 'python'.
|
||||
prog_python = find_program('python3', 'python', version : '>= 3.9')
|
||||
# Find a python executable that meets our version requirement.
|
||||
# - On Windows, a venv has no versioned aliased to 'python'.
|
||||
# - On RHEL 9, python3 is 3.9, so we must use python3.12.
|
||||
python_version_req = '>= 3.10'
|
||||
python_exec_list = ['python3.16', 'python3.15', 'python3.14', 'python3.13',
|
||||
'python3.12', 'python3.11', 'python3.10', 'python3', 'python']
|
||||
|
||||
foreach p : python_exec_list
|
||||
prog_python = find_program(p, required : false, version : python_version_req)
|
||||
if prog_python.found()
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if not prog_python.found()
|
||||
error('Python ' + python_version_req + ' not found')
|
||||
endif
|
||||
|
||||
has_mako = run_command(
|
||||
prog_python, '-c',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue