From 19c8bf2cb8e7a672a240848a9a56a3c6766dffe3 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Wed, 13 Mar 2019 14:35:24 +0100 Subject: [PATCH] [scripts][build] Fix use of should_skip_build() --- bob/devtools/scripts/build.py | 10 ++++------ bob/devtools/scripts/rebuild.py | 12 ++++-------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/bob/devtools/scripts/build.py b/bob/devtools/scripts/build.py index c8dc8566..581c0e3c 100644 --- a/bob/devtools/scripts/build.py +++ b/bob/devtools/scripts/build.py @@ -139,17 +139,15 @@ def build(recipe_dir, python, condarc, config, no_test, append_file, # pre-renders the recipe - figures out the destination metadata = get_rendered_metadata(d, conda_config) - rendered_recipe = get_parsed_recipe(metadata) - path = get_output_path(metadata, conda_config) # checks if we should actually build this recipe if should_skip_build(metadata): - logger.info('Skipping UNSUPPORTED build of %s-%s-py%s for %s', - rendered_recipe['package']['name'], - rendered_recipe['package']['version'], python.replace('.',''), - arch) + logger.info('Skipping UNSUPPORTED build of %s for %s', recipe_dir, arch) continue + rendered_recipe = get_parsed_recipe(metadata) + path = get_output_path(metadata, conda_config) + # gets the next build number build_number, _ = next_build_number(channels[0], os.path.basename(path)) diff --git a/bob/devtools/scripts/rebuild.py b/bob/devtools/scripts/rebuild.py index f9ea9ccd..18880e89 100644 --- a/bob/devtools/scripts/rebuild.py +++ b/bob/devtools/scripts/rebuild.py @@ -135,18 +135,14 @@ def rebuild(recipe_dir, python, condarc, config, append_file, # pre-renders the recipe - figures out the destination metadata = get_rendered_metadata(d, conda_config) - rendered_recipe = get_parsed_recipe(metadata) - - path = get_output_path(metadata, conda_config) - # checks if we should actually build this recipe if should_skip_build(metadata): - logger.info('Skipping UNSUPPORTED build of %s-%s-py%s for %s', - rendered_recipe['package']['name'], - rendered_recipe['package']['version'], python.replace('.',''), - arch) + logger.info('Skipping UNSUPPORTED build of %s for %s', recipe_dir, arch) continue + rendered_recipe = get_parsed_recipe(metadata) + path = get_output_path(metadata, conda_config) + # Get the latest build number build_number, existing = next_build_number(channels[0], os.path.basename(path)) -- GitLab