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

Update header cmdlines in generated lockfiles (#518) #616

Merged
merged 1 commit into from Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions conda_lock/lockfile/__init__.py
Expand Up @@ -187,22 +187,22 @@ def write_section(text: str) -> None:
available, unless you explicitly update the lock file.

Install this environment as "YOURENV" with:
conda-lock install -n YOURENV --file {path.name}
conda-lock install -n YOURENV {path.name}
"""
)
if "dev" in categories:
write_section(
f"""
This lock contains optional development dependencies. Include them in the installed environment with:
conda-lock install --dev-dependencies -n YOURENV --file {path.name}
conda-lock install --dev-dependencies -n YOURENV {path.name}
"""
)
extras = sorted(categories.difference({"main", "dev"}))
if extras:
write_section(
f"""
This lock contains optional dependency categories {', '.join(extras)}. Include them in the installed environment with:
conda-lock install {' '.join('-e '+extra for extra in extras)} -n YOURENV --file {path.name}
conda-lock install {' '.join('-e '+extra for extra in extras)} -n YOURENV {path.name}
"""
)
write_section(
Expand Down