diff --git a/micromamba/tests/test_create.py b/micromamba/tests/test_create.py index e560891459..d8469ce979 100644 --- a/micromamba/tests/test_create.py +++ b/micromamba/tests/test_create.py @@ -1575,3 +1575,69 @@ def test_update_spec_list(tmp_path): out = helpers.create("-p", env_prefix, "-f", env_spec_file, "--dry-run") assert update_specs_list in out.replace("\r", "") + + +def test_glob_in_build_string(tmp_path): + # Non-regression test for https://github.com/mamba-org/mamba/issues/3699 + env_prefix = tmp_path / "test_glob_in_build_string" + + # Export CONDA_OVERRIDE_GLIBC=2.17 to force the solver to use the glibc 2.17 package + os.environ["CONDA_OVERRIDE_GLIBC"] = "2.17" + + pytorch_match_spec = "pytorch=2.3.1=py3.10_cuda11.8*" + + pytorch_build_package_info = { + "build": "py3.10_cuda11.8_cudnn8.7.0_0", + "build_number": 0, + "build_string": "py3.10_cuda11.8_cudnn8.7.0_0", + "channel": "pytorch", + "constrains": ["cpuonly <0"], + "depends": [ + "typing_extensions", + "filelock", + "jinja2", + "networkx", + "sympy", + "pyyaml", + "pytorch-mutex 1.0 cuda", + "mkl >=2018", + "blas * mkl", + "python >=3.10,<3.11.0a0", + "llvm-openmp <16", + "pytorch-cuda >=11.8,<11.9", + "torchtriton 2.3.1", + ], + "fn": "pytorch-2.3.1-py3.10_cuda11.8_cudnn8.7.0_0.tar.bz2", + "license": "BSD 3-Clause", + "md5": "eb00b4790822b082179cc5cee67d934f", + "name": "pytorch", + "sha256": "3b49061de3e481fc684d463d68aae93d87aff35e715730c72431249d877c1ec9", + "size": 1673590592, + "subdir": "linux-64", + "timestamp": 1716914789, + "track_features": "", + "url": "https://conda.anaconda.org/pytorch/linux-64/pytorch-2.3.1-py3.10_cuda11.8_cudnn8.7.0_0.tar.bz2", + "version": "2.3.1", + } + + # Should run without error + out = helpers.create( + "-p", + env_prefix, + pytorch_match_spec, + "-c", + "pytorch", + "-c", + "nvidia/label/cuda-11.8.0", + "-c", + "nvidia", + "-c", + "conda-forge", + "--platform", + "linux-64", + "--dry-run", + "--json", + ) + + # Check that python 2.3.1 py3.10_cuda11.8_cudnn8.7.0_0 is in the package list + assert pytorch_build_package_info in out["actions"]["FETCH"]