My last refactor before merging !26354 was incorrect and broke the script when use for the first time (or after deleting the venv folder). Fixes: 69ec13b303 ("bin/python-venv: detect python version change") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26453>
69ec13b303
The venv only works for a specific python version; when updating python, the venv needs to be regenerated. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26354>
This isolates the script environment from the rest of the machine, avoiding missing/incompatible dependencies and avoiding polluting the rest of the machine with python packages. Signed-off-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24367>