pw_protobuf_compiler: Ensure nanopb_pb2.py is generated

Import the Nanopb Python package to ensure that nanopb_pb2.py is
generated prior generating any Nanopb protos. This prevents race
conditions in clean builds.

Change-Id: I4b07ceb5665c49d0bd73a35759af18ec275094ed
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/43741
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
diff --git a/pw_build/python.gni b/pw_build/python.gni
index 50d247f..a68da03 100644
--- a/pw_build/python.gni
+++ b/pw_build/python.gni
@@ -655,6 +655,7 @@
     _python_deps = invoker.python_deps
   } else {
     _python_deps = []
+    not_needed([ "invoker" ])  # Allow empty groups.
   }
 
   group(target_name) {