pw_env_setup: Add target packages to bootstrap
Change-Id: I002751e74535f759f5d3834795333e0ef7b3b6d0
Bug: 287
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/23900
Commit-Queue: Keir Mierle <keir@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
diff --git a/bootstrap.sh b/bootstrap.sh
index a7fdd5f..6f0c63b 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"
+ 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_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 6c81db0..fdbd072 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -48,7 +48,14 @@
def init_virtualenv(ctx: PresubmitContext):
- environment.init_virtualenv(ctx.root, ctx.output_dir)
+ environment.init_virtualenv(
+ ctx.root,
+ ctx.output_dir,
+ gn_targets=(
+ f'{ctx.root}#:python.install',
+ f'{ctx.root}#:target_support_packages.install',
+ ),
+ )
# Trigger builds if files with these extensions change.