diff --git a/bob/devtools/build.py b/bob/devtools/build.py index dbb1c4a304359a3eb7cdd14373d8f64754f9d105..f88ae6335b4d2605b5c64506ebefbde62f7e0874 100644 --- a/bob/devtools/build.py +++ b/bob/devtools/build.py @@ -524,7 +524,7 @@ def base_build(bootstrap, server, intranet, group, recipe_dir, # if you get to this point, just builds the package logger.info('Building %s', path) - conda_build.api.build(metadata[0], config=conda_config) + conda_build.api.build(metadata[0][0], config=conda_config) if __name__ == '__main__': diff --git a/bob/devtools/scripts/ci.py b/bob/devtools/scripts/ci.py index d9a7e9194263dda764d767157a165cfbb91558ac..183173c65adf687cdd4978322af3b6da74885cf0 100644 --- a/bob/devtools/scripts/ci.py +++ b/bob/devtools/scripts/ci.py @@ -266,9 +266,25 @@ def base_build(order, group, python, dry_run): """ condarc = os.path.join(os.environ['CONDA_ROOT'], 'condarc') - logger.info('Loading (this build\'s) CONDARC file from %s...', condarc) - with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + if os.path.exists(condarc): + logger.info('Loading (this build\'s) CONDARC file from %s...', condarc) + with open(condarc, 'rb') as f: + condarc_options = yaml.load(f) + + else: #not building on the CI? - use defaults + import yaml + from ..constants import BASE_CONDARC, SERVER + from ..bootstrap import get_channels + + # get potential channel upload and other auxiliary channels + channels = get_channels(public=True, stable=True, server=SERVER, + intranet='True', group='bob') + + # use default and add channels + condarc_options = yaml.load(BASE_CONDARC) #n.b.: no channels + logger.info('Using the following channels during build:\n - %s', + '\n - '.join(channels + ['defaults'])) + condarc_options['channels'] = channels + ['defaults'] # dump packages at conda_root condarc_options['croot'] = os.path.join(os.environ['CONDA_ROOT'], diff --git a/bob/devtools/scripts/rebuild.py b/bob/devtools/scripts/rebuild.py index 0a3753985fb19b7c683d85b3daf7a63734ac06cb..18f192a9f958877e59ae9e92d2e0a8027260dc03 100644 --- a/bob/devtools/scripts/rebuild.py +++ b/bob/devtools/scripts/rebuild.py @@ -200,7 +200,8 @@ def rebuild(recipe_dir, python, condarc, config, append_file, os.unlink(candidate) if not dry_run: - conda_build.api.build(metadata[0], config=conda_config, notest=no_test) + conda_build.api.build(metadata[0][0], config=conda_config, + notest=no_test) # if you get to this point, the package was successfully rebuilt # set environment to signal caller we can upload it os.environ['BDT_REBUILD'] = candidate