diff --git a/bob/devtools/bootstrap.py b/bob/devtools/bootstrap.py index 837bb485ea094c311c9f7d2db7ee35208cce8c64..294674075ef08a80194b9687677246bc7c679278 100644 --- a/bob/devtools/bootstrap.py +++ b/bob/devtools/bootstrap.py @@ -282,7 +282,7 @@ def install_miniconda(prefix, name): shutil.rmtree(cached) -def get_channels(public, stable, server, intranet, group): +def get_channels(public, stable, server, intranet, group, add_dependent_channels=False): """Returns the relevant conda channels to consider if building project. The subset of channels to be returned depends on the visibility and @@ -310,6 +310,8 @@ def get_channels(public, stable, server, intranet, group): compiling is part of. Values should match URL namespaces currently available on our internal webserver. Currently, only "bob" or "beat" will work. + add_dependent_channels: If True, will add the defaults and conda-forge + channels to the list Returns: a list of channels that need to be considered. @@ -347,6 +349,9 @@ def get_channels(public, stable, server, intranet, group): ) ] + if add_dependent_channels: + channels += ["defaults", "conda-forge"] + return channels, upload_channel @@ -516,9 +521,13 @@ if __name__ == "__main__": conda_bld_path = os.path.join(args.conda_root, "conda-bld") run_cmdline([conda_bin, "index", conda_bld_path]) channels, _ = get_channels( - public=True, stable=True, server=_SERVER, intranet=True, group="bob" + public=True, + stable=True, + server=_SERVER, + intranet=True, + group="bob", + add_dependent_channels=True, ) - channels += ["defaults"] channels = ( ["--override-channels"] + ["--channel=" + conda_bld_path] @@ -541,9 +550,9 @@ if __name__ == "__main__": server=_SERVER, intranet=True, group="bob", + add_dependent_channels=True, ) - channels += ["defaults"] channels = ["--override-channels"] + ["--channel=%s" % k for k in channels] conda_cmd = "install" if args.envname in ("base", "root") else "create" cmd = ( diff --git a/bob/devtools/build.py b/bob/devtools/build.py index 5b8f99582b8c578181f21495331e8b61130ac420..0e7178c24380a0fee689b7b0666fe51d06c94c3b 100644 --- a/bob/devtools/build.py +++ b/bob/devtools/build.py @@ -602,11 +602,16 @@ def base_build( # if you get to this point, tries to build the package channels, upload_channel = bootstrap.get_channels( - public=True, stable=True, server=server, intranet=intranet, group=group + public=True, + stable=True, + server=server, + intranet=intranet, + group=group, + add_dependent_channels=True, ) if "channels" not in condarc_options: - condarc_options["channels"] = channels + ["defaults"] + condarc_options["channels"] = channels logger.info( "Using the following channels during (potential) build:\n - %s", diff --git a/bob/devtools/scripts/build.py b/bob/devtools/scripts/build.py index e7e557547bb424ac24943f236d03e82fa468c88b..99b859c1893d8d82ec78ec047c312f61a21f562c 100644 --- a/bob/devtools/scripts/build.py +++ b/bob/devtools/scripts/build.py @@ -198,10 +198,11 @@ def build( server=server, intranet=ci, group=group, + add_dependent_channels=True, ) if "channels" not in condarc_options: - condarc_options["channels"] = channels + ["defaults"] + 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 30e87a88bcd8d7b697c47e6a5d2d8eba515c670b..426c1bf0eb184753cdf7ef9e2ac26c6c8c95eea3 100644 --- a/bob/devtools/scripts/create.py +++ b/bob/devtools/scripts/create.py @@ -256,8 +256,9 @@ def create( server=server, intranet=private, group=group, + add_dependent_channels=True, ) - condarc_options["channels"] = channels + ["defaults"] + 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 9c18d1a86499dd05ce8817722d8bbd674d545147..685ccec7e93868e4beb6676afd118a5c0a73b380 100644 --- a/bob/devtools/scripts/graph.py +++ b/bob/devtools/scripts/graph.py @@ -178,6 +178,7 @@ def graph( server=server, intranet=ci, group=package_group, + add_dependent_channels=True, ) if condarc is not None: @@ -189,7 +190,7 @@ def graph( condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) if "channels" not in condarc_options: - condarc_options["channels"] = channels + ["defaults"] + 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 e653af0bb3d56e5ca7e4c71edeb25be2a51e105a..501b337203b9b19ded85aafc8f0b2b09c5be8d3c 100644 --- a/bob/devtools/scripts/rebuild.py +++ b/bob/devtools/scripts/rebuild.py @@ -183,6 +183,7 @@ def rebuild( server=server, intranet=ci, group=group, + add_dependent_channels=True, ) if condarc is not None: @@ -194,7 +195,7 @@ def rebuild( condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) if "channels" not in condarc_options: - condarc_options["channels"] = channels + ["defaults"] + 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 58e3b3a324b776d5a205fe888389f764cfe17a31..d1f9c038a7b57c20cb1f98048cca5911b05ef3d3 100644 --- a/bob/devtools/scripts/test.py +++ b/bob/devtools/scripts/test.py @@ -168,9 +168,14 @@ def test( from ..bootstrap import get_channels channels, _ = get_channels( - public=(not private), stable=stable, server=server, intranet=ci, group=group + public=(not private), + stable=stable, + server=server, + intranet=ci, + group=group, + add_dependent_channels=True, ) - condarc_options["channels"] = channels + ["defaults"] + condarc_options["channels"] = channels logger.info( "Using the following channels during (potential) build:\n - %s",