Skip to content
Snippets Groups Projects
Commit d2d9a061 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

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

parent 267636b9
Branches
Tags
No related merge requests found
Pipeline #26909 passed
...@@ -462,7 +462,7 @@ def git_clean_build(runner, verbose): ...@@ -462,7 +462,7 @@ def git_clean_build(runner, verbose):
['--exclude=%s' % k for k in exclude_from_cleanup]) ['--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): python_version, condarc_options):
'''Builds a non-beat/bob software dependence that does not exist on defaults '''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, ...@@ -475,6 +475,8 @@ def base_build(server, intranet, recipe_dir, conda_build_config,
Args: 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 server: The base address of the server containing our conda channels
intranet: Boolean indicating if we should add "private"/"public" prefixes intranet: Boolean indicating if we should add "private"/"public" prefixes
on the returned paths on the returned paths
...@@ -604,8 +606,8 @@ if __name__ == '__main__': ...@@ -604,8 +606,8 @@ if __name__ == '__main__':
if not os.path.exists(os.path.join(recipe, 'meta.yaml')): if not os.path.exists(os.path.join(recipe, 'meta.yaml')):
# ignore - not a conda package # ignore - not a conda package
continue continue
base_build(server, not args.internet, recipe, conda_build_config, base_build(bootstrap, server, not args.internet, recipe,
args.python_version, condarc_options) conda_build_config, args.python_version, condarc_options)
# notice this condarc typically will only contain the defaults channel - we # 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 # 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): ...@@ -343,11 +343,13 @@ def base_build(order, dry_run):
line = line.partition('#')[0].strip() line = line.partition('#')[0].strip()
if line: recipes.append(line) if line: recipes.append(line)
from .. import bootstrap
for recipe in recipes: for recipe in recipes:
if not os.path.exists(os.path.join(recipe, 'meta.yaml')): if not os.path.exists(os.path.join(recipe, 'meta.yaml')):
# ignore - not a conda package # ignore - not a conda package
continue continue
_build(SERVER, True, recipe, CONDA_BUILD_CONFIG, _build(bootstrap, SERVER, True, recipe, CONDA_BUILD_CONFIG,
os.environ['PYTHON_VERSION'], condarc_options) os.environ['PYTHON_VERSION'], condarc_options)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment