diff --git a/.authors.yml b/.authors.yml index 85de92f3a8..e2eb67663e 100644 --- a/.authors.yml +++ b/.authors.yml @@ -1202,7 +1202,7 @@ alternate_emails: - clee@anaconda.com - name: Ken Odegard - num_commits: 228 + num_commits: 229 email: kodegard@anaconda.com first_commit: 2020-09-08 19:53:41 github: kenodegard @@ -1469,3 +1469,8 @@ num_commits: 1 first_commit: 2024-06-07 11:14:31 github: carterbox +- name: Cornelius Roemer + email: cornelius.roemer@gmail.com + github: corneliusroemer + num_commits: 1 + first_commit: 2024-11-26 11:16:47 diff --git a/.mailmap b/.mailmap index 258c625856..b75caa38d0 100644 --- a/.mailmap +++ b/.mailmap @@ -61,6 +61,7 @@ Conda Bot <18747875+conda-bot@users.noreply.github.com> conda-bot <18747875+cond Conda Bot <18747875+conda-bot@users.noreply.github.com> conda bot Conda Bot <18747875+conda-bot@users.noreply.github.com> conda bot <18747875+conda-bot@users.noreply.github.com> Connor Martin +Cornelius Roemer Crystal Soja csoja Dan Blanchard Daniel Blanchard Dan Blanchard Daniel Blanchard diff --git a/AUTHORS.md b/AUTHORS.md index 8953b0b356..3adbcbe823 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -47,6 +47,7 @@ Authors are sorted alphabetically. * Christopher Whelan * Conda Bot * Connor Martin +* Cornelius Roemer * Crystal Soja * Dan Blanchard * Dan Lovell diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d9e0ab989..79226dafbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ [//]: # (current developments) +## 24.11.2 (2024-11-26) + +### Bug fixes + +* Fix bug where `.copy()` was used on a string instead of `copy()` when processing variants. (#5417) + +### Contributors + +* @corneliusroemer made their first contribution in https://github.com/conda/conda-build/pull/5417 +* @kenodegard + + + ## 24.11.1 (2024-11-21) ### Bug fixes diff --git a/conda_build/variants.py b/conda_build/variants.py index ed21daf806..f0531b8353 100644 --- a/conda_build/variants.py +++ b/conda_build/variants.py @@ -329,7 +329,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/tests/test_variants.py b/tests/test_variants.py index 572d6362bf..95ac31bcb1 100644 --- a/tests/test_variants.py +++ b/tests/test_variants.py @@ -899,3 +899,164 @@ def test_find_used_variables_in_batch_script(tmp_path: Path) -> None: f"${{{variants[3]}}}\n" ) assert find_used_variables_in_batch_script(variants, script) == {"FOO", "BAR"} + + +def test_combine_specs_zip_lengths(): + from collections import OrderedDict + + # test case extracted from issue #5416 + specs = OrderedDict( + [ + ( + "internal_defaults", + { + "c_compiler": "gcc", + "cpu_optimization_target": "nocona", + "cran_mirror": "https://cran.r-project.org", + "cxx_compiler": "gxx", + "extend_keys": [ + "pin_run_as_build", + "ignore_version", + "ignore_build_only_deps", + "extend_keys", + ], + "fortran_compiler": "gfortran", + "ignore_build_only_deps": ["python", "numpy"], + "ignore_version": [], + "lua": "5", + "numpy": "1.23", + "perl": "5.26.2", + "pin_run_as_build": { + "python": {"max_pin": "x.x", "min_pin": "x.x"}, + "r-base": {"max_pin": "x.x", "min_pin": "x.x"}, + }, + "python": "3.11", + "r_base": "3.5", + "target_platform": "linux-64", + }, + ), + ( + "/tmp/tmp0wue6mdn/info/recipe/conda_build_config.yaml", + { + "VERBOSE_AT": "V=1", + "VERBOSE_CM": "VERBOSE=1", + "blas_impl": "openblas", + "boost": "1.82", + "boost_cpp": "1.82", + "bzip2": "1.0", + "c_compiler": "gcc", + "c_compiler_version": "11.2.0", + "cairo": "1.16", + "channel_targets": "defaults", + "clang_variant": "clang", + "cpu_optimization_target": "nocona", + "cran_mirror": "https://mran.microsoft.com/snapshot/2018-01-01", + "cuda_compiler": "cuda-nvcc", + "cuda_compiler_version": "12.4", + "cudatoolkit": "11.8", + "cudnn": "8.9.2.26", + "cxx_compiler": "gxx", + "cxx_compiler_version": "11.2.0", + "cyrus_sasl": "2.1.28", + "dbus": "1", + "expat": "2", + "extend_keys": [ + "pin_run_as_build", + "extend_keys", + "ignore_build_only_deps", + "ignore_version", + ], + "fontconfig": "2.14", + "fortran_compiler": "gfortran", + "fortran_compiler_version": "11.2.0", + "freetype": "2.10", + "g2clib": "1.6", + "geos": "3.8.0", + "giflib": "5", + "glib": "2", + "gmp": "6.2", + "gnu": "2.12.2", + "gpu_variant": "cuda-11", + "gst_plugins_base": "1.14", + "gstreamer": "1.14", + "harfbuzz": "4.3.0", + "hdf4": "4.2", + "hdf5": "1.12.1", + "hdfeos2": "2.20", + "hdfeos5": "5.1", + "icu": "73", + "ignore_build_only_deps": ["python", "numpy"], + "jpeg": "9", + "libcurl": "8.1.1", + "libdap4": "3.19", + "libffi": "3.4", + "libgd": "2.3.3", + "libgdal": "3.6.2", + "libgsasl": "1.10", + "libkml": "1.3", + "libnetcdf": "4.8", + "libpng": "1.6", + "libprotobuf": "3.20.3", + "libtiff": "4.2", + "libwebp": "1.3.2", + "libxml2": "2.10", + "libxslt": "1.1", + "llvm_variant": "llvm", + "lua": "5", + "lzo": "2", + "mkl": "2023.*", + "mpfr": "4", + "numpy": "1.21", + "openblas": "0.3.21", + "openjpeg": "2.3", + "openssl": "3.0", + "perl": "5.34", + "pin_run_as_build": { + "libboost": {"max_pin": "x.x.x"}, + "python": {"max_pin": "x.x", "min_pin": "x.x"}, + "r-base": {"max_pin": "x.x", "min_pin": "x.x"}, + }, + "pixman": "0.40", + "proj": "9.3.1", + "proj4": "5.2.0", + "python": "3.9", + "python_impl": "cpython", + "python_implementation": "cpython", + "r_base": "3.5", + "r_implementation": "r-base", + "r_version": "3.5.0", + "readline": "8.1", + "rust_compiler": "rust", + "rust_compiler_version": "1.71.1", + "sqlite": "3", + "target_platform": "linux-64", + "tk": "8.6", + "xz": "5", + "zip_keys": [["python", "numpy"]], + "zlib": "1.2", + "zstd": "1.5.2", + }, + ), + ( + "config.variant", + { + "__cuda": "__cuda >=11.8", + "blas_impl": "openblas", + "c_compiler": "gcc", + "c_compiler_version": "11.2.0", + "channel_targets": "defaults", + "cudatoolkit": "11.8", + "cudnn": "8.9.2.26", + "cxx_compiler": "gxx", + "cxx_compiler_version": "11.2.0", + "gpu_variant": "cuda-11", + "libprotobuf": "3.20.3", + "numpy": "1.21", + "openblas": "0.3.21", + "target_platform": "linux-64", + }, + ), + ] + ) + + combine_specs(specs, log_output=True)