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/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