Skip to content

Commit

Permalink
Let compute_build_matrix return an empty matrix if the build is skipped.
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Mar 14, 2017
1 parent add52e1 commit 75dc6bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ def meta_of_feedstock(forge_dir, config=None):


def compute_build_matrix(meta, existing_matrix=None, channel_sources=tuple()):
if meta.skip():
# return empty version matrix if build will be skipped
return set()

channel_sources = tuple(channel_sources)

# Override what `defaults` means depending on the platform used.
Expand Down
7 changes: 4 additions & 3 deletions conda_smithy/tests/test_configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,14 @@ def test_r(self):

def test(expect_skip=False):
meta.parse_again(**kwargs)

if expect_skip:
self.assertEqual(meta.skip(), True)

matrix = cnfgr_fdstk.compute_build_matrix(
meta
)

if expect_skip:
self.assertEqual(meta.skip(), True)

cases_not_skipped = []
for case in matrix:
pkgs, vars = cnfgr_fdstk.split_case(case)
Expand Down

0 comments on commit 75dc6bf

Please sign in to comment.