diff --git a/recipe/0001-patch-str-copy.patch b/recipe/0001-patch-str-copy.patch new file mode 100644 index 00000000..77b45f26 --- /dev/null +++ b/recipe/0001-patch-str-copy.patch @@ -0,0 +1,27 @@ +From 0b2e9e3005255e92df4cc1be359edc04fd5c2ff6 Mon Sep 17 00:00:00 2001 +From: Cornelius Roemer +Date: Thu, 18 Jul 2024 23:47:33 +0200 +Subject: [PATCH] fix: use copy(v) which works also on str, instead of v.copy() + which doesn't + +resolves #5416 +resolves #3404 (closed because stale, not because fixed) + +Bug was possibly introduced in #3344 +--- + conda_build/variants.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/conda_build/variants.py b/conda_build/variants.py +index b185a7eb34..fe659067e8 100644 +--- a/conda_build/variants.py ++++ b/conda_build/variants.py +@@ -328,7 +328,7 @@ def _combine_spec_dictionaries( + ) != len(ensure_list(v)): + break + else: +- values[k] = v.copy() ++ values[k] = copy(v) + missing_subvalues = [ + subvalue + for subvalue in ensure_list(v) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7cfa7189..d230d30a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,9 +8,15 @@ package: source: url: https://github.com/conda/{{ name }}/releases/download/{{ version }}/{{ name }}-{{ version }}.tar.gz sha256: 1fafd20caa758862bb1b51cebf1bd87cf7c01cf41b7eaa5ed9d6de8e08e829c6 + {% if version == "24.11.1" %} + patches: + # from https://github.com/conda/conda-build/pull/5417 + # can be removed once this PR is shipped + - 0001-patch-str-copy.patch + {% endif %} build: - number: 1 + number: 2 script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv entry_points: - conda-build = conda_build.cli.main_build:execute