[gn] add mesa_python_action

This replaces uses of python_exec.sh.
Improvements:
* Uses the in-tree python interpreter, which makes the build more
  hermetic and ensures all scripts use the same version of python.
* Call-sites are more compact.

Unrelated: added an input so that ninja notices when the files in
magma_python_path change. Ideally we'd have each action explicitly
declare all input files that it uses rather relying on PYTHONPATH, but
this should at least be conservative and correct, whereas previously
ninja would not notice if files were updated inside magma_python_path.

Fixed: 63513
Change-Id: I2c72eb16b9cb96dde8ae4fc48f47bfc529b66e95
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/446837
Reviewed-by: Craig Stout <cstout@google.com>
Reviewed-by: Shai Barack <shayba@google.com>
9 files changed