diff --git a/pw_env_setup/py/pw_env_setup/env_setup.py b/pw_env_setup/py/pw_env_setup/env_setup.py index bcbea51d05..cd65e9fca8 100755 --- a/pw_env_setup/py/pw_env_setup/env_setup.py +++ b/pw_env_setup/py/pw_env_setup/env_setup.py @@ -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 @@ -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) @@ -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 @@ -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=(