Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding one key of zip_keys group if the lengths are correct #3344

Merged
merged 1 commit into from
Jan 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions conda_build/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def _combine_spec_dictionaries(specs, extend_keys=None, filter_keys=None, zip_ke
keys_in_group = group
break
# in order to clobber, one must replace ALL of the zipped keys.
# or the length must match with the other items in the group
# Otherwise, we filter later.
if all(group_item in spec for group_item in keys_in_group):
for group_item in keys_in_group:
Expand All @@ -232,8 +233,17 @@ def _combine_spec_dictionaries(specs, extend_keys=None, filter_keys=None, zip_ke
len(ensure_list(v)),
len(ensure_list(spec[group_item]))))
values[group_item] = ensure_list(spec[group_item])
else:
if k in values and any(subvalue not in values[k]
elif k in values:
for group_item in keys_in_group:
if group_item in spec and \
len(ensure_list(spec[group_item])) != len(ensure_list(v)):
break
if group_item in values and \
len(ensure_list(values[group_item])) != len(ensure_list(v)):
break
else:
values[k] = v.copy()
if any(subvalue not in values[k]
for subvalue in ensure_list(v)):

raise ValueError("variant config in {} is ambiguous because it "
Expand Down