diff --git a/recipe/patch_yaml/conda-build.yaml b/recipe/patch_yaml/conda-build.yaml index d1636cc85..1a424077b 100644 --- a/recipe/patch_yaml/conda-build.yaml +++ b/recipe/patch_yaml/conda-build.yaml @@ -69,3 +69,13 @@ then: - replace_depends: old: conda >=4.13 new: conda >=23.7.3 +--- +# conda-build <3.25.0 relied on get_prfix removed in +# https://github.com/conda/conda/commit/a26db05d5abd10a251128e2ce5092e7e8bb72f46 +if: + name: conda-build + version_lt: 3.25.0 +then: + - tighten_depends: + name: conda + upper_bound: 23.9.0 diff --git a/recipe/patch_yaml/mamba.yaml b/recipe/patch_yaml/mamba.yaml index 369329f1a..056742e90 100644 --- a/recipe/patch_yaml/mamba.yaml +++ b/recipe/patch_yaml/mamba.yaml @@ -119,3 +119,13 @@ then: - replace_depends: old: conda >=4.8,<23.4 new: conda >=4.14,<23.4 +--- +# mamba <=1.5.1 relies on conda.cli.common.ensure_name_or_prefix +# removed in https://github.com/conda/conda/pull/12948 +if: + name: mamba + version_le: 1.5.1 +then: + - tighten_depends: + name: conda + upper_bound: "23.9.0" diff --git a/recipe/patch_yaml_utils.py b/recipe/patch_yaml_utils.py index d573d170f..6813e988c 100644 --- a/recipe/patch_yaml_utils.py +++ b/recipe/patch_yaml_utils.py @@ -349,7 +349,7 @@ def _pin_stricter(fn, record, fix_dep, max_pin, upper_bound=None): new_upper = upper_bound.split(".") upper = pad_list(upper, len(new_upper)) new_upper = pad_list(new_upper, len(upper)) - if tuple(upper) > tuple(new_upper): + if parse_version(".".join(upper)) > parse_version(".".join(new_upper)): if str(new_upper[-1]) != "0": new_upper += ["0"] depends[dep_idx] = "{} >={},<{}a0".format(