[mesa] python_exec.py -> python_exec.sh

Same functionality, less work.

Ran into this while playing with fxr/437319. I think the hop through
python_exec.py was messing with filesystem tracing somehow.
Anyway, I think this is strictly an improvement regardless of the
circumstances. :)

Change-Id: If5b67c0368f1b0b1c898dba1cecf45dbe2ea2584
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/437895
Reviewed-by: Craig Stout <cstout@google.com>
diff --git a/scripts/python_exec.py b/scripts/python_exec.py
deleted file mode 100755
index 5b0fb55..0000000
--- a/scripts/python_exec.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-# This script executes the second argument with PYTHONPATH set to the first argument.
-import subprocess
-import sys
-
-if __name__ == '__main__':
-    exec_string = "PYTHONPATH=" + sys.argv[1] + " python " + " ".join(sys.argv[2:])
-    child = subprocess.Popen(exec_string, shell=True, stdout=subprocess.PIPE)
-    exit(child.returncode)
\ No newline at end of file
diff --git a/scripts/python_exec.sh b/scripts/python_exec.sh
new file mode 100755
index 0000000..5b374d0
--- /dev/null
+++ b/scripts/python_exec.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+PYTHONPATH=$1 python ${@:2}
diff --git a/src/BUILD.gn b/src/BUILD.gn
index b28489a..693bf23 100644
--- a/src/BUILD.gn
+++ b/src/BUILD.gn
@@ -120,7 +120,7 @@
 
 action("sha1") {
   output_name = "git_sha1.h"
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   outputs = [
     "$target_gen_dir/$output_name",
diff --git a/src/compiler/nir/BUILD.gn b/src/compiler/nir/BUILD.gn
index b900919..c97e16d 100644
--- a/src/compiler/nir/BUILD.gn
+++ b/src/compiler/nir/BUILD.gn
@@ -276,7 +276,7 @@
 
 action("nir_intrinsics_h") {
   output_name = "nir_intrinsics.h"
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   outputs = [ "$target_gen_dir/$output_name" ]
 
@@ -295,7 +295,7 @@
 
 action("nir_intrinsics_c") {
   output_name = "nir_intrinsics.c"
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   outputs = [ "$target_gen_dir/$output_name" ]
 
diff --git a/src/intel/BUILD.gn b/src/intel/BUILD.gn
index 48ac4c9..9121673 100644
--- a/src/intel/BUILD.gn
+++ b/src/intel/BUILD.gn
@@ -230,7 +230,7 @@
 
 action("gen_format_layout") {
   output_name = "isl_format_layout.c"
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   outputs = [ "$target_gen_dir/$output_name" ]
 
diff --git a/src/intel/vulkan/BUILD.gn b/src/intel/vulkan/BUILD.gn
index d283d74..dd17dae 100644
--- a/src/intel/vulkan/BUILD.gn
+++ b/src/intel/vulkan/BUILD.gn
@@ -256,7 +256,7 @@
     "$target_gen_dir/anv_entrypoints.c",
   ]
 
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   inputs = [
     "anv_entrypoints_gen.py",
@@ -280,7 +280,7 @@
     "$target_gen_dir/anv_extensions.h",
   ]
 
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   inputs = [
     "anv_extensions_gen.py",
diff --git a/src/vulkan/util/BUILD.gn b/src/vulkan/util/BUILD.gn
index 6c80106..19b999b 100644
--- a/src/vulkan/util/BUILD.gn
+++ b/src/vulkan/util/BUILD.gn
@@ -50,7 +50,7 @@
     "$target_gen_dir/vk_enum_to_str.c",
   ]
 
-  script = "$mesa_build_root/scripts/python_exec.py"
+  script = "$mesa_build_root/scripts/python_exec.sh"
 
   inputs = [
     "$mesa_build_root/src/vulkan/registry/vk.xml",