diff --git a/conda_libmamba_solver/mamba_utils.py b/conda_libmamba_solver/mamba_utils.py index 0d879bed..c34c4ecb 100644 --- a/conda_libmamba_solver/mamba_utils.py +++ b/conda_libmamba_solver/mamba_utils.py @@ -145,6 +145,8 @@ def init_api_context() -> api.Context: _get_base_url(x.url(with_credentials=True)) for x in context.default_channels ] + api_ctx.conda_build_local_paths = list(context.conda_build_local_paths) + if context.channel_priority is ChannelPriority.STRICT: api_ctx.channel_priority = api.ChannelPriority.kStrict elif context.channel_priority is ChannelPriority.FLEXIBLE: diff --git a/dev/requirements.txt b/dev/requirements.txt index 6a186b15..d67c3502 100644 --- a/dev/requirements.txt +++ b/dev/requirements.txt @@ -3,7 +3,7 @@ pip # run-time boltons>=23.0.0 conda>=23.7.3 -libmamba>=1.5.3 -libmambapy>=1.5.3 +libmamba>=1.5.6 +libmambapy>=1.5.6 # be explicit about sqlite because sometimes it's removed from the env :shrug: sqlite diff --git a/news/401-custom-local b/news/401-custom-local new file mode 100644 index 00000000..6eea3a02 --- /dev/null +++ b/news/401-custom-local @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Properly propagate customized local channels (conda-build workspaces). Requires `libmamba 1.5.6` or above. (#398 via #401) + +### Deprecations + +* + +### Docs + +* + +### Other + +* diff --git a/pyproject.toml b/pyproject.toml index 5ac295be..b9b1bdaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ "conda >=23.7.3", - "libmambapy >=1.5.3", + "libmambapy >=1.5.6", "boltons >=23.0.0", ] dynamic = [ diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9df7032e..e31b0968 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -22,7 +22,7 @@ requirements: run: - python >=3.8 - conda >=23.7.3 - - libmambapy >=1.5.3 + - libmambapy >=1.5.6 - boltons >=23.0.0 test: diff --git a/tests/test_channels.py b/tests/test_channels.py index b7df88c5..67b5bc65 100644 --- a/tests/test_channels.py +++ b/tests/test_channels.py @@ -304,6 +304,34 @@ def test_http_server_auth_token_in_defaults(http_server_auth_token): condarc.unlink() +def test_local_spec(): + "https://github.com/conda/conda-libmamba-solver/issues/398" + env = os.environ.copy() + env["CONDA_BLD_PATH"] = str(DATA / "mamba_repo") + process = conda_subprocess( + "create", + "-p", + _get_temp_prefix(use_restricted_unicode=on_win), + "--dry-run", + "--solver=libmamba", + "--channel=local", + "test-package", + env=env, + ) + assert process.returncode == 0 + + process = conda_subprocess( + "create", + "-p", + _get_temp_prefix(use_restricted_unicode=on_win), + "--dry-run", + "--solver=libmamba", + "local::test-package", + env=env, + ) + assert process.returncode == 0 + + def test_unknown_channels_do_not_crash(tmp_path): "https://github.com/conda/conda-libmamba-solver/issues/418" DATA = Path(__file__).parent / "data"