Skip to content

Commit

Permalink
ensure we don't mutate inputs in _merge_deployment_target
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Mar 25, 2024
1 parent 6c30374 commit 9f4634b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,14 @@ def _merge_deployment_target(container_of_dicts, has_macdt):
warn_once(msg)

# we set MACOSX_DEPLOYMENT_TARGET to match c_stdlib_version,
# for ease of use in conda-forge-ci-setup
var_dict["c_stdlib_version"] = v_stdlib
var_dict["MACOSX_DEPLOYMENT_TARGET"] = v_stdlib
result.append(var_dict)
# for ease of use in conda-forge-ci-setup;
# use new dictionary to avoid mutating existing var_dict in place
new_dict = {
**var_dict,
"c_stdlib_version": v_stdlib,
"MACOSX_DEPLOYMENT_TARGET": v_stdlib,
}
result.append(new_dict)
# ensure we keep type of wrapper container (set stays set, etc.)
return type(container_of_dicts)(result)

Expand Down

0 comments on commit 9f4634b

Please sign in to comment.