Skip to content

Commit

Permalink
pw_env_setup: Add --additional-cipd-file argument
Browse files Browse the repository at this point in the history
Bug: b/292280529
Change-Id: I1fc9b1cc974c27a181b3151d74f193d211c6ffc0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/158170
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
Reviewed-by: Ted Pudlik <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed Jul 24, 2023
1 parent 97c6a10 commit 2ddb378
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pw_env_setup/py/pw_env_setup/env_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def __init__(
use_pinned_pip_packages,
cipd_only,
trust_cipd_hash,
additional_cipd_file,
):
self._env = environment.Environment()
self._project_root = project_root
Expand All @@ -205,6 +206,7 @@ def __init__(
self._strict = strict
self._cipd_only = cipd_only
self._trust_cipd_hash = trust_cipd_hash
self._additional_cipd_file = additional_cipd_file

if os.path.isfile(shell_file):
os.unlink(shell_file)
Expand Down Expand Up @@ -318,6 +320,10 @@ def _parse_config_file(self, config_file):
os.path.join(self._project_root, x)
for x in _assert_sequence(config.pop('cipd_package_files', ()))
)
self._cipd_package_file.extend(
os.path.join(self._project_root, x)
for x in self._additional_cipd_file or ()
)

for action in config.pop('project_actions', {}):
# We can add a 'phase' option in the future if we end up needing to
Expand Down Expand Up @@ -856,6 +862,15 @@ def parse(argv=None):
default=os.path.join(project_root, 'pigweed.json'),
)

parser.add_argument(
'--additional-cipd-file',
help=(
'Path to additional CIPD files, in addition to those referenced by '
'the --config-file file.'
),
action='append',
)

parser.add_argument(
'--virtualenv-gn-out-dir',
help=(
Expand Down

0 comments on commit 2ddb378

Please sign in to comment.