diff options
Diffstat (limited to 'delivery_merge/conda.py')
-rw-r--r-- | delivery_merge/conda.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/delivery_merge/conda.py b/delivery_merge/conda.py index 44e15de..09c19a2 100644 --- a/delivery_merge/conda.py +++ b/delivery_merge/conda.py @@ -120,3 +120,16 @@ def conda(*args): :returns: subprocess.CompletedProcess object """ return sh('conda', *args) + + +def conda_cmd_channels(conda_channels, override=True): + """ Generate conda command arguments for handling channels + :param conda_channels: list: URI to channel + :param override: bool: channel order is preserved when True + """ + assert isinstance(conda_channels, list) + channels_result = '--override-channels ' if override else '' + for channel in conda_channels: + channels_result += f'-c {channel} ' + + return channels_result |