From 0b104bfe65e3d50c59c912906bdcf7dc0ebf9264 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Mon, 4 Oct 2021 14:33:48 +0200 Subject: [PATCH] always override the condarc channel list --- bob/devtools/build.py | 3 +-- bob/devtools/scripts/build.py | 3 +-- bob/devtools/scripts/create.py | 23 +++++++++++------------ bob/devtools/scripts/graph.py | 3 +-- bob/devtools/scripts/rebuild.py | 3 +-- bob/devtools/scripts/test.py | 23 +++++++++++------------ 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/bob/devtools/build.py b/bob/devtools/build.py index d5908c20..8e0fe08f 100644 --- a/bob/devtools/build.py +++ b/bob/devtools/build.py @@ -887,8 +887,7 @@ def cli( group=group, ) - if "channels" not in condarc_options: - condarc_options["channels"] = channels + ["conda-forge"] + condarc_options["channels"] = channels + ["conda-forge"] # populate ctx.obj ctx.obj["verbose"] = verbose diff --git a/bob/devtools/scripts/build.py b/bob/devtools/scripts/build.py index 2a8f5b5e..a086e40b 100644 --- a/bob/devtools/scripts/build.py +++ b/bob/devtools/scripts/build.py @@ -204,8 +204,7 @@ def build( add_dependent_channels=True, ) - if "channels" not in condarc_options: - condarc_options["channels"] = channels + condarc_options["channels"] = channels logger.info( "Using the following channels during (potential) build:\n - %s", diff --git a/bob/devtools/scripts/create.py b/bob/devtools/scripts/create.py index 52d2bfb7..834525db 100644 --- a/bob/devtools/scripts/create.py +++ b/bob/devtools/scripts/create.py @@ -238,18 +238,17 @@ def create( # use default condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) - if "channels" not in condarc_options: - from ..bootstrap import get_channels - - channels, _ = get_channels( - public=(not private), - stable=stable, - server=server, - intranet=private, - group=group, - add_dependent_channels=True, - ) - condarc_options["channels"] = channels + from ..bootstrap import get_channels + + channels, _ = get_channels( + public=(not private), + stable=stable, + server=server, + intranet=private, + group=group, + add_dependent_channels=True, + ) + condarc_options["channels"] = channels logger.info( "Using the following channels during environment creation:" "\n - %s", diff --git a/bob/devtools/scripts/graph.py b/bob/devtools/scripts/graph.py index c1f15b76..f3ccae7e 100644 --- a/bob/devtools/scripts/graph.py +++ b/bob/devtools/scripts/graph.py @@ -189,8 +189,7 @@ def graph( # use default condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) - if "channels" not in condarc_options: - condarc_options["channels"] = channels + condarc_options["channels"] = channels logger.info( "Using the following channels during graph operation:\n - %s", diff --git a/bob/devtools/scripts/rebuild.py b/bob/devtools/scripts/rebuild.py index 0521cfac..013a5025 100644 --- a/bob/devtools/scripts/rebuild.py +++ b/bob/devtools/scripts/rebuild.py @@ -197,8 +197,7 @@ def rebuild( # use default condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) - if "channels" not in condarc_options: - condarc_options["channels"] = channels + condarc_options["channels"] = channels logger.info( "Using the following channels during (potential) build:\n - %s", diff --git a/bob/devtools/scripts/test.py b/bob/devtools/scripts/test.py index 722f1a60..482ac7b0 100644 --- a/bob/devtools/scripts/test.py +++ b/bob/devtools/scripts/test.py @@ -168,18 +168,17 @@ def test( # use default condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) - if "channels" not in condarc_options: - from ..bootstrap import get_channels - - channels, _ = get_channels( - public=(not private), - stable=stable, - server=server, - intranet=ci, - group=group, - add_dependent_channels=True, - ) - condarc_options["channels"] = channels + from ..bootstrap import get_channels + + channels, _ = get_channels( + public=(not private), + stable=stable, + server=server, + intranet=ci, + group=group, + add_dependent_channels=True, + ) + condarc_options["channels"] = channels logger.info( "Using the following channels during (potential) build:\n - %s", -- GitLab