Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate local:: specs issues #401

Merged
merged 8 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conda_libmamba_solver/mamba_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
jaimergp marked this conversation as resolved.
Show resolved Hide resolved

if context.channel_priority is ChannelPriority.STRICT:
api_ctx.channel_priority = api.ChannelPriority.kStrict
elif context.channel_priority is ChannelPriority.FLEXIBLE:
Expand Down
4 changes: 2 additions & 2 deletions dev/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 19 additions & 0 deletions news/401-custom-local
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* Properly propagate customized local channels (conda-build workspaces). Requires `libmamba 1.5.6` or above. (#398 via #401)

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
28 changes: 28 additions & 0 deletions tests/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
isuruf marked this conversation as resolved.
Show resolved Hide resolved
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"
Expand Down
Loading