Python: Install Python packages in default build

- Have bootstrap install Python packages from the out/ directory.
- Include Python installation in the default build. This keeps the
  Python environment up-to-date as packages, included Python protobuf
  packages, are added or changed.
- Because presubmits run in separate GN directories, don't reinstall
  Python packages in presubmits. This causes random failures as packages
  are uninstalled and reinstalled during other steps.

Change-Id: Ide2ed281b4eb701f8770298fc6c861fac024514f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/29487
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 336f3f9..2a0a688 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -43,6 +43,7 @@
   deps = [
     ":docs",
     ":host",
+    ":python.install",
     ":python.lint",
     ":python.tests",
     ":stm32f429i",
diff --git a/bootstrap.sh b/bootstrap.sh
index 6f0c63b..e430bf5 100644
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -89,7 +89,7 @@
 if [ "$(basename "$_BOOTSTRAP_PATH")" = "bootstrap.sh" ] || \
   [ ! -f "$SETUP_SH" ] || \
   [ ! -s "$SETUP_SH" ]; then
-  pw_bootstrap --shell-file "$SETUP_SH" --install-dir "$_PW_ACTUAL_ENVIRONMENT_ROOT" --use-pigweed-defaults --json-file "$_PW_ACTUAL_ENVIRONMENT_ROOT/actions.json" --virtualenv-gn-target "$PW_ROOT#:target_support_packages.install"
+  pw_bootstrap --shell-file "$SETUP_SH" --install-dir "$_PW_ACTUAL_ENVIRONMENT_ROOT" --use-pigweed-defaults --json-file "$_PW_ACTUAL_ENVIRONMENT_ROOT/actions.json" --virtualenv-gn-out-dir "$PW_ROOT/out" --virtualenv-gn-target "$PW_ROOT#:target_support_packages.install"
   pw_finalize bootstrap "$SETUP_SH"
 else
   pw_activate
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index f069720..e6ec62a 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -134,7 +134,7 @@
 
 def gn_host_tools(ctx: PresubmitContext):
     build.gn_gen(ctx.root, ctx.output_dir, pw_build_HOST_TOOLS=True)
-    build.ninja(ctx.output_dir)
+    build.ninja(ctx.output_dir, 'host')
 
 
 @filter_paths(endswith=format_code.C_FORMAT.extensions)