pw_build: Rename pw_python_script to pw_python_action

- Rename pw_python_script to pw_python_action, which more clearly
  describes the intent of the template (wrapper around action) and
  avoids confusion with the new pw_python_package template.
- Make pw_python_script as an alias for pw_python_action.
- Update the documentation and comments, and do some minor cleanup.
- Create python_script.gni file for backwards compatibility.

Change-Id: I98ab99021c57b1357c18ec23b50c59272c61c7b9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22001
Reviewed-by: Alexei Frolov <frolv@google.com>
diff --git a/pw_protobuf_compiler/proto.gni b/pw_protobuf_compiler/proto.gni
index c14d51b..01521d1 100644
--- a/pw_protobuf_compiler/proto.gni
+++ b/pw_protobuf_compiler/proto.gni
@@ -58,7 +58,7 @@
   }
 
   _gen_target = "${target_name}_gen"
-  pw_python_script(_gen_target) {
+  pw_python_action(_gen_target) {
     forward_variables_from(invoker, _forwarded_vars)
     script = _gen_script_path
     args = [
@@ -121,7 +121,7 @@
   # Create a target which runs protoc configured with the nanopb_rpc plugin to
   # generate the C++ proto RPC headers.
   _gen_target = "${target_name}_gen"
-  pw_python_script(_gen_target) {
+  pw_python_action(_gen_target) {
     forward_variables_from(invoker, _forwarded_vars)
     script = _gen_script_path
     args = [
@@ -202,7 +202,7 @@
   # Create a target which runs protoc configured with the nanopb plugin to
   # generate the C proto sources.
   _gen_target = "${target_name}_gen"
-  pw_python_script(_gen_target) {
+  pw_python_action(_gen_target) {
     forward_variables_from(invoker, _forwarded_vars)
     script = _gen_script_path
     args = [
@@ -264,7 +264,7 @@
   _proto_gen_dir = "$_proto_gopath/src"
   _rebased_gopath = rebase_path(_proto_gopath)
 
-  pw_python_script(target_name) {
+  pw_python_action(target_name) {
     forward_variables_from(invoker, _forwarded_vars)
     metadata = {
       gopath = [ "GOPATH+=$_rebased_gopath" ]
@@ -439,7 +439,7 @@
 
   # Create stub versions of the proto library for other protobuf generators.
   foreach(_gen, _protobuf_generators - _generators) {
-    pw_python_script("${target_name}_${_gen}") {
+    pw_python_action("${target_name}_${_gen}") {
       forward_variables_from(invoker, _forwarded_vars)
       script = string_join("/",
                            [
@@ -461,7 +461,7 @@
 
   # If the user attempts to use the target directly instead of one of the
   # generator targets, run a script which prints a nice error message.
-  pw_python_script(target_name) {
+  pw_python_action(target_name) {
     script = string_join("/",
                          [
                            dir_pw_protobuf_compiler,