Commit d2d9a061 authored by André Anjos's avatar André Anjos

[build] Make base_build() accept bootstrap module as input parameter so it can be reused

parent 267636b9
Pipeline #26909 passed with stages
in 5 minutes and 14 seconds
......@@ -462,7 +462,7 @@ def git_clean_build(runner, verbose):
['--exclude=%s' % k for k in exclude_from_cleanup])
def base_build(server, intranet, recipe_dir, conda_build_config,
def base_build(bootstrap, server, intranet, recipe_dir, conda_build_config,
python_version, condarc_options):
'''Builds a non-beat/bob software dependence that does not exist on defaults
......@@ -475,6 +475,8 @@ def base_build(server, intranet, recipe_dir, conda_build_config,
Args:
bootstrap: Module that should be pre-loaded so this function can be used
in a pre-bdt build
server: The base address of the server containing our conda channels
intranet: Boolean indicating if we should add "private"/"public" prefixes
on the returned paths
......@@ -604,8 +606,8 @@ if __name__ == '__main__':
if not os.path.exists(os.path.join(recipe, 'meta.yaml')):
# ignore - not a conda package
continue
base_build(server, not args.internet, recipe, conda_build_config,
args.python_version, condarc_options)
base_build(bootstrap, server, not args.internet, recipe,
conda_build_config, args.python_version, condarc_options)
# notice this condarc typically will only contain the defaults channel - we
# need to boost this up with more channels to get it right for this package's
......
......@@ -343,11 +343,13 @@ def base_build(order, dry_run):
line = line.partition('#')[0].strip()
if line: recipes.append(line)
from .. import bootstrap
for recipe in recipes:
if not os.path.exists(os.path.join(recipe, 'meta.yaml')):
# ignore - not a conda package
continue
_build(SERVER, True, recipe, CONDA_BUILD_CONFIG,
_build(bootstrap, SERVER, True, recipe, CONDA_BUILD_CONFIG,
os.environ['PYTHON_VERSION'], condarc_options)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment